summaryrefslogtreecommitdiff
path: root/gdb/parse.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-06-13 17:11:09 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-06-13 17:11:09 +0000
commit3342abff4d17f23376cf9e594c08d28ef47e0968 (patch)
treecbaa250948dc1719135fd5d13ca1831b3892b918 /gdb/parse.c
parent3e1f43c886b2b160c498d8c9094bff2ca03d8035 (diff)
downloadgdb-3342abff4d17f23376cf9e594c08d28ef47e0968.tar.gz
* expression.h (enum exp_opcode): Document a register name for
OP_REGISTER. * parse.c (write_dollar_variable): Write the register name for OP_REGISTER. (operator_length_standard): Expect the register name following OP_REGISTER. * ada-lang.c (resolve_subexp): Likewise. * ax-gdb.c (gen_expr): Likewise. * eval.c (evaluate_subexp_standard): Likewise. * expprint.c (print_subexp_standard, dump_subexp_body_standard): Likewise. * tracepoint.c (encode_actions): Likewise.
Diffstat (limited to 'gdb/parse.c')
-rw-r--r--gdb/parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/parse.c b/gdb/parse.c
index 3284af3cdfb..0c7dfd852ee 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -548,7 +548,9 @@ handle_last:
return;
handle_register:
write_exp_elt_opcode (OP_REGISTER);
- write_exp_elt_longcst (i);
+ str.length--;
+ str.ptr++;
+ write_exp_string (str);
write_exp_elt_opcode (OP_REGISTER);
return;
}
@@ -717,7 +719,6 @@ operator_length_standard (struct expression *expr, int endpos,
case OP_TYPE:
case OP_BOOL:
case OP_LAST:
- case OP_REGISTER:
case OP_INTERNALVAR:
oplen = 3;
break;
@@ -772,6 +773,7 @@ operator_length_standard (struct expression *expr, int endpos,
case STRUCTOP_PTR:
args = 1;
/* fall through */
+ case OP_REGISTER:
case OP_M2_STRING:
case OP_STRING:
case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant */