Unwinder.__init__(self, "stop at level")
def __call__(self, pending_frame):
- global stop_at_level
- global stack_adjust
-
if stop_at_level is None or pending_frame.level() != stop_at_level:
return None
if str(func) != "break_bt_here":
return None
- global break_bt_here_frame_id
if break_bt_here_frame_id is None:
return None
# Record breakpoint modification events into the global
# bp_modified_counts dictionary.
def bp_modified(bp):
- global bp_modified_counts
if bp.number not in bp_modified_counts:
bp_modified_counts[bp.number] = 1
else:
disassembly wrapping for the global CURRENT_PC."""
def __init__(self):
- global current_pc
-
super().__init__("TestDisassembler")
self.__info = None
if current_pc == None:
raise gdb.GdbError("no current_pc set")
def __call__(self, info):
- global current_pc
-
if info.address != current_pc:
return None
self.__info = info
text and address parts."""
def disassemble(self, info):
- global current_pc
-
parts = []
parts.append(info.text_part(gdb.disassembler.STYLE_MNEMONIC, "fake"))
parts.append(info.text_part(gdb.disassembler.STYLE_TEXT, "\t"))
@property
def address(self):
- global current_pc
return current_pc
@property
self._mode = Mode.RETURN_NONE
def __call__(self, objfile):
- global handler_call_log
handler_call_log.append(self.name)
self._call_count += 1
if self._mode == Mode.RETURN_NONE:
self.exception_type = None
def __call__(self, objfile):
- global handler_call_log
handler_call_log.append(self.name)
assert self.exception_type is not None
raise self.exception_type("message")
class log_handler(MissingDebugHandler):
def __call__(self, objfile):
- global handler_call_log
handler_call_log.append(self.name)
return None
self._mode = Mode.RETURN_NONE
def __call__(self, pspace, buildid, filename):
- global handler_call_log, handler_last_buildid, handler_last_filename
+ global handler_last_buildid, handler_last_filename
check_args(pspace, buildid, filename)
handler_call_log.append(self.name)
handler_last_buildid = buildid
self.exception_type = None
def __call__(self, pspace, buildid, filename):
- global handler_call_log
check_args(pspace, buildid, filename)
handler_call_log.append(self.name)
assert self.exception_type is not None
# then be checked from the test script.
class log_handler(MissingObjfileHandler):
def __call__(self, pspace, buildid, filename):
- global handler_call_log
check_args(pspace, buildid, filename)
handler_call_log.append(self.name)
return None
unwind_info.add_saved_register(value=previous_ip, register="rip")
unwind_info.add_saved_register(register="rsp", value=previous_sp)
- global add_saved_register_errors
try:
unwind_info.add_saved_register("nosuchregister", previous_sp)
except ValueError as ve:
# Assert that every entry in the global ALL_FRAME_INFORMATION list was
# matched by the validating_unwinder.
def check_all_frame_information_matched():
- global all_frame_information
for entry in all_frame_information:
assert entry["matched"]
def __call__(self, pending_frame):
info = capture_frame_information(pending_frame)
level = info["level"]
-
- global all_frame_information
old_info = all_frame_information[level]
assert old_info is not None
self._win.write("Hello world...")
def close(self):
- global cleanup_properly
- global titles_at_the_close
-
# Ensure that window properties can be read within the close method.
titles_at_the_close[self._win.title] = dict(
width=self._win.width, height=self._win.height
self._exit_listener = None
def _event(self, type, event):
- global perform_valid_check
- global update_title
-
self._count += 1
self._events.insert(0, type)
if not perform_valid_check or self._win.is_valid():