dwarf: Don't omit second operand of '?' operator

This is a GNU C extension and is not valid in ISO C.

	* dwarf.c: Don't omit second operand of '?' operator.
This commit is contained in:
Michael Forney
2021-05-01 00:55:16 -07:00
committed by Alan Modra
parent 70993db314
commit 4896932e62
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2021-05-07 Michael Forney <mforney@mforney.org>
* dwarf.c: Don't omit second operand of '?' operator.
2021-04-30 Nick Clifton <nickc@redhat.com> 2021-04-30 Nick Clifton <nickc@redhat.com>
PR 27796 PR 27796

View File

@ -3826,9 +3826,13 @@ process_debug_info (struct dwarf_section * section,
offset_size == 8 ? "64-bit" : "32-bit"); offset_size == 8 ? "64-bit" : "32-bit");
printf (_(" Version: %d\n"), compunit.cu_version); printf (_(" Version: %d\n"), compunit.cu_version);
if (compunit.cu_version >= 5) if (compunit.cu_version >= 5)
{
const char *name = get_DW_UT_name (compunit.cu_unit_type);
printf (_(" Unit Type: %s (%x)\n"), printf (_(" Unit Type: %s (%x)\n"),
get_DW_UT_name (compunit.cu_unit_type) ?: "???", name ? name : "???",
compunit.cu_unit_type); compunit.cu_unit_type);
}
printf (_(" Abbrev Offset: 0x%s\n"), printf (_(" Abbrev Offset: 0x%s\n"),
dwarf_vmatoa ("x", compunit.cu_abbrev_offset)); dwarf_vmatoa ("x", compunit.cu_abbrev_offset));
printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size); printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size);