aboutsummaryrefslogtreecommitdiffstats
path: root/.gdbinit
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2020-12-04 10:49:33 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2020-12-04 08:43:32 -0800
commitd7cda3b0024d82d9c921382b7095a31c866fa857 (patch)
tree97dd5ee9580ed1b773f4f541d1e83c1e4f25e5cf /.gdbinit
parentb4ec4a41c24105efbb43f9b70ca7f36d22f98294 (diff)
downloadruby-d7cda3b0024d82d9c921382b7095a31c866fa857.tar.gz
Add T_MOVED to rp command of GDB
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit5
1 files changed, 5 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
index 714d7bee10..49380951b8 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -265,6 +265,10 @@ define rp
printf "%sT_ZOMBIE%s: ", $color_type, $color_end
print (struct RData *)($arg0)
else
+ if ($flags & RUBY_T_MASK) == RUBY_T_MOVED
+ printf "%sT_MOVED%s: ", $color_type, $color_end
+ print *(struct RMoved *)$arg0
+ else
printf "%sunknown%s: ", $color_type, $color_end
print (struct RBasic *)($arg0)
end
@@ -300,6 +304,7 @@ define rp
end
end
end
+ end
end
document rp
Print a Ruby's VALUE.