Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Getting source file name and line number

Is GNUElfBinaryObject.symbolLoadingAddr2line null by any chance? I'm not sure what the problem would be. Maybe you can create a bug, attach your binary and we can troubleshoot what's going on. Perhaps it is a bug.


From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Alexandre Montplaisir [alexmonthy@xxxxxxxxxxxx]
Sent: Friday, 04 September 2015 3:09 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Getting source file name and line number

Hi all,

I'm trying to use CDT to retrieve the source file name and line number
for a given offset in a shared object compiled with debugging symbols.
Basically, the functionality offered by "addr2line".

I've manged to get a IBinaryParser.IBinaryObject for my shared object.
Then I'm iterating on all its ISymbols. The symbols exist and match what
I would expect. But for all of them the getFileName() always returns
null, so I'm not sure how to get the source file name, let alone the
line numbers. addr2line works on the very same shared object.

The addresses I'm looking for don't exactly match a symbol (function or
variable name), but I've used ISymbol because that's the only thing I
saw that has the notion of address -> line number. Could that be the
problem? Or is my approach wrong?

cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top