[Bug 191981] New: [patch] [libproc] demangle() fail to handle non-c++ function name
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jul 20 08:14:17 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191981
Bug ID: 191981
Summary: [patch] [libproc] demangle() fail to handle non-c++
function name
Product: Base System
Version: 11.0-CURRENT
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: luke.tw at gmail.com
Created attachment 144809
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144809&action=edit
patch for demangle() to handle c function name
* root cause
demangle() in lib/libproc/proc_sym.c only handles c++ function, but ignores
c function.
This bug causes that ustack() in dtrace cannot print c function name.
* solution
We should restore the behavior before revision r268463 . Please see the
attached patch.
* ======= before patch ==============================
# dtrace -n 'pid$target:::entry{ustack()}' -c ./a.out
dtrace: description 'pid$target:::entry' matched 3009 probes
CPU ID FUNCTION:NAME
3 55874 _r_debug_postinit:entry
ld-elf.so.1`????+0x1
ld-elf.so.1`0x800603f1c
ld-elf.so.1`0x800602139
3 55865 _start:entry
a.out` ????+0x1
ld-elf.so.1`0x80061e000
3 58679 atexit:entry
libc.so.7`????+0x1
a.out`????+0x6d
ld-elf.so.1`0x80061e000
3 55867 main:entry
a.out`????+0x1
a.out`????+0x16f
ld-elf.so.1`0x80061e000
* ======= after patch ==============================
# dtrace -n 'pid$target:::entry{ustack()}' -c ./a.out
dtrace: description 'pid$target:::entry' matched 3009 probes
CPU ID FUNCTION:NAME
2 55874 _r_debug_postinit:entry
ld-elf.so.1`_r_debug_postinit+0x1
ld-elf.so.1`0x800603f1c
ld-elf.so.1`0x800602139
2 55865 _start:entry
a.out`_start+0x1
ld-elf.so.1`0x80061e000
2 58679 atexit:entry
libc.so.7`atexit+0x1
a.out`_start+0x6d
ld-elf.so.1`0x80061e000
2 55867 main:entry
a.out`main+0x1
a.out`_start+0x16f
ld-elf.so.1`0x80061e000
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list