diff options
Diffstat (limited to 'tests/dwflsyms.c')
-rw-r--r-- | tests/dwflsyms.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c index 10c01f1f..19f1dbeb 100644 --- a/tests/dwflsyms.c +++ b/tests/dwflsyms.c @@ -106,13 +106,16 @@ addr_in_section (Elf *elf, GElf_Word shndx, GElf_Addr addr) static int list_syms (struct Dwfl_Module *mod, - void **user __attribute__ ((unused)), - const char *mod_name __attribute__ ((unused)), + void **user __attribute__ ((unused)), const char *mod_name, Dwarf_Addr low_addr __attribute__ ((unused)), void *arg __attribute__ ((unused))) { int syms = dwfl_module_getsymtab (mod); - assert (syms >= 0); + if (syms < 0) + { + printf ("%s: %s\n", mod_name, dwfl_errmsg (-1)); + return DWARF_CB_OK; + } for (int ndx = 0; ndx < syms; ndx++) { |