summaryrefslogtreecommitdiffstats
path: root/tests/varlocs.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2022-05-10 15:22:32 +0200
committerMark Wielaard <[email protected]>2022-05-10 15:22:32 +0200
commite06d1d2530fa5d7eb898f3114d282bd196315d55 (patch)
tree1db2efd48765f9dc4c7e72abd936f860c1a9c9c5 /tests/varlocs.c
parente00652f54afca62c5facbaddebe21012acd43386 (diff)
parent059e690e896e37c16774047bd1fd0c9e608545b8 (diff)
Merge tag 'elfutils-0.187' into mjw/RH-DTSupstream/mjw/RH-DTS
elfutils 0.187 release
Diffstat (limited to 'tests/varlocs.c')
-rw-r--r--tests/varlocs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/varlocs.c b/tests/varlocs.c
index 152c6555..d2c13767 100644
--- a/tests/varlocs.c
+++ b/tests/varlocs.c
@@ -76,7 +76,7 @@ dwarf_encoding_string (unsigned int code)
if (likely (code < sizeof (known) / sizeof (known[0])))
return known[code];
- return NULL;
+ return "<unknown encoding>";
}
static const char *
@@ -88,7 +88,7 @@ dwarf_tag_string (unsigned int tag)
DWARF_ALL_KNOWN_DW_TAG
#undef DWARF_ONE_KNOWN_DW_TAG
default:
- return NULL;
+ return "<unknown tag>";
}
}
@@ -101,7 +101,7 @@ dwarf_attr_string (unsigned int attrnum)
DWARF_ALL_KNOWN_DW_AT
#undef DWARF_ONE_KNOWN_DW_AT
default:
- return NULL;
+ return "<unknown attr>";
}
}
@@ -114,7 +114,7 @@ dwarf_form_string (unsigned int form)
DWARF_ALL_KNOWN_DW_FORM
#undef DWARF_ONE_KNOWN_DW_FORM
default:
- return NULL;
+ return "<unknown form>";
}
}
@@ -160,7 +160,7 @@ dwarf_opcode_string (unsigned int code)
if (likely (code < sizeof (known) / sizeof (known[0])))
return known[code];
- return NULL;
+ return "<unknown opcode>";
}
// Forward reference for print_expr_block.
@@ -198,7 +198,6 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr, int depth)
uint8_t atom = expr->atom;
const char *opname = dwarf_opcode_string (atom);
- assert (opname != NULL);
switch (atom)
{