summaryrefslogtreecommitdiff
path: root/gdb/expprint.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/expprint.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/expprint.c')
-rw-r--r--gdb/expprint.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index dc1f7f764fe..09d2efe1676 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -130,10 +130,8 @@ print_subexp_standard (struct expression *exp, int *pos,
case OP_REGISTER:
{
- int regnum = longest_to_int (exp->elts[pc + 1].longconst);
- const char *name = user_reg_map_regnum_to_name (current_gdbarch,
- regnum);
- (*pos) += 2;
+ const char *name = &exp->elts[pc + 2].string;
+ (*pos) += 3 + BYTES_TO_EXP_ELEM (exp->elts[pc + 1].longconst + 1);
fprintf_filtered (stream, "$%s", name);
return;
}
@@ -965,9 +963,8 @@ dump_subexp_body_standard (struct expression *exp,
elt += 2;
break;
case OP_REGISTER:
- fprintf_filtered (stream, "Register %ld",
- (long) exp->elts[elt].longconst);
- elt += 2;
+ fprintf_filtered (stream, "Register $%s", &exp->elts[elt + 1].string);
+ elt += 3 + BYTES_TO_EXP_ELEM (exp->elts[elt].longconst + 1);
break;
case OP_INTERNALVAR:
fprintf_filtered (stream, "Internal var @");