binutils-gdb/gdb/dwarf2
Tom Tromey 1a7c41d5ec Ignore 0,0 entries in .debug_aranges
When running the internal AdaCore test suite against the new DWARF
indexer, I found one regression on RISC-V.  The test in question uses
--gc-sections, and winds up with an entry in the middle of a
.debug_aranges that has both address and length of 0.  In this
scenario, gdb assumes the entries are terminated and then proceeds to
reject the section because it reads a subsequent entry as if it were a
header.

It seems to me that, because each header describes the size of each
.debug_aranges CU, it's better to simply ignore 0,0 entries and simply
read to the end.  That is what this patch does.

I've patched an existing test to provide a regression test for this.
2022-04-14 12:22:07 -06:00
..
abbrev-cache.c Introduce DWARF abbrev cache 2022-04-12 09:31:16 -06:00
abbrev-cache.h Introduce DWARF abbrev cache 2022-04-12 09:31:16 -06:00
abbrev.c Statically examine abbrev properties 2022-04-12 09:31:16 -06:00
abbrev.h Statically examine abbrev properties 2022-04-12 09:31:16 -06:00
attribute.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
attribute.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
comp-unit-head.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
comp-unit-head.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
cooked-index.c gdb: fix "passing NULL to memcpy" UBsan error in dwarf2/cooked-index.c 2022-04-12 14:42:02 -04:00
cooked-index.h gdb: remove move constructor and move assignment operator from cooked_index 2022-04-14 11:32:34 -04:00
cu.c Delete DWARF psymtab code 2022-04-12 09:31:17 -06:00
cu.h gdb: rename start_symtab/end_symtab to start_compunit_symtab/end_compunit_symtab 2022-04-04 12:58:07 -04:00
die.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
dwz.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
dwz.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
expr.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
expr.h Fix some stale header names from dwarf files 2022-03-22 09:33:49 +00:00
file-and-dir.h Add "fullname" handling to file_and_directory 2022-04-12 09:31:16 -06:00
frame-tailcall.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
frame-tailcall.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
frame.c Unify gdb printf functions 2022-03-29 12:46:24 -06:00
frame.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
index-cache.c Rename write_psymtabs_to_index 2022-04-12 09:31:16 -06:00
index-cache.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
index-common.c Add new overload of dwarf5_djb_hash 2022-04-12 09:31:16 -06:00
index-common.h Add new overload of dwarf5_djb_hash 2022-04-12 09:31:16 -06:00
index-write.c Delete DWARF psymtab code 2022-04-12 09:31:17 -06:00
index-write.h Rename write_psymtabs_to_index 2022-04-12 09:31:16 -06:00
leb.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
leb.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
line-header.c gdb: change file_file_name to return an std::string 2022-04-07 20:31:31 -04:00
line-header.h Delete DWARF psymtab code 2022-04-12 09:31:17 -06:00
loc.c gdb: remove symbol value macros 2022-04-11 10:45:36 -04:00
loc.h gdb/dwarf: pass an array of values to the dwarf evaluator 2022-04-03 17:18:20 +01:00
macro.c gdb: change file_file_name to return an std::string 2022-04-07 20:31:31 -04:00
macro.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
public.h Delete DWARF psymtab code 2022-04-12 09:31:17 -06:00
read.c Ignore 0,0 entries in .debug_aranges 2022-04-14 12:22:07 -06:00
read.h Remove dwarf2_per_cu_data::v 2022-04-12 09:31:17 -06:00
sect-names.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
section.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
section.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
stringify.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
stringify.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00