Commit 43bcff91 authored by Yunlian Jiang's avatar Yunlian Jiang
Browse files

gdb: fix "optimized out" error with debug fission.

This patch comes from
https://sourceware.org/ml/gdb-patches/2016-04/msg00658.html
The bug entry is
https://sourceware.org/bugzilla/show_bug.cgi?id=19999

This patch fixes symtab/19999.
The problem here is that while we don't want to add the DWARF "base address"
for DWO files (where addresses come from .debug_addr where the base address
has already been added), we still need to add base_offset for PIE.

Regression tested on amd64-linux.

2016-04-29  Doug Evans  <dje@google.com>

	PR symtab/19999
	* dwarf2loc.c (dwarf2_find_location_expression): For DWO files still
	add base_offset.

	testsuite/
	* lib/dwarf.exp (build_executable_from_fission_assembler): Pass
	$options when building executable.
	* gdb.dwarf2/fission-loclists-pie.S: New file.
	* gdb.dwarf2/fission-loclists-pie.exp: New file.

BUG=chromium:439320
TEST=the unittest in the patch passe
parent 60aaeb2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment