28d2bfb9c3
It is possible to use multiple base addresses within a single address range series, within the .debug_ranges section. The following is a simplified example for 32-bit addresses: .section ".debug_ranges" .4byte 0xffffffff .4byte BASE_1 .4byte START_OFFSET_1 .4byte END_OFFSET_1 .4byte START_OFFSET_2 .4byte END_OFFSET_2 .4byte 0xffffffff .4byte BASE_2 .4byte START_OFFSET_3 .4byte END_OFFSET_3 .4byte 0 .4byte 0 In this example START/END 1 and 2 are relative to BASE_1, while START/END 3 are relative to BASE_2. Currently gdb does not correctly parse this DWARF, resulting in corrupted address range information. This commit fixes this issue, and adds a new test to cover this case. In order to support testing of this feature extensions were made to the testsuite dwarf assembler, additional functionality was added to the .debug_line generation function, and a new function for generating the .debug_ranges section was added. gdb/ChangeLog: * dwarf2read.c (dwarf2_ranges_read): Unify and fix base address reading code. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-ranges-base.c: New file. * gdb.dwarf2/dw2-ranges-base.exp: New file. * lib/dwarf.exp (namespace eval Dwarf): Add new variables to support additional line table, and debug ranges generation. (Dwarf::ranges): New function, generate .debug_ranges. (Dwarf::lines): Support generating simple line table programs. (Dwarf::assemble): Initialise new namespace variables. |
||
---|---|---|
.. | ||
ada.exp | ||
append_gdb_boards_dir.exp | ||
build-piece.exp | ||
cache.exp | ||
cell.exp | ||
cl_util.c | ||
cl_util.h | ||
compiler.c | ||
compiler.cc | ||
cp-support.exp | ||
d-support.exp | ||
dtrace.exp | ||
dwarf.exp | ||
fortran.exp | ||
future.exp | ||
gdb-guile.exp | ||
gdb-python.exp | ||
gdb-utils.exp | ||
gdb.exp | ||
gdbserver-support.exp | ||
gen-perf-test.exp | ||
go.exp | ||
java.exp | ||
mi-support.exp | ||
objc.exp | ||
opencl.exp | ||
opencl_hostapp.c | ||
opencl_kernel.cl | ||
pascal.exp | ||
pdtrace.in | ||
perftest.exp | ||
prelink-support.exp | ||
prompt.exp | ||
range-stepping-support.exp | ||
read1.c | ||
selftest-support.exp | ||
set_unbuffered_mode.c | ||
trace-support.exp | ||
unbuffer_output.c |