90 """Internal function called from GDB to execute all unwinders.
92 Runs each currently enabled unwinder until it finds the one that
93 can unwind given frame.
96 pending_frame: gdb.PendingFrame instance.
101 [0] gdb.UnwindInfo instance
102 [1] Name of unwinder that claimed the frame (type `str`)
104 or None, if no unwinder has claimed the frame.
107 for unwinder
in objfile.frame_unwinders:
109 unwind_info = unwinder(pending_frame)
110 if unwind_info
is not None:
111 return (unwind_info, unwinder.name)
115 unwind_info = unwinder(pending_frame)
116 if unwind_info
is not None:
117 return (unwind_info, unwinder.name)
119 for unwinder
in frame_unwinders:
121 unwind_info = unwinder(pending_frame)
122 if unwind_info
is not None:
123 return (unwind_info, unwinder.name)
170 for package
in packages:
171 location = os.path.join(os.path.dirname(__file__), package)
172 if os.path.exists(location):
174 lambda x: x.endswith(
".py")
and x !=
"__init__.py", os.listdir(location)
177 for py_file
in py_files:
179 modname =
"%s.%s.%s" % (__name__, package, py_file[:-3])
181 if modname
in sys.modules:
183 reload(__import__(modname))
187 sys.stderr.write(traceback.format_exc() +
"\n")
268 """A helper function that blocks and unblocks signals."""
269 if not hasattr(signal,
"pthread_sigmask"):
273 to_block = {signal.SIGCHLD, signal.SIGINT, signal.SIGALRM, signal.SIGWINCH}
274 old_mask = signal.pthread_sigmask(signal.SIG_BLOCK, to_block)
278 signal.pthread_sigmask(signal.SIG_SETMASK, old_mask)