gdb: Fix specval

Somehow my gdb stopped recognizing VM_BLOCK_HANDLER_NONE (macro) today.
Just changing it to a safer code.
This commit is contained in:
Takashi Kokubun 2023-04-01 00:19:43 -07:00
parent 1da77539da
commit a3074c1256

View File

@ -95,9 +95,10 @@ class CFP(gdb.Command):
# 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):