Skip to content

Commit

Permalink
gdb: Fix specval
Browse files Browse the repository at this point in the history
Somehow my gdb stopped recognizing VM_BLOCK_HANDLER_NONE (macro) today.
Just changing it to a safer code.
  • Loading branch information
k0kubun committed Apr 1, 2023
1 parent 1da7753 commit a3074c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions misc/gdb.py
Expand Up @@ -95,9 +95,10 @@ def rp(self, cfp, bp_index):
# specval: block_handler or previous EP
def specval(self, cfp, bp_index):
value = self.get_value(cfp, bp_index)
for block_handler in ['VM_BLOCK_HANDLER_NONE', 'rb_block_param_proxy']:
if value == self.get_int(block_handler):
return block_handler
if value == 0:
return 'VM_BLOCK_HANDLER_NONE'
if value == self.get_int('rb_block_param_proxy'):
return 'rb_block_param_proxy'
return ''

def frame_types(self, cfp, bp_index):
Expand Down

0 comments on commit a3074c1

Please sign in to comment.