aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/ax-gdb.c2
-rw-r--r--gdb/expprint.c3
-rw-r--r--gdb/expression.h2
4 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5344067..aff420c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-21 Joel Brobecker <brobecker@adacore.com>
+
+ * expression.h (op_name): Add declaration.
+ * expprint.c (op_name): Remove declaration. Make non-static.
+ * ax-gdb.c (gen_expr): Use op_name instead of op_string.
+
2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
* amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index a76e781..aaefed6 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -2217,7 +2217,7 @@ gen_expr (struct expression *exp, union exp_element **pc,
default:
error (_("Unsupported operator %s (%d) in expression."),
- op_string (op), op);
+ op_name (exp, op), op);
}
}
diff --git a/gdb/expprint.c b/gdb/expprint.c
index d9d9b8f..fd1fccb 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -647,12 +647,11 @@ op_string (enum exp_opcode op)
/* Support for dumping the raw data from expressions in a human readable
form. */
-static char *op_name (struct expression *, enum exp_opcode);
static int dump_subexp_body (struct expression *exp, struct ui_file *, int);
/* Name for OPCODE, when it appears in expression EXP. */
-static char *
+char *
op_name (struct expression *exp, enum exp_opcode opcode)
{
return exp->language_defn->la_exp_desc->op_name (opcode);
diff --git a/gdb/expression.h b/gdb/expression.h
index be26002..ace58f2 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -137,6 +137,8 @@ extern struct value *evaluate_subexp_standard
extern void print_expression (struct expression *, struct ui_file *);
+extern char *op_name (struct expression *exp, enum exp_opcode opcode);
+
extern char *op_string (enum exp_opcode);
extern void dump_raw_expression (struct expression *,