aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
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: