diff options
| author | Roland McGrath <[email protected]> | 2007-10-23 13:07:39 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2007-10-23 13:07:39 +0000 |
| commit | e4c22ea004c02a58f5db5eb53794275344c17958 (patch) | |
| tree | ec3713d305f8e9f05b15d29240accc71e98998c5 /tests/dwfl-addr-sect.c | |
| parent | 98c5ead4ad9fbf96ad3b54d8ca26e354ddc3398d (diff) | |
2007-10-23 Roland McGrath <[email protected]>
* linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
module to appear first.
Diffstat (limited to 'tests/dwfl-addr-sect.c')
| -rw-r--r-- | tests/dwfl-addr-sect.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c index b1f29f7c..62d11541 100644 --- a/tests/dwfl-addr-sect.c +++ b/tests/dwfl-addr-sect.c @@ -37,8 +37,7 @@ #include ELFUTILS_HEADER(dwfl) #include <dwarf.h> - -static void +static int handle_address (Dwfl *dwfl, Dwarf_Addr address) { Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); @@ -46,12 +45,16 @@ handle_address (Dwfl *dwfl, Dwarf_Addr address) Dwarf_Addr bias; Elf_Scn *scn = dwfl_module_address_section (mod, &adjusted, &bias); if (scn == NULL) - error (EXIT_FAILURE, 0, "%#" PRIx64 ": dwfl_module_address_section: %s", - address, dwfl_errmsg (-1)); + { + error (0, 0, "%#" PRIx64 ": dwfl_module_address_section: %s", + address, dwfl_errmsg (-1)); + return 1; + } printf ("address %#" PRIx64 " => module \"%s\" section %zu + %#" PRIx64 "\n", address, dwfl_module_info (mod, NULL, NULL, NULL, NULL, NULL, NULL, NULL), elf_ndxscn (scn), adjusted); + return 0; } int @@ -74,7 +77,7 @@ main (int argc, char **argv) char *endp; uintmax_t addr = strtoumax (argv[remaining], &endp, 0); if (endp != argv[remaining]) - handle_address (dwfl, addr); + result |= handle_address (dwfl, addr); else result = 1; } |
