From aee98a1c2be4999bb6327e6797075cb6502c1ec4 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 20 Sep 2013 04:53:08 +0000 Subject: .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 --- template/id.h.tmpl | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'template/id.h.tmpl') diff --git a/template/id.h.tmpl b/template/id.h.tmpl index c993243424..9df7947214 100644 --- a/template/id.h.tmpl +++ b/template/id.h.tmpl @@ -28,16 +28,29 @@ types = ids.keys.grep(/^[A-Z]/) #ifndef RUBY_ID_H #define RUBY_ID_H -#define ID_SCOPE_SHIFT 3 -#define ID_SCOPE_MASK 0x07 -#define ID_LOCAL 0x00 -#define ID_INSTANCE 0x01 -#define ID_GLOBAL 0x03 -#define ID_ATTRSET 0x04 -#define ID_CONST 0x05 -#define ID_CLASS 0x06 -#define ID_JUNK 0x07 -#define ID_INTERNAL ID_JUNK +enum ruby_id_types { + RUBY_ID_LOCAL = 0x00, + RUBY_ID_INSTANCE = 0x01, + RUBY_ID_GLOBAL = 0x03, + RUBY_ID_ATTRSET = 0x04, + RUBY_ID_CONST = 0x05, + RUBY_ID_CLASS = 0x06, + RUBY_ID_JUNK = 0x07, + RUBY_ID_INTERNAL = RUBY_ID_JUNK, + RUBY_ID_SCOPE_SHIFT = 3, + RUBY_ID_SCOPE_MASK = ~(~0U<