Hi,
On Sat, 24 Feb 2018, Yakov wrote:
I cannot addr2line get working with tcc, here is what I am trying:
-------------------
$ tcc -o exec main.c -lm -g -rdynamic
$ ./exec
exec(show_trace+0x24) [0x407690]
exec(obj_ctx_find+0xeb) [0x413733]
exec(dic_forEach+0xe9) [0x40758e]
exec(obj_serialize+0x120) [0x41577e]
exec(main+0x2e8) [0x41716a]
$ addr2line -e exec 0x41716a -i -p -s -f
main at ??:?
-------------------
Any idea why I get ??:? instead of a line number?
Works for me:
% tcc -o hello hello.c -lm -g -rdynamic
% addr2line -e hello 0x40060f -i -p -s -f
main at hello.c:5
So we'd need a bit more information, e.g. your binary, or output of
'objdump -gG' on the executable. I know that some binary tools in some
version have had problems when an executable mixes DWARF and .stabs debug
info, which occurs when your crt files contains debug info. I haven't
seen such problems in a long time, but who knows.
Also, which version of tcc are you using exactly? There were some changes
related to debug info around last year switch. See also:
http://lists.nongnu.org/archive/html/tinycc-devel/2017-12/msg00019.html
Ciao,
Michael.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel