ruby-changes:45940
From: nobu <ko1@a...>
Date: Sat, 18 Mar 2017 19:37:58 +0900 (JST)
Subject: [ruby-changes:45940] nobu:r58011 (trunk): .gdbinit: suppress gdb message [ci skip]
nobu 2017-03-18 19:37:53 +0900 (Sat, 18 Mar 2017) New Revision: 58011 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58011 Log: .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. Modified files: trunk/.gdbinit Index: .gdbinit =================================================================== --- .gdbinit (revision 58010) +++ .gdbinit (revision 58011) @@ -68,7 +68,9 @@ define rp https://github.com/ruby/ruby/blob/trunk/.gdbinit#L68 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/