binutils-gdb/gdb/dwarf2
nitachra 6dc55ce97d Fix for the complaint observed when symbol reading due to unsupported .debug_names form
Following complaint is observed with the executable compiled with -gdwarf-5
and -gpubnames flags - "During symbol reading: Unsupported .debug_names form
DW_FORM_ref4".  This is the form corresponding to DW_IDX_die_offset attribute.
This patch fixes this complaint.  Tested with clang 10.0.0.  Test case used -

int main()
{
int sum,a,b;
sum = a + b;
return sum;
}

clang -gdwarf-5 -gpubnames test.c -o test.out

gdb -q test.out -ex "set complaints 1" -ex "start"

Reading symbols from test.out...
During symbol reading: Unsupported .debug_names form DW_FORM_ref4 \
  [in module test.out]
Temporary breakpoint 1 at 0x400484
Starting program: test.out
During symbol reading: Unsupported .debug_names form DW_FORM_ref4 \
  [in module test.out]
During symbol reading: Unsupported .debug_names form DW_FORM_ref4 \
  [in module test.out]
During symbol reading: Unsupported .debug_names form DW_FORM_ref4 \
  [in module test.out]

gdb/dwarf2/ChangeLog:

2020-05-09  Nitika Achra  <Nitika.Achra@amd.com>

	PR symtab/25952
	* read.c (dw2_debug_names_iterator::next): Handle DW_FORM_ref*
	and DW_IDX_die_offset.  If there is no compilation unit attribute in
	the index entry, then there is a single CU.  Return the CU at O index
	of compilation unit vector.

gdb/testsuite/ChangeLog:

2020-05-09  Tom de Vries  <tdevries@suse.de>

	* gdb.dwarf2/clang-debug-names.exp: Remove PR25952 kfail.
2020-05-09 10:03:51 +02:00
..
abbrev.c Don't pass NULL to memcpy in gdb 2020-03-31 07:29:53 -06:00
abbrev.h Use htab_up in abbrev_table 2020-02-08 13:43:24 -07:00
attribute.c Add attribute::value_as_string method 2020-04-24 15:35:02 -06:00
attribute.h Add attribute::value_as_string method 2020-04-24 15:35:02 -06:00
comp-unit.c Convert read_address to a method on comp_unit_head 2020-02-08 13:43:24 -07:00
comp-unit.h Convert read_address to a method on comp_unit_head 2020-02-08 13:43:24 -07:00
die.h Rewrite new die_info methods 2020-03-26 09:28:26 -06:00
dwz.c Add dwz.c and dwz_file::read_string 2020-03-26 09:28:09 -06:00
dwz.h Add dwz.c and dwz_file::read_string 2020-03-26 09:28:09 -06:00
expr.c Move DWARF code to dwarf2/ subdirectory 2020-02-08 13:40:59 -07:00
expr.h Move DWARF code to dwarf2/ subdirectory 2020-02-08 13:40:59 -07:00
frame-tailcall.c Fix remaining inline/tailcall unwinding breakage for x86_64 2020-04-27 09:04:55 -03:00
frame-tailcall.h Move DWARF code to dwarf2/ subdirectory 2020-02-08 13:40:59 -07:00
frame.c Change get_objfile_arch to a method on objfile 2020-04-18 08:35:04 -06:00
frame.h Don't forward-declare struct objfile in dwarf2/frame.h 2020-02-11 17:57:46 -07:00
index-cache.c Update more calls to add_prefix_cmd 2020-05-03 11:31:20 -06:00
index-cache.h Move DWARF code to dwarf2/ subdirectory 2020-02-08 13:40:59 -07:00
index-common.c Move DWARF code to dwarf2/ subdirectory 2020-02-08 13:40:59 -07:00
index-common.h Move DWARF code to dwarf2/ subdirectory 2020-02-08 13:40:59 -07:00
index-write.c Change get_objfile_arch to a method on objfile 2020-04-18 08:35:04 -06:00
index-write.h Move DWARF code to dwarf2/ subdirectory 2020-02-08 13:40:59 -07:00
leb.c Move read_offset_1 to leb.c 2020-02-08 13:43:24 -07:00
leb.h Move two more functions to dwarf2/leb.h 2020-02-08 13:43:24 -07:00
line-header.c Move more code to line-header.c 2020-03-26 09:28:20 -06:00
line-header.h Move more code to line-header.c 2020-03-26 09:28:20 -06:00
loc.c Prefer existing data when evaluating DWARF expression 2020-04-24 13:40:31 -06:00
loc.h Prefer existing data when evaluating DWARF expression 2020-04-24 13:40:31 -06:00
macro.c Trivial fix in dwarf_decode_macro_bytes 2020-03-26 09:28:18 -06:00
macro.h Use a const dwarf2_section_info in macro reader 2020-03-26 09:28:17 -06:00
read.c Fix for the complaint observed when symbol reading due to unsupported .debug_names form 2020-05-09 10:03:51 +02:00
read.h gdb: small cleanups in dwarf2_psymtab constructors 2020-04-07 11:48:46 -04:00
section.c Add dwarf2_section_info::read_string method 2020-03-26 09:28:14 -06:00
section.h Add dwarf2_section_info::read_string method 2020-03-26 09:28:14 -06:00
stringify.c Move DWARF-constant stringifying code to new file 2020-03-26 09:28:26 -06:00
stringify.h Move DWARF-constant stringifying code to new file 2020-03-26 09:28:26 -06:00