This is the mail archive of the
mailing list for the elfutils project.
Re: [patch] Resolve ppc64 func descriptors as .func (via .opd)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 04 Dec 2012 18:30:09 +0100
- Subject: 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.