Created
August 5, 2025 14:13
-
-
Save agrif/eb3821cc872ac6837d0ef6fc3b50f2c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gdb.unwinder import Unwinder | |
class FrameID: | |
def __init__(self, sp, pc): | |
self.sp = sp | |
self.pc = pc | |
class no_unwinder(Unwinder): | |
def __init__(self): | |
super().__init__("no_unwinder") | |
def __call__(self, pending_frame): | |
sp = pending_frame.read_register("sp") | |
pc = pending_frame.read_register("pc") | |
frame_id = FrameID(sp, pc) | |
info = pending_frame.create_unwind_info(frame_id) | |
return info | |
gdb.unwinder.register_unwinder(None, no_unwinder(), replace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment