Skip to content

Commit

Permalink
gdb: resist unnamed frames
Browse files Browse the repository at this point in the history
Assuming the name existed caused a weird type error when it didn't.
Whoops! Happens with e.g. signal handlers.
  • Loading branch information
Bike committed Aug 27, 2024
1 parent eb2caa2 commit 10cec81
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions debugger-tools/backends/gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,19 @@ def filter(self, frame_iter):
return ElidingVMFrameIterator(frame_iter)

def bytecode_vm_frame_p(frame):
# Kinda fragile but I'm not sure what a better way is.
return "bytecode_vm" in frame.name()
fname = frame.name()
if (fname == None):
return False
else:
# Kinda fragile but I'm not sure what a better way is.
return "bytecode_vm" in fname

def bytecode_call_frame_p(frame):
return "bytecode_call" in frame.name()
fname = frame.name()
if (fname == None):
return False
else:
return "bytecode_call" in fname

class ElidingVMFrameIterator():

Expand Down

0 comments on commit 10cec81

Please sign in to comment.