Skip to content

Commit f91c808

Browse files
committed
gdbinit: fix printing of T_DATA
1 parent 3a6844a commit f91c808

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.gdbinit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ define rp
185185
print (struct RBasic *)($arg0)
186186
else
187187
if ($flags & RUBY_T_MASK) == RUBY_T_DATA
188-
if ((struct RTypedData *)($arg0))->typed_flag == 1
189-
printf "%sT_DATA%s(%s): ", $color_type, $color_end, ((struct RTypedData *)($arg0))->type->wrap_struct_name
188+
if ((struct RTypedData *)($arg0))->type & 1
189+
printf "%sT_DATA%s(%s): ", $color_type, $color_end, ((const rb_data_type_t *)(((struct RTypedData *)($arg0))->type & ~1))->wrap_struct_name
190190
print (struct RTypedData *)($arg0)
191191
else
192192
printf "%sT_DATA%s: ", $color_type, $color_end

0 commit comments

Comments
 (0)