aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-12-02 17:01:20 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-12-02 17:01:20 +0000
commit585861ead5776f239380a5e16077dcfbd268a072 (patch)
tree775f29fef4f7bad7f4029aefe70cf7b6e6320fa9 /gdb/dwarf2read.c
parent968643aaa917f8d1b87ebe6d37e91056e2083756 (diff)
downloadgdb-585861ead5776f239380a5e16077dcfbd268a072.zip
gdb-585861ead5776f239380a5e16077dcfbd268a072.tar.gz
gdb-585861ead5776f239380a5e16077dcfbd268a072.tar.bz2
gdb/
PR threads/13448 * dwarf2read.c (decode_locdesc): Handle DW_OP_const8u. For DW_OP_GNU_push_tls_address increment the value, new comment for it. gdb/testsuite/ PR threads/13448 * gdb.dwarf2/dw2-var-zero-addr.S: New file. * gdb.dwarf2/dw2-var-zero-addr.exp: New file. * gdb.threads/tls-var-main.c: New file. * gdb.threads/tls-var.c: New file. * gdb.threads/tls-var.exp: New file.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index a72e5af..b649547 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -14668,6 +14668,11 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
i += 4;
break;
+ case DW_OP_const8u:
+ stack[++stacki] = read_8_bytes (objfile->obfd, &data[i]);
+ i += 8;
+ break;
+
case DW_OP_constu:
stack[++stacki] = read_unsigned_leb128 (NULL, (data + i),
&bytes_read);
@@ -14715,9 +14720,12 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
/* Nothing should follow this operator, so the top of stack would
be returned. */
/* This is valid for partial global symbols, but the variable's
- address will be bogus in the psymtab. */
+ address will be bogus in the psymtab. Make it always at least
+ non-zero to not look as a variable garbage collected by linker
+ which have DW_OP_addr 0. */
if (i < size)
dwarf2_complex_location_expr_complaint ();
+ stack[stacki]++;
break;
case DW_OP_GNU_uninit: