summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/readelf.c b/src/readelf.c
index 2eba7e9d..90c460f9 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -4041,8 +4041,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
if (unlikely (dwarf_formaddr (attrp, &addr) != 0))
{
attrval_out:
- error (0, 0, gettext ("offset: %" PRIx64 " cannot get attribute value: %s"),
- attrp->valp - (unsigned char *) attrp->cu->dbg->sectiondata[IDX_debug_info]->d_buf,
+ error (0, 0, gettext ("cannot get attribute value: %s"),
dwarf_errmsg (-1));
return DWARF_CB_ABORT;
}
@@ -4286,7 +4285,7 @@ print_debug_info_section (Dwfl_Module *dwflmod,
int tag = dwarf_tag (&dies[level]);
if (unlikely (tag == DW_TAG_invalid))
{
- error (0, 0, gettext ("cannot get tag of DIE at offset %" PRIx64
+ error (0, 0, gettext ("cannot get tag of DIE at offset %" PRIu64
" in section '%s': %s"),
(uint64_t) offset, ".debug_info", dwarf_errmsg (-1));
goto do_return;
@@ -4310,10 +4309,8 @@ print_debug_info_section (Dwfl_Module *dwflmod,
if (res > 0)
{
while ((res = dwarf_siblingof (&dies[level], &dies[level])) == 1)
- {
- if (level-- == 0)
- break;
- }
+ if (level-- == 0)
+ break;
if (unlikely (res == -1))
{