From f91c80836a3f0c0a7ada00d439ad78fdfccd6b29 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 5 Jun 2025 12:09:54 -0700 Subject: [PATCH] gdbinit: fix printing of T_DATA --- .gdbinit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gdbinit b/.gdbinit index a19a9bfc87..f624456d04 100644 --- a/.gdbinit +++ b/.gdbinit @@ -185,8 +185,8 @@ define rp print (struct RBasic *)($arg0) else if ($flags & RUBY_T_MASK) == RUBY_T_DATA - if ((struct RTypedData *)($arg0))->typed_flag == 1 - printf "%sT_DATA%s(%s): ", $color_type, $color_end, ((struct RTypedData *)($arg0))->type->wrap_struct_name + if ((struct RTypedData *)($arg0))->type & 1 + 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) else printf "%sT_DATA%s: ", $color_type, $color_end