diff options
author | Nick Clifton <nickc@redhat.com> | 2020-05-05 16:16:03 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-05-05 16:16:03 +0100 |
commit | 546cb2d85eddba4f56dfbcb0288db68243e3a0fd (patch) | |
tree | 35769bf0625cb16c6d8bd6ec734a8648ccfd2bc4 /gas | |
parent | 7d0bd4874453d781a0e6e998b47422f968907bdb (diff) | |
download | gdb-546cb2d85eddba4f56dfbcb0288db68243e3a0fd.zip gdb-546cb2d85eddba4f56dfbcb0288db68243e3a0fd.tar.gz gdb-546cb2d85eddba4f56dfbcb0288db68243e3a0fd.tar.bz2 |
Restore readelf's warnings that describe real problems with the file being examined. Fix bug displaying empty file name tables.
binutils* dwarf.c (do_checks): New global variable.
(display_formatted_table): Warn about an unexpected number of
columns in the table, if checks are enabled. Do not complain
about the lack of data following the number of entries in the
table if the table is empty.
(display_debug_lines_decoded): Only warn about an unexpected
number of columns in a table if checks are enabled.
* dwarf.h (do_checks): Add a prototype.
* elfcomm.c (error): Remove weak attribute.
(warn): Likewise.
* readelf.c (do_checks): Delete.
(warn): Delete.
(process_section_headers): Only warn about empty sections if
checks are enabled.
gas * dwarf2dbg.c (out_dir_and_file_list): Add comments describing the
construction of a DWARF-5 directory name table.
* testsuite/gas/elf/pr25917.d: Update expected output.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/dwarf2dbg.c | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/pr25917.d | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1a4f01a..3ad9fb3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2020-05-05 Nick Clifton <nickc@redhat.com> + + * dwarf2dbg.c (out_dir_and_file_list): Add comments describing the + construction of a DWARF-5 directory name table. + * testsuite/gas/elf/pr25917.d: Update expected output. + 2020-05-05 Gunther Nikl <gnikl@justmail.de> * config/tc-rx.c (elf_flags): Initialize for non-linux targets. diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 071450e..69955fe 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -1983,11 +1983,16 @@ out_dir_and_file_list (void) /* Output the Directory Table. */ if (DWARF2_LINE_VERSION >= 5) { + /* We only have one column in the directory table. */ out_byte (1); + + /* Describe the purpose and format of the column. */ out_uleb128 (DW_LNCT_path); /* FIXME: it would be better to store these strings in the .debug_line_str section and reference them here. */ out_uleb128 (DW_FORM_string); + + /* Now state how many rows there are in the table. */ out_uleb128 (dirs_in_use); } diff --git a/gas/testsuite/gas/elf/pr25917.d b/gas/testsuite/gas/elf/pr25917.d index 6f83bbb..ce031e7 100644 --- a/gas/testsuite/gas/elf/pr25917.d +++ b/gas/testsuite/gas/elf/pr25917.d @@ -1,9 +1,9 @@ #as: --gdwarf-5 -#name: DWARF5: no files or directories +#name: DWARF5: no files or directories (PR 25917) #readelf: -wl #... The Directory Table is empty. - No Line Number Statements. + The File Name Table is empty. #pass |