Hi Martin, On Wed, Mar 06, 2024 at 04:22:49PM -0300, Martin Rodriguez Reboredo wrote: > Added new functions dwfl_get_offline_next_address and > dwfl_set_offline_next_address which will get plus set said field from > the Dwfl struct. This is a requirement for listing functions from their > addresses when using libdwfl offline, otherwise wrong symbols are going > to be returned.
Could you show an example of when/where you need it and what address you set it to? The offline_next_address is only relevant for ET_REL files (like object files or kernel modules). In general you will need to check the bias, which various dwfl functions return to know the difference between the addresses in the ELF, Dwarf or the module load address. That said, readelf, nm and dwfl_argp do "cheat" by setting the offline_next_address to zero if they know they are just inspecting a single object file. So maybe this is a functionality we need to expose. But I don't fully understand why you need both a getter and a setter for any arbitrary address. Thanks, Mark