aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2002-01-11 09:32:50 +0000
committerJason Merrill <jason@redhat.com>2002-01-11 09:32:50 +0000
commitf1bea926d1d3e9f2ac6edae4ee28f9423cf7f650 (patch)
tree6b16e6354a4227a8ed968b1a80f7484c7d9a30a7 /gdb/dwarf2read.c
parenta0c1c92088b727dc4646bc5a949a62e2667bf2b8 (diff)
downloadgdb-f1bea926d1d3e9f2ac6edae4ee28f9423cf7f650.zip
gdb-f1bea926d1d3e9f2ac6edae4ee28f9423cf7f650.tar.gz
gdb-f1bea926d1d3e9f2ac6edae4ee28f9423cf7f650.tar.bz2
* dwarf2read.c (decode_locdesc): Implement DW_OP_litn, DW_OP_dup.
Fix DW_OP_minus.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7c78eb5..28317f2 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -5807,6 +5807,41 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
op = data[i++];
switch (op)
{
+ case DW_OP_lit0:
+ case DW_OP_lit1:
+ case DW_OP_lit2:
+ case DW_OP_lit3:
+ case DW_OP_lit4:
+ case DW_OP_lit5:
+ case DW_OP_lit6:
+ case DW_OP_lit7:
+ case DW_OP_lit8:
+ case DW_OP_lit9:
+ case DW_OP_lit10:
+ case DW_OP_lit11:
+ case DW_OP_lit12:
+ case DW_OP_lit13:
+ case DW_OP_lit14:
+ case DW_OP_lit15:
+ case DW_OP_lit16:
+ case DW_OP_lit17:
+ case DW_OP_lit18:
+ case DW_OP_lit19:
+ case DW_OP_lit20:
+ case DW_OP_lit21:
+ case DW_OP_lit22:
+ case DW_OP_lit23:
+ case DW_OP_lit24:
+ case DW_OP_lit25:
+ case DW_OP_lit26:
+ case DW_OP_lit27:
+ case DW_OP_lit28:
+ case DW_OP_lit29:
+ case DW_OP_lit30:
+ case DW_OP_lit31:
+ stack[++stacki] = op - DW_OP_lit0;
+ break;
+
case DW_OP_reg0:
case DW_OP_reg1:
case DW_OP_reg2:
@@ -5965,6 +6000,11 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
i += bytes_read;
break;
+ case DW_OP_dup:
+ stack[stacki + 1] = stack[stacki];
+ stacki++;
+ break;
+
case DW_OP_plus:
stack[stacki - 1] += stack[stacki];
stacki--;
@@ -5976,7 +6016,7 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
break;
case DW_OP_minus:
- stack[stacki - 1] = stack[stacki] - stack[stacki - 1];
+ stack[stacki - 1] -= stack[stacki];
stacki--;
break;