diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-20 04:53:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-20 04:53:08 +0000 |
commit | aee98a1c2be4999bb6327e6797075cb6502c1ec4 (patch) | |
tree | a2b321afed87103c7b406ba838cf7431c4f136ef /.gdbinit | |
parent | a9534d1b4889cc9a3a5d487944b52c859ecd9e65 (diff) |
.gdbinit: show ID type
* .gdbinit (rp_id): show ID type.
* template/id.h.tmpl (ruby_id_types): make enum for debugger.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -316,6 +316,36 @@ define rp_id if $id == idASET printf "(:[]=)\n" else + if $id <= tLAST_OP_ID + printf "O" + else + set $id_type = $id & RUBY_ID_SCOPE_MASK + if $id_type == RUBY_ID_LOCAL + printf "l" + else + if $id_type == RUBY_ID_INSTANCE + printf "i" + else + if $id_type == RUBY_ID_GLOBAL + printf "G" + else + if $id_type == RUBY_ID_ATTRSET + printf "a" + else + if $id_type == RUBY_ID_CONST + printf "C" + else + if $id_type == RUBY_ID_CLASS + printf "c" + else + printf "j" + end + end + end + end + end + end + end printf "(%ld): ", $id rb_numtable_entry global_symbols.id_str $id if $rb_numtable_rec |