diff --git a/.gdbinit b/.gdbinit index bc79f51368..04680c17a9 100644 --- a/.gdbinit +++ b/.gdbinit @@ -468,7 +468,7 @@ document rp_class end define rp_imemo - set $flags = (((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask + set $flags = (enum imemo_type)((((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask) if $flags == imemo_cref printf "(rb_cref_t *) %p\n", (void*)$arg0 print *(rb_cref_t *)$arg0 @@ -488,6 +488,14 @@ define rp_imemo if $flags == imemo_memo printf "(struct MEMO *) %p\n", (void*)$arg0 print *(struct MEMO *)$arg0 + else + if $flags == imemo_ment + printf "(rb_method_entry_t *) %p\n", (void*)$arg0 + print *(rb_method_entry_t *)$arg0 + else + if $flags == imemo_iseq + printf "(rb_iseq_t *) %p\n", (void*)$arg0 + print *(rb_iseq_t *)$arg0 else printf "(struct RIMemo *) %p\n", (void*)$arg0 print *(struct RIMemo *)$arg0 @@ -496,6 +504,8 @@ define rp_imemo end end end + end + end end document rp_imemo Print the content of a memo