aboutsummaryrefslogtreecommitdiffstats
path: root/.gdbinit
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-18 10:37:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-18 10:37:53 +0000
commit655aa318dba6f94fb16a105d9951f5241a72a742 (patch)
tree1450f282fcff455e74d06de8d8203e00a41e7a58 /.gdbinit
parentc85cdc12a4739c8d6d03139b896bf6685ab15408 (diff)
downloadruby-655aa318dba6f94fb16a105d9951f5241a72a742.tar.gz
.gdbinit: suppress gdb message [ci skip]
* .gdbinit (rp): check number of instance variables to get rid of "Invalid number 0 of repetitions." message at an empty object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit4
1 files changed, 3 insertions, 1 deletions
diff --git a/.gdbinit b/.gdbinit
index 2dff2015cf..a161f4a833 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -68,7 +68,9 @@ define rp
print/x *((VALUE*)((struct RObject*)($arg0))->as.ary) @ (ROBJECT_EMBED_LEN_MAX+0)
else
print (((struct RObject *)($arg0))->as.heap)
- print/x *(((struct RObject*)($arg0))->as.heap.ivptr) @ (((struct RObject*)($arg0))->as.heap.numiv)
+ if (((struct RObject*)($arg0))->as.heap.numiv) > 0
+ print/x *(((struct RObject*)($arg0))->as.heap.ivptr) @ (((struct RObject*)($arg0))->as.heap.numiv)
+ end
end
else
if ($flags & RUBY_T_MASK) == RUBY_T_CLASS