summaryrefslogtreecommitdiffstats
path: root/libdwfl
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2022-05-15 21:53:41 +0200
committerMark Wielaard <mark@klomp.org>2022-05-27 17:09:51 +0200
commitb8713b3fd0617415c76df8c9da70f8e2f26d3134 (patch)
tree6796142d1445f93de617cb7b57fa1b4d500acdc9 /libdwfl
parentdebuginfod: update mtime of interval_path as early as possible (diff)
downloadelfutils-b8713b3fd0617415c76df8c9da70f8e2f26d3134.tar.gz
elfutils-b8713b3fd0617415c76df8c9da70f8e2f26d3134.tar.bz2
elfutils-b8713b3fd0617415c76df8c9da70f8e2f26d3134.tar.xz
libdwfl: Update docs and nonnull attributes for dwfl_module_addrinfo
Make clear that both the offset and sym arguments cannot be NULL. https://bugzilla.redhat.com/show_bug.cgi?id=1986555 Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/libdwfl.h32
2 files changed, 21 insertions, 16 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 76053039..b3ca56cb 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
12022-05-15 Mark Wielaard <mark@klomp.org>
2
3 * libdwfl.h (dwfl_module_addrinfo): Update docs and nonnull
4 attribute to make clear offset and sym cannot be NULL.
5
12022-04-22 Mark Wielaard <mark@klomp.org> 62022-04-22 Mark Wielaard <mark@klomp.org>
2 7
3 * debuginfod-client.c (init_control): New static pthread_once_t. 8 * debuginfod-client.c (init_control): New static pthread_once_t.
diff --git a/libdwfl/libdwfl.h b/libdwfl/libdwfl.h
index f98f1d52..c55a8eaa 100644
--- a/libdwfl/libdwfl.h
+++ b/libdwfl/libdwfl.h
@@ -473,26 +473,26 @@ extern const char *dwfl_module_addrname (Dwfl_Module *mod, GElf_Addr address);
473 when nothing was found. If the architecture uses function 473 when nothing was found. If the architecture uses function
474 descriptors, and symbol st_value points to one, ADDRESS will be 474 descriptors, and symbol st_value points to one, ADDRESS will be
475 matched against either the adjusted st_value or the associated 475 matched against either the adjusted st_value or the associated
476 function entry value as described in dwfl_module_getsym_info. If 476 function entry value as described in dwfl_module_getsym_info.
477 OFFSET is not NULL it will be filled in with the difference from 477 OFFSET will be filled in with the difference from the start of the
478 the start of the symbol (or function entry). If SYM is not NULL it 478 symbol (or function entry), OFFSET cannot be NULL. SYM is filled
479 is filled in with the symbol associated with the matched ADDRESS. 479 in with the symbol associated with the matched ADDRESS, SYM cannot
480 The SYM->ST_VALUE itself isn't adjusted in any way. Fills in ELFP, 480 be NULL. The SYM->ST_VALUE itself isn't adjusted in any way.
481 if not NULL, with the ELF file the symbol originally came from. 481 Fills in ELFP, if not NULL, with the ELF file the symbol originally
482 Note that symbols can come from either the main, debug or auxiliary 482 came from. Note that symbols can come from either the main, debug
483 ELF symbol file (either dynsym or symtab). If SHNDXP is non-null, 483 or auxiliary ELF symbol file (either dynsym or symtab). If SHNDXP
484 it's set with the section index (whether from st_shndx or extended 484 is non-null, it's set with the section index (whether from st_shndx
485 index table). Fills in BIAS, if not NULL, with the difference 485 or extended index table). Fills in BIAS, if not NULL, with the
486 between addresses within the loaded module and those in symbol 486 difference between addresses within the loaded module and those in
487 table of the ELF file. Note that the address matched against the 487 symbol table of the ELF file. Note that the address matched
488 symbol might be in a different section than the returned symbol. 488 against the symbol might be in a different section than the
489 The section in the main elf file in ADDRESS falls can be found with 489 returned symbol. The section in the main elf file in ADDRESS falls
490 dwfl_module_address_section. */ 490 can be found with dwfl_module_address_section. */
491extern const char *dwfl_module_addrinfo (Dwfl_Module *mod, GElf_Addr address, 491extern const char *dwfl_module_addrinfo (Dwfl_Module *mod, GElf_Addr address,
492 GElf_Off *offset, GElf_Sym *sym, 492 GElf_Off *offset, GElf_Sym *sym,
493 GElf_Word *shndxp, Elf **elfp, 493 GElf_Word *shndxp, Elf **elfp,
494 Dwarf_Addr *bias) 494 Dwarf_Addr *bias)
495 __nonnull_attribute__ (3); 495 __nonnull_attribute__ (3, 4);
496 496
497/* Find the symbol that ADDRESS lies inside, and return detailed 497/* Find the symbol that ADDRESS lies inside, and return detailed
498 information as for dwfl_module_getsym (above). Note that like 498 information as for dwfl_module_getsym (above). Note that like