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 2/4] Provide __libdwfl_module_getsym to get dwfl_file *


On Wed, 2013-11-06 at 22:10 +0100, Jan Kratochvil wrote:
>     Provide __libdwfl_module_getsym to get dwfl_file *
>     
>     libdwfl/
>     2013-11-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
>     
>     	Provide __libdwfl_module_getsym to get dwfl_file *.
>     	* dwfl_module_addrsym.c (dwfl_module_addrsym) (i_to_symfile): Remove.
>     	(dwfl_module_addrsym) (search_table): New variable file.  Use
>     	__libdwfl_module_getsym.  Use file.
>     	* dwfl_module_getsym.c (dwfl_module_getsym): Rename to ...
>     	(__libdwfl_module_getsym): ... here.  Add parameter filep.  Set it.
>     	(dwfl_module_getsym): New wrapper.
>     	* libdwflP.h (__libdwfl_module_getsym): New declaration.

This is nice, it makes sure dwfl_module_getsym and dwfl_module_addrsym
are automatically in sync regarding the file the symbol comes from.
Looks good, please apply.

So, I think the user might also want to get hold of the file. Do you
think it makes sense to provide the user with extended versions of
getsym and addrsym based on this?

const char *dwfl_module_getsym_elf (Dwfl_Module *mod, int ndx,
                                    GElf_Sym *sym, GElf_Word *shndxp,
                                    Elf *elf)

char *dwfl_module_addrsym_elf (Dwfl_Module *mod, GElf_Addr address,
                               GElf_Sym *sym, GElf_Word *shndxp,
                               Elf *elf)

Where elf will be the main or debug file.

Thanks,

Mark


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