hiho@ll
my prog creates a backtrace if an exception is thrown during runtime
i use my own Exception class for this purpose
the backtrace is done like
this
the problem is, this is a not easy to read
it causes something like this:
1079507548 ./../lib/libmaster.so.0(_ZN9ExceptionC1EiSsPcii+0x1bc) [0x4057fa5c]
1079462361 ./../lib/libmaster.so.0(_Z9tcpServeri+0x251) [0x405749d9]
1079511536 ./../lib/libmaster.so.0(_ZN8Net2FIFOC1EiP10FIFOStream+0x158) [0x405809f0]
1079489564 ./../lib/libmaster.so.0(_ZN6Master5startEv+0x240) [0x4057b41c]
134563775 ./masterdaemon(main+0x1285) [0x80547bf]
1075286624 /lib/tls/libc.so.6(__libc_start_main+0xe0) [0x40179260]
134538641 ./masterdaemon(__gxx_personality_v0+0x349) [0x804e591]
Q1: is it possible to rename "_ZN9ExceptionC1EiSsPcii+0x1bc" to the correct function/class name "Exception()"? if yes how?
Q2: what exactly does the above backtrace means?
i use the function backtrace(); and backtrace_symbols(); to create the addresses of the functions (the numbers on the left) and get the symbol strings (the right part of the lines). but what does this "[0x405809f0]" mean, or (_Z9tcpServeri+0x251) what does +0x251 means? and why has the main function the name "main+0x1285" and the other functions have some cryptic characters in the function name (i think it has something to do with classes/functionname, address space, ...)
Q3: anybody knows a better method to do a backtrace? i thought about using something like a "register/unregister" function at the beginning and end of each function, so i can do better human readable form of Stack trace
Q4: what stuff do you use when trying to debug linux progs which are released and maybe posted by some users? which information can i collect except a backtrace?
[EDIT]
Q5: if its possible to get the function symbols using backtrace_symbols(); is it possible to the variable symbols and it's values, so i can check which variables have which values?
[/EDIT]
thx@ll