+2019-07-25 Tom de Vries <vries@gcc.gnu.org>
+
+ PR 24809
+ * dwarf.c (display_debug_names): Display the contents of the
+ augmentation string, if it is printable.
+
2019-07-25 Nick Clifton <nickc@redhat.com>
PR 24837
#include "dwarf.h"
#include "gdb/gdb-index.h"
#include "filenames.h"
+#include "safe-ctype.h"
#include <assert.h>
#undef MAX
uint32_t augmentation_string_size;
unsigned int i;
unsigned long sec_off;
+ bfd_boolean augmentation_printable;
+ const char *augmentation_string;
unit_start = hdrptr;
augmentation_string_size);
augmentation_string_size += (-augmentation_string_size) & 3;
}
+
printf (_("Augmentation string:"));
+
+ augmentation_printable = TRUE;
+ augmentation_string = (const char *) hdrptr;
+
for (i = 0; i < augmentation_string_size; i++)
{
unsigned char uc;
SAFE_BYTE_GET_AND_INC (uc, hdrptr, 1, unit_end);
printf (" %02x", uc);
+
+ if (uc != 0 && !ISPRINT (uc))
+ augmentation_printable = FALSE;
+ }
+
+ if (augmentation_printable)
+ {
+ printf (" (\"");
+ for (i = 0;
+ i < augmentation_string_size && augmentation_string[i];
+ ++i)
+ putchar (augmentation_string[i]);
+ printf ("\")");
}
- putchar ('\n');
putchar ('\n');
printf (_("CU table:\n"));