mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Print function name in backtrace when available
If we don't have `saddr` but have `sname` we should output `sname`.
This commit is contained in:
parent
55ba414405
commit
09c72f41ce
Notes:
git
2022-05-13 23:48:10 +09:00
1 changed files with 4 additions and 1 deletions
|
@ -2257,9 +2257,12 @@ print_line0(line_info_t *line, void *address)
|
|||
else if (!line->path) {
|
||||
kprintf("[0x%"PRIxPTR"]\n", addr);
|
||||
}
|
||||
else if (!line->saddr || !line->sname) {
|
||||
else if (!line->sname) {
|
||||
kprintf("%s(0x%"PRIxPTR") [0x%"PRIxPTR"]\n", line->path, addr-line->base_addr, addr);
|
||||
}
|
||||
else if (!line->saddr) {
|
||||
kprintf("%s(%s) [0x%"PRIxPTR"]\n", line->path, line->sname, addr);
|
||||
}
|
||||
else if (line->line <= 0) {
|
||||
kprintf("%s(%s+0x%"PRIxPTR") [0x%"PRIxPTR"]\n", line->path, line->sname,
|
||||
d, addr);
|
||||
|
|
Loading…
Add table
Reference in a new issue