[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Get addr2line working with TinyCC

From: Michael Matz
Subject: Re: [Tinycc-devel] Get addr2line working with TinyCC
Date: Sun, 25 Feb 2018 00:06:07 +0100 (CET)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)


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:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]