Document __demangle() and fix a const func ptr bug

This commit is contained in:
Justine Tunney 2024-06-02 04:15:48 -07:00
parent c67faf61df
commit 9aa353d88b
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
7 changed files with 618 additions and 670 deletions

View file

@ -90,8 +90,9 @@ dontinstrument dontasan int PrintBacktraceUsingSymbols(
symbol = 0;
addend = 0;
}
if ((name = __get_symbol_name(st, symbol)) && __is_mangled(name)) {
__demangle(cxxbuf, name, sizeof(cxxbuf));
if ((name = __get_symbol_name(st, symbol)) &&
(_weaken(__is_mangled) && _weaken(__is_mangled)(name))) {
_weaken(__demangle)(cxxbuf, name, sizeof(cxxbuf));
kprintf("%012lx %lx %s%+d\n", frame, addr, cxxbuf, addend);
name = cxxbuf;
} else {