This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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: [patch] Resolve ppc64 func descriptors as .func (via .opd)


On Tue, 04 Dec 2012 18:00:50 +0100, Mark Wielaard wrote:
> Yes, because dwfl_module_addrsym resolves symbol values, not addresses.

OK but then dwfl_module_addrsym should be removed.  Or at least renamed to
prevent such error happening for 99% of dwfl_module_addrsym callers.


> Why would they? If they want to resolve a code address they should use
> the new dwfl_module_codesym function. If they want to resolve an address
> to a symbol value they should use dwfl_module_addrsym.

Because in 99% (100%?) of cases you do not know and do not care which type of
address you want to resolve.  See addr2line -S.

Even if you think you have a code address - like in a crash backtrace - you
could have crashed due to a jump to data buffer.  In such case you should
display name of the buffer variable, despite you expected a code address.


Thanks,
Jan

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