Summary: | addr2line _GLOBAL__sub_I__Z11print_tracev | ||
---|---|---|---|
Product: | binutils | Reporter: | Jonny Grant <jg> |
Component: | binutils | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED MOVED | ||
Severity: | normal | CC: | nickc |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: |
test case
compiled file |
Created attachment 11713 [details]
compiled file
Looks like it is just the "_GLOBAL__sub_I_" prefix which isn't recognised. $ c++filt _GLOBAL__sub_I__Z11print_tracev _GLOBAL__sub_I__Z11print_tracev $ $ c++filt _Z11print_tracev print_trace() $ $ c++filt --version GNU c++filt (GNU Binutils for Ubuntu) 2.30 Would be good if c++filt could also decode the symbol. (In reply to Jonny Grant from comment #2) Hi Jonny, > Looks like it is just the "_GLOBAL__sub_I_" prefix which isn't recognised. > Would be good if c++filt could also decode the symbol. Actually the code that needs to be updated is the libiberty library, which contains the name demangling code. (A quick look shows that it already has code to detect a __GLOBAL_ prefix, so there is precedence for this kind of thing). Unfortunately the libiberty library is maintained as part of the gcc project, not the binutils project. (It is used by the binutils in c++filt amongst other tools, but it is not maintained by us). So please could you refile this PR as an enhancement request with gcc ? Cheers Nick Hi Nick Thank you for pinpointing the library. ok I filed with gcc https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90039 Cheers, Jonny |
Created attachment 11712 [details] test case The attached test case, when compiled and run shows a symbol which isn't demangled by addr2line. I'll attach the file, and the compiled file _GLOBAL__sub_I__Z11print_tracev The output below shows it as item [2]. It is the same as running manually addr2line $ addr2line -f -C -e exception4 0x0000000000001600 _GLOBAL__sub_I__Z11print_tracev /home/jonny/code/crash/exception4.cpp:100 $ g++-8 -g -pipe -pthread -O1 -o exception4 exception4.cpp jonny@asus:~/code/crash$ ./exception4 Unhandled C++ exception: [vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)] Backtrace: [1]: ./exception4(+0x15c9) [0x56129dea75c9] 0x00000000000015c9 test() exception4.cpp:85 [2]: ./exception4(+0x1600) [0x56129dea7600] 0x0000000000001600 _GLOBAL__sub_I__Z11print_tracev exception4.cpp:100 [3]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fc0f8dd1b97] 0x0000000000000000 ?? ??:0 [4]: ./exception4(+0x10da) [0x56129dea70da] 0x00000000000010da _start ??:? Aborted