Closed Ace-Radom closed 11 months ago
So if I understand you correctly, you get the correct demangled dump when you run the examples but not when it's integrated with your software.
Typically when that happens it's due to not linking with access to the object symbols. Exactly how you do this is dependent on your compiler and platform.
Typically when that happens it's due to not linking with access to the object symbols. Exactly how you do this is dependent on your compiler and platform.
Thanks for your response xD
I added -rdynamic
to global compile flags and it does solve my problem. Again thx a lot.
I tried to use g3log in my project, and I realized that the library cannot get real function name when the program crashes. I also tried with the examples provided with the library, it didn't work either.
I get a dump like (with the example
g3log-FATAL-choice
, run in a separate thread, choice 14):I picked out all programs for crash handling in file
src/crashhandler_unix.cpp
and did some tests. It seems like most of the times there is no mangled name before+
. Therefore I got an emptymangled_name
here, always.https://github.com/KjellKod/g3log/blob/63f327270325d827181ae1eaa0a4601c61fba67e/src/crashhandler_unix.cpp#L167-L171
And also,
__cxa_demangle
never works. I'm not sure if it's also caused by the same issue.I'm wondering if it is normal? If not, what may be wrong?