gdbinit: fix printing of T_DATA

This commit is contained in:
John Hawthorn 2025-06-05 12:09:54 -07:00
parent 3a6844a692
commit f91c80836a
Notes: git 2025-06-12 01:11:49 +00:00

View File

@ -185,8 +185,8 @@ define rp
print (struct RBasic *)($arg0) print (struct RBasic *)($arg0)
else else
if ($flags & RUBY_T_MASK) == RUBY_T_DATA if ($flags & RUBY_T_MASK) == RUBY_T_DATA
if ((struct RTypedData *)($arg0))->typed_flag == 1 if ((struct RTypedData *)($arg0))->type & 1
printf "%sT_DATA%s(%s): ", $color_type, $color_end, ((struct RTypedData *)($arg0))->type->wrap_struct_name printf "%sT_DATA%s(%s): ", $color_type, $color_end, ((const rb_data_type_t *)(((struct RTypedData *)($arg0))->type & ~1))->wrap_struct_name
print (struct RTypedData *)($arg0) print (struct RTypedData *)($arg0)
else else
printf "%sT_DATA%s: ", $color_type, $color_end printf "%sT_DATA%s: ", $color_type, $color_end