mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
.gdbinit: print_id in rp_id [ci skip]
* .gdbinit (rp_id): use print_id instead of calling lookup_id_str() in a debugger context. * symbol.c (ID_ENTRY_UNIT): made visible to debuggers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a15028bc38
commit
f52a49130f
2 changed files with 7 additions and 8 deletions
13
.gdbinit
13
.gdbinit
|
@ -398,12 +398,7 @@ define rp_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
printf "(%ld): ", $id
|
printf "(%ld): ", $id
|
||||||
set $str = lookup_id_str($id)
|
print_id $id
|
||||||
if $str
|
|
||||||
rp_string $str
|
|
||||||
else
|
|
||||||
echo undef\n
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1093,7 +1088,11 @@ define print_id
|
||||||
set $arylen = $ary->as.heap.len
|
set $arylen = $ary->as.heap.len
|
||||||
end
|
end
|
||||||
set $result = $aryptr[($serial % ID_ENTRY_UNIT) * ID_ENTRY_SIZE + $t]
|
set $result = $aryptr[($serial % ID_ENTRY_UNIT) * ID_ENTRY_SIZE + $t]
|
||||||
print_string $result
|
if $result != RUBY_Qnil
|
||||||
|
print_string $result
|
||||||
|
else
|
||||||
|
echo undef\n
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
2
symbol.c
2
symbol.c
|
@ -51,7 +51,7 @@ Init_op_tbl(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {ID_ENTRY_UNIT = 512};
|
static const int ID_ENTRY_UNIT = 512;
|
||||||
|
|
||||||
enum id_entry_type {
|
enum id_entry_type {
|
||||||
ID_ENTRY_STR,
|
ID_ENTRY_STR,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue