This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to decode back trace addresses manually?


Hi,

I tried "addr2line", it cannot find the symbols (i.e. print "??:00" )
and "readelf -s" output does not include the address I was looking for...

finally I was able to re-compile the library with "-rdynamic -g"
flags, but for some reason still cannot locate the symbol name,  not
via backtrace_symbols, nor using addr2line.

Is there anything else I should do to use these tools with a linux
shared library (.so) file?

thanks.
Han

On Sun, Jan 24, 2010 at 3:08 PM, Han <keepsimple@gmail.com> wrote:
> Thanks a lot Mike!
>
> Han
>
> On Sun, Jan 24, 2010 at 3:01 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>> On Sunday 24 January 2010 01:49:24 Han wrote:
>>> I am using ?backtrace and backtrace_symbols to print back traces in a
>>> C program. Sometimes it cannot print out the symbols and print only
>>> the hex address from a library. ?However it is a bit difficult for me
>>> to re-compile the library with -rdynamic option.
>>>
>>> My question is: can I manually decode the address given I have the
>>> source code and object files? ?Btw, I don't have to find out the line
>>> number, but at least the function names.
>>
>> use `addr2line` or `readelf -s`
>> -mike
>>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]