aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2010-06-04 21:39:47 +0000
committerSergio Durigan Junior <sergiodj@redhat.com>2010-06-04 21:39:47 +0000
commit554794dcf26bc2b4d9e9286c8000182b54554dd6 (patch)
tree296c4648c88766d3fb6c45c55af3e387de563cd7 /gdb
parentbddaacb97a341ad5d4e4f808eee50cc8a40ae17e (diff)
downloadgdb-554794dcf26bc2b4d9e9286c8000182b54554dd6.zip
gdb-554794dcf26bc2b4d9e9286c8000182b54554dd6.tar.gz
gdb-554794dcf26bc2b4d9e9286c8000182b54554dd6.tar.bz2
2010-06-04 Sergio Durigan Junior <sergiodj@redhat.com>
* ada-lang.c (ada_operator_length): Constify `struct expression'. * parse.c (operator_length): Likewise. (operator_length_standard): Likewise. * parser-defs.h (operator_length): Likewise. (operator_length_standard): Likewise. (struct exp_descriptor <operator_length>): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/ada-lang.c3
-rw-r--r--gdb/parse.c5
-rw-r--r--gdb/parser-defs.h7
4 files changed, 18 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d22f917..48c688e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-04 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * ada-lang.c (ada_operator_length): Constify `struct expression'.
+ * parse.c (operator_length): Likewise.
+ (operator_length_standard): Likewise.
+ * parser-defs.h (operator_length): Likewise.
+ (operator_length_standard): Likewise.
+ (struct exp_descriptor <operator_length>): Likewise.
+
2010-06-04 Doug Evans <dje@google.com>
Add support for enabling/disabling individual pretty-printers.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index be0c53b..1d4c38b 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -11084,7 +11084,8 @@ ada_decode_assert_location (char *args, char **addr_string,
OP_DEFN (OP_DISCRETE_RANGE, 1, 2, 0)
static void
-ada_operator_length (struct expression *exp, int pc, int *oplenp, int *argsp)
+ada_operator_length (const struct expression *exp, int pc, int *oplenp,
+ int *argsp)
{
switch (exp->elts[pc - 1].opcode)
{
diff --git a/gdb/parse.c b/gdb/parse.c
index 1c8b350..c885c6a 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -791,7 +791,8 @@ length_of_subexp (struct expression *expr, int endpos)
operator takes. */
void
-operator_length (struct expression *expr, int endpos, int *oplenp, int *argsp)
+operator_length (const struct expression *expr, int endpos, int *oplenp,
+ int *argsp)
{
expr->language_defn->la_exp_desc->operator_length (expr, endpos,
oplenp, argsp);
@@ -800,7 +801,7 @@ operator_length (struct expression *expr, int endpos, int *oplenp, int *argsp)
/* Default value for operator_length in exp_descriptor vectors. */
void
-operator_length_standard (struct expression *expr, int endpos,
+operator_length_standard (const struct expression *expr, int endpos,
int *oplenp, int *argsp)
{
int oplen = 1;
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 864f789..bb79ae1 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -188,9 +188,10 @@ extern int dump_subexp (struct expression *, struct ui_file *, int);
extern int dump_subexp_body_standard (struct expression *,
struct ui_file *, int);
-extern void operator_length (struct expression *, int, int *, int *);
+extern void operator_length (const struct expression *, int, int *, int *);
-extern void operator_length_standard (struct expression *, int, int *, int *);
+extern void operator_length_standard (const struct expression *, int, int *,
+ int *);
extern int operator_check_standard (struct expression *exp, int pos,
int (*objfile_func)
@@ -273,7 +274,7 @@ struct exp_descriptor
/* Returns number of exp_elements needed to represent an operator and
the number of subexpressions it takes. */
- void (*operator_length) (struct expression*, int, int*, int *);
+ void (*operator_length) (const struct expression*, int, int*, int *);
/* Call TYPE_FUNC and OBJFILE_FUNC for any TYPE and OBJFILE found being
referenced by the single operator of EXP at position POS. Operator