diff options
author | Andreas Schwab <schwab@suse.de> | 2017-07-11 17:36:35 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2017-07-11 17:40:24 +0200 |
commit | 04ac15ab07e6360320a1c8fab82d25340c22a21f (patch) | |
tree | 3ca51712e0e81136bb695e558894f54313542224 | |
parent | e3fbc3da1342714b4943300a5a590b73f00acf08 (diff) | |
download | gdb-04ac15ab07e6360320a1c8fab82d25340c22a21f.zip gdb-04ac15ab07e6360320a1c8fab82d25340c22a21f.tar.gz gdb-04ac15ab07e6360320a1c8fab82d25340c22a21f.tar.bz2 |
Add missing newlines in readelf -n output
* readelf.c (process_note): Print newline after description data
in narrow mode.
(print_core_note): Print newline if nothing was printed in wide
mode.
-rw-r--r-- | binutils/ChangeLog | 7 | ||||
-rw-r--r-- | binutils/readelf.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 8c12a49..254be5e 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2017-07-11 Andreas Schwab <schwab@suse.de> + + * readelf.c (process_note): Print newline after description data + in narrow mode. + (print_core_note): Print newline if nothing was printed in wide + mode. + 2017-07-09 Rafael Fontenelle <rafaelff@gnome.org> * dwarf.c (display_formatted_table): Fix error message typo. diff --git a/binutils/readelf.c b/binutils/readelf.c index c9c11a3..362c204 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -16217,7 +16217,11 @@ print_core_note (Elf_Internal_Note *pnote) unsigned char *descdata, *filenames, *descend; if (pnote->type != NT_FILE) - return TRUE; + { + if (do_wide) + printf ("\n"); + return TRUE; + } #ifndef BFD64 if (!is_32bit_elf) @@ -17497,6 +17501,8 @@ process_note (Elf_Internal_Note * pnote, printf (_(" description data: ")); for (i = 0; i < pnote->descsz; i++) printf ("%02x ", pnote->descdata[i]); + if (!do_wide) + printf ("\n"); } if (do_wide) |