Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: gdb/ada-exp.y

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/ada-exp.c ('k') | gdb/ada-lang.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/ada-exp.y
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index d8c21a4f1107e7596af82b427c0a3af8f3772b9d..1a80b0b1fe49d6934c60d4b0ded832e3427cfabb 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -94,6 +94,12 @@
#define yytoks ada_toks /* With YYDEBUG defined */
#define yyname ada_name /* With YYDEBUG defined */
#define yyrule ada_rule /* With YYDEBUG defined */
+#define yyss ada_yyss
+#define yysslim ada_yysslim
+#define yyssp ada_yyssp
+#define yystacksize ada_yystacksize
+#define yyvs ada_yyvs
+#define yyvsp ada_yyvsp
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
@@ -867,8 +873,7 @@ write_object_renaming (struct block *orig_left_context,
{
char *name;
enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
- struct symbol *sym;
- struct block *block;
+ struct ada_symbol_info sym_info;
if (max_depth <= 0)
error (_("Could not find renamed symbol"));
@@ -877,29 +882,28 @@ write_object_renaming (struct block *orig_left_context,
orig_left_context = get_selected_block (NULL);
name = obsavestring (renamed_entity, renamed_entity_len, &temp_parse_space);
- sym = ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN,
- &block);
- if (sym == NULL)
+ ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
+ if (sym_info.sym == NULL)
error (_("Could not find renamed variable: %s"), ada_decode (name));
- else if (SYMBOL_CLASS (sym) == LOC_TYPEDEF)
+ else if (SYMBOL_CLASS (sym_info.sym) == LOC_TYPEDEF)
/* We have a renaming of an old-style renaming symbol. Don't
trust the block information. */
- block = orig_left_context;
+ sym_info.block = orig_left_context;
{
const char *inner_renamed_entity;
int inner_renamed_entity_len;
const char *inner_renaming_expr;
- switch (ada_parse_renaming (sym, &inner_renamed_entity,
+ switch (ada_parse_renaming (sym_info.sym, &inner_renamed_entity,
&inner_renamed_entity_len,
&inner_renaming_expr))
{
case ADA_NOT_RENAMING:
- write_var_from_sym (orig_left_context, block, sym);
+ write_var_from_sym (orig_left_context, sym_info.block, sym_info.sym);
break;
case ADA_OBJECT_RENAMING:
- write_object_renaming (block,
+ write_object_renaming (sym_info.block,
inner_renamed_entity, inner_renamed_entity_len,
inner_renaming_expr, max_depth - 1);
break;
@@ -939,7 +943,7 @@ write_object_renaming (struct block *orig_left_context,
{
const char *end;
char *index_name;
- struct symbol *index_sym;
+ struct ada_symbol_info index_sym_info;
end = strchr (renaming_expr, 'X');
if (end == NULL)
@@ -950,14 +954,15 @@ write_object_renaming (struct block *orig_left_context,
&temp_parse_space);
renaming_expr = end;
- index_sym = ada_lookup_encoded_symbol (index_name, NULL,
- VAR_DOMAIN, &block);
- if (index_sym == NULL)
+ ada_lookup_encoded_symbol (index_name, NULL, VAR_DOMAIN,
+ &index_sym_info);
+ if (index_sym_info.sym == NULL)
error (_("Could not find %s"), index_name);
- else if (SYMBOL_CLASS (index_sym) == LOC_TYPEDEF)
+ else if (SYMBOL_CLASS (index_sym_info.sym) == LOC_TYPEDEF)
/* Index is an old-style renaming symbol. */
- block = orig_left_context;
- write_var_from_sym (NULL, block, index_sym);
+ index_sym_info.block = orig_left_context;
+ write_var_from_sym (NULL, index_sym_info.block,
+ index_sym_info.sym);
}
if (slice_state == SIMPLE_INDEX)
{
@@ -1021,7 +1026,7 @@ block_lookup (struct block *context, char *raw_name)
else
name = ada_encode (raw_name);
- nsyms = ada_lookup_symbol_list (name, context, VAR_DOMAIN, &syms);
+ nsyms = ada_lookup_symbol_list (name, context, VAR_DOMAIN, &syms, 1);
if (context == NULL
&& (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK))
symtab = lookup_symtab (name);
@@ -1278,7 +1283,7 @@ write_var_or_type (struct block *block, struct stoken name0)
encoded_name[tail_index] = '\0';
nsyms = ada_lookup_symbol_list (encoded_name, block,
- VAR_DOMAIN, &syms);
+ VAR_DOMAIN, &syms, 1);
encoded_name[tail_index] = terminator;
/* A single symbol may rename a package or object. */
@@ -1288,8 +1293,7 @@ write_var_or_type (struct block *block, struct stoken name0)
if (nsyms == 1)
{
struct symbol *ren_sym =
- ada_find_renaming_symbol (SYMBOL_LINKAGE_NAME (syms[0].sym),
- syms[0].block);
+ ada_find_renaming_symbol (syms[0].sym, syms[0].block);
if (ren_sym != NULL)
syms[0].sym = ren_sym;
@@ -1427,7 +1431,7 @@ write_name_assoc (struct stoken name)
{
struct ada_symbol_info *syms;
int nsyms = ada_lookup_symbol_list (name.ptr, expression_context_block,
- VAR_DOMAIN, &syms);
+ VAR_DOMAIN, &syms, 1);
if (nsyms != 1 || SYMBOL_CLASS (syms[0].sym) == LOC_TYPEDEF)
write_exp_op_with_string (OP_NAME, name);
else
@@ -1459,7 +1463,7 @@ convert_char_literal (struct type *type, LONGEST val)
for (f = 0; f < TYPE_NFIELDS (type); f += 1)
{
if (strcmp (name, TYPE_FIELD_NAME (type, f)) == 0)
- return TYPE_FIELD_BITPOS (type, f);
+ return TYPE_FIELD_ENUMVAL (type, f);
}
return val;
}
« no previous file with comments | « gdb/ada-exp.c ('k') | gdb/ada-lang.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698