binutils-gdb/gdb/testsuite/gdb.rust
Tom Tromey 3da4c6449b Change how .debug_aranges padding is skipped
When GCC emits .debug_aranges, it adds padding to align the contents
to two times the address size.  GCC has done this for many years --
but there is nothing in the DWARF standard that says this should be
done, and LLVM does not seem to add this padding.

It's simple to detect if the padding exists, though: if the contents
of one .debug_aranges CU (excluding the header) are not a multiple of
the alignment that GCC uses, then anything extra must be padding.

This patch changes gdb to correctly read both styles.  It removes the
requirement that the padding bytes be zero, as this seemed
unnecessarily pedantic to me.

gdb/ChangeLog
2021-06-25  Tom Tromey  <tom@tromey.com>

	* dwarf2/read.c (create_addrmap_from_aranges): Change padding
	logic.

gdb/testsuite/ChangeLog
2021-06-25  Tom Tromey  <tom@tromey.com>

	* lib/gdb.exp (add_gdb_index, ensure_gdb_index): Add "style"
	parameter.
	* gdb.rust/dwindex.exp: New file.
	* gdb.rust/dwindex.rs: New file.
2021-06-25 12:34:41 -06:00
..
dwindex.exp Change how .debug_aranges padding is skipped 2021-06-25 12:34:41 -06:00
dwindex.rs Change how .debug_aranges padding is skipped 2021-06-25 12:34:41 -06:00
expr.exp Improve code coverage of Rust testing 2021-04-22 07:16:36 -06:00
generics.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
generics.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
methods.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
methods.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
modules.exp Improve code coverage of Rust testing 2021-04-22 07:16:36 -06:00
modules.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
pp.exp Fix Python pretty-printing bug in Rust 2021-05-14 20:01:12 -06:00
pp.py Use is/is not to check for None in python code. 2021-06-08 23:49:05 +01:00
pp.rs Fix Python pretty-printing bug in Rust 2021-05-14 20:01:12 -06:00
rawids.exp Implement Rust raw identifiers 2021-06-11 08:14:09 -06:00
rawids.rs Implement Rust raw identifiers 2021-06-11 08:14:09 -06:00
rust-style.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
rust-style.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
simple.exp [PR gdb/22640] ptype: add option to use hexadecimal notation 2021-04-25 18:00:54 +01:00
simple.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
traits.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
traits.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
union.exp [PR gdb/22640] ptype: add option to use hexadecimal notation 2021-04-25 18:00:54 +01:00
union.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
unsized.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
unsized.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
watch.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
watch.rs Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00