aboutsummaryrefslogtreecommitdiff
path: root/gdb/parse.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-03 19:59:14 +0000
committerTom Tromey <tromey@redhat.com>2012-12-03 19:59:14 +0000
commit270140bd2556ce2b0b9c32ecb31e1dcb3fc1887a (patch)
tree0a67f00fbc1d4e19d14b4b724b40559bb8e0b833 /gdb/parse.c
parente6aea42dfaf13c0e0ca10fa604537a2f43ce9ae9 (diff)
downloadgdb-270140bd2556ce2b0b9c32ecb31e1dcb3fc1887a.zip
gdb-270140bd2556ce2b0b9c32ecb31e1dcb3fc1887a.tar.gz
gdb-270140bd2556ce2b0b9c32ecb31e1dcb3fc1887a.tar.bz2
* ada-exp.y (write_object_renaming, write_var_or_type)
(write_ambiguous_var, write_var_from_sym): Make blocks const. * ada-lang.c (replace_operator_with_call) (find_old_style_renaming_symbol): Make blocks const. * ada-lang.h (ada_find_renaming_symbol): Update. (struct ada_symbol_info) <block>: Now const. * breakpoint.c (watch_command_1): Update. * breakpoint.h (struct watchpoint) <exp_valid_block, cond_exp_valid_block>: Now const. * c-exp.y (classify_inner_name, classify_name): Make block argument const. * expprint.c (print_subexp_standard) <OP_VAR_VALUE>: Make 'b' const. * expression.h (innermost_block, parse_exp_1): Update. (union exp_element) <block>: Now const. * gdbtypes.c (lookup_template_type, lookup_enum, lookup_union) (lookup_struct): Make block argument const. * gdbtypes.h (lookup_template_type): Update. * go-exp.y (classify_name, classify_packaged_name) (package_name_p): Make block argument const. * objc-lang.c (lookup_struct_typedef): Make block argument const. * objc-lang.h (lookup_struct_typedef): Update. * parse.c (parse_exp_in_context, parse_exp_1) (write_exp_elt_block): Make block arguments const. (expression_context_block, innermost_block): Now const. * parser-defs.h (write_exp_elt_block): Update. (expression_context_block, innermost_block, block_found): Now const. * printcmd.c (struct display) <block>: Now const. * symtab.h (lookup_struct, lookup_union, lookup_enum): Update. * valops.c (address_of_variable): Make block argument const. * value.h (value_of_variable): Update. * varobj.c (struct varobj_root) <valid_block>: Now const.
Diffstat (limited to 'gdb/parse.c')
-rw-r--r--gdb/parse.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/parse.c b/gdb/parse.c
index afe1c18..0392c6a 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -71,9 +71,9 @@ const struct exp_descriptor exp_descriptor_standard =
struct expression *expout;
int expout_size;
int expout_ptr;
-struct block *expression_context_block;
+const struct block *expression_context_block;
CORE_ADDR expression_context_pc;
-struct block *innermost_block;
+const struct block *innermost_block;
int arglist_len;
static struct type_stack type_stack;
char *lexptr;
@@ -116,7 +116,7 @@ static int prefixify_subexp (struct expression *, struct expression *, int,
int);
static struct expression *parse_exp_in_context (char **, CORE_ADDR,
- struct block *, int,
+ const struct block *, int,
int, int *);
void _initialize_parse (void);
@@ -248,7 +248,7 @@ write_exp_elt_sym (struct symbol *expelt)
}
void
-write_exp_elt_block (struct block *b)
+write_exp_elt_block (const struct block *b)
{
union exp_element tmp;
@@ -1097,7 +1097,8 @@ prefixify_subexp (struct expression *inexpr,
If COMMA is nonzero, stop if a comma is reached. */
struct expression *
-parse_exp_1 (char **stringptr, CORE_ADDR pc, struct block *block, int comma)
+parse_exp_1 (char **stringptr, CORE_ADDR pc, const struct block *block,
+ int comma)
{
return parse_exp_in_context (stringptr, pc, block, comma, 0, NULL);
}
@@ -1110,7 +1111,7 @@ parse_exp_1 (char **stringptr, CORE_ADDR pc, struct block *block, int comma)
is left untouched. */
static struct expression *
-parse_exp_in_context (char **stringptr, CORE_ADDR pc, struct block *block,
+parse_exp_in_context (char **stringptr, CORE_ADDR pc, const struct block *block,
int comma, int void_context_p, int *out_subexp)
{
volatile struct gdb_exception except;