aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-05-22 17:00:07 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-05-22 17:00:07 +0000
commitc3b22bd09c9ba99146f0dad3aac73e170cf051d6 (patch)
treeb9a82831974af1d067e1d6a835c895337950e21c /gdb
parentaa59ba6b2707e2912437f780ffad25a897153f95 (diff)
downloadgdb-c3b22bd09c9ba99146f0dad3aac73e170cf051d6.zip
gdb-c3b22bd09c9ba99146f0dad3aac73e170cf051d6.tar.gz
gdb-c3b22bd09c9ba99146f0dad3aac73e170cf051d6.tar.bz2
* symtab.h (enum address_class): Remove LOC_BASEREG and
LOC_BASEREG_ARG. (struct symbol): Remove "basereg" member of "aux_value" union. (SYMBOL_BASEREG): Remove. * ada-exp.y (select_possible_type_sym): Do not handle LOC_BASEREG or LOC_BASEREG_ARG. * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise. (ada_add_block_symbols): Likewise. * ax-gdb.c (gen_var_ref): Likewise. * buildsym.c (finish_block): Likewise. * findvar.c (symbol_read_needs_frame, read_var_value): Likewise. * m2-exp.y (yylex): Likewise. * mi/mi-cmd-stack.c (list_args_or_locals): Likewise. * printcmd.c (address_info): Likewise. * stack.c (print_frame_args, print_block_frame_locals): Likewise. (print_frame_arg_vars): Likewise. * symmisc.c (print_symbol): Likewise. * symtab.c (lookup_block_symbol): Likewise. * tracepoint.c (collect_symbol, add_local_symbols): Likewise. (scope_info): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog24
-rw-r--r--gdb/ada-exp.y2
-rw-r--r--gdb/ada-lang.c7
-rw-r--r--gdb/ax-gdb.c7
-rw-r--r--gdb/buildsym.c4
-rw-r--r--gdb/findvar.c16
-rw-r--r--gdb/m2-exp.y2
-rw-r--r--gdb/mi/mi-cmd-stack.c2
-rw-r--r--gdb/printcmd.c12
-rw-r--r--gdb/stack.c3
-rw-r--r--gdb/symmisc.c10
-rw-r--r--gdb/symtab.c1
-rw-r--r--gdb/symtab.h22
-rw-r--r--gdb/tracepoint.c27
14 files changed, 24 insertions, 115 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2486399..de0dd0a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,29 @@
2008-05-22 Ulrich Weigand <uweigand@de.ibm.com>
+ * symtab.h (enum address_class): Remove LOC_BASEREG and
+ LOC_BASEREG_ARG.
+ (struct symbol): Remove "basereg" member of "aux_value" union.
+ (SYMBOL_BASEREG): Remove.
+
+ * ada-exp.y (select_possible_type_sym): Do not handle LOC_BASEREG
+ or LOC_BASEREG_ARG.
+ * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
+ (ada_add_block_symbols): Likewise.
+ * ax-gdb.c (gen_var_ref): Likewise.
+ * buildsym.c (finish_block): Likewise.
+ * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
+ * m2-exp.y (yylex): Likewise.
+ * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
+ * printcmd.c (address_info): Likewise.
+ * stack.c (print_frame_args, print_block_frame_locals): Likewise.
+ (print_frame_arg_vars): Likewise.
+ * symmisc.c (print_symbol): Likewise.
+ * symtab.c (lookup_block_symbol): Likewise.
+ * tracepoint.c (collect_symbol, add_local_symbols): Likewise.
+ (scope_info): Likewise.
+
+2008-05-22 Ulrich Weigand <uweigand@de.ibm.com>
+
* symtab.h (enum address_class): Remove LOC_LOCAL_ARG.
* ada-exp.y (select_possible_type_sym): Do not handle LOC_LOCAL_ARG.
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index b11b8b4..948bce4 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1059,8 +1059,6 @@ select_possible_type_sym (struct ada_symbol_info *syms, int nsyms)
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
case LOC_LOCAL:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED:
case LOC_COMPUTED_ARG:
return NULL;
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index d0003ed..165e374 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -2893,8 +2893,6 @@ resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
case LOC_LOCAL:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED:
case LOC_COMPUTED_ARG:
goto FoundNonType;
@@ -4321,8 +4319,6 @@ symtab_for_sym (struct symbol *sym)
case LOC_REGPARM_ADDR:
case LOC_LOCAL:
case LOC_TYPEDEF:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED:
case LOC_COMPUTED_ARG:
for (j = FIRST_LOCAL_BLOCK;
@@ -5223,7 +5219,6 @@ ada_add_block_symbols (struct obstack *obstackp,
case LOC_REF_ARG:
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
arg_sym = sym;
break;
@@ -5256,7 +5251,6 @@ ada_add_block_symbols (struct obstack *obstackp,
case LOC_REF_ARG:
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
arg_sym = sym;
break;
@@ -5311,7 +5305,6 @@ ada_add_block_symbols (struct obstack *obstackp,
case LOC_REF_ARG:
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
arg_sym = sym;
break;
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 6d108f4..6acc318 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -569,13 +569,6 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
value->kind = axs_lvalue_memory;
break;
- case LOC_BASEREG: /* relative to some base register */
- case LOC_BASEREG_ARG:
- ax_reg (ax, SYMBOL_BASEREG (var));
- gen_sym_offset (ax, var);
- value->kind = axs_lvalue_memory;
- break;
-
case LOC_TYPEDEF:
error (_("Cannot compute value of typedef `%s'."),
SYMBOL_PRINT_NAME (var));
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 2171457..034c862 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -289,7 +289,6 @@ finish_block (struct symbol *symbol, struct pending **listhead,
case LOC_REF_ARG:
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
nparams++;
break;
@@ -302,7 +301,6 @@ finish_block (struct symbol *symbol, struct pending **listhead,
case LOC_LABEL:
case LOC_BLOCK:
case LOC_CONST_BYTES:
- case LOC_BASEREG:
case LOC_UNRESOLVED:
case LOC_OPTIMIZED_OUT:
case LOC_COMPUTED:
@@ -328,7 +326,6 @@ finish_block (struct symbol *symbol, struct pending **listhead,
case LOC_REF_ARG:
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
TYPE_FIELD_TYPE (ftype, iparams) = SYMBOL_TYPE (sym);
TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
@@ -343,7 +340,6 @@ finish_block (struct symbol *symbol, struct pending **listhead,
case LOC_LABEL:
case LOC_BLOCK:
case LOC_CONST_BYTES:
- case LOC_BASEREG:
case LOC_UNRESOLVED:
case LOC_OPTIMIZED_OUT:
case LOC_COMPUTED:
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 6d53674..13dea02 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -359,8 +359,6 @@ symbol_read_needs_frame (struct symbol *sym)
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
case LOC_LOCAL:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
return 1;
case LOC_UNDEF:
@@ -485,20 +483,6 @@ read_var_value (struct symbol *var, struct frame_info *frame)
addr += SYMBOL_VALUE (var);
break;
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
- {
- struct value *regval;
-
- regval = value_from_register (lookup_pointer_type (type),
- SYMBOL_BASEREG (var), frame);
- if (regval == NULL)
- error (_("Value of base register not available."));
- addr = value_as_address (regval);
- addr += SYMBOL_VALUE (var);
- break;
- }
-
case LOC_TYPEDEF:
error (_("Cannot look up value of a typedef"));
break;
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 420c287..cffac98 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -1044,8 +1044,6 @@ yylex ()
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
case LOC_LOCAL:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
case LOC_CONST:
case LOC_CONST_BYTES:
case LOC_OPTIMIZED_OUT:
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 7e0d7d3..2b904b3 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -254,14 +254,12 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
case LOC_REF_ARG: /* reference arg */
case LOC_REGPARM: /* register arg */
case LOC_REGPARM_ADDR: /* indirect register arg */
- case LOC_BASEREG_ARG: /* basereg arg */
case LOC_COMPUTED_ARG: /* arg with computed location */
if (!locals)
print_me = 1;
break;
case LOC_LOCAL: /* stack local */
- case LOC_BASEREG: /* basereg local */
case LOC_STATIC: /* static */
case LOC_REGISTER: /* register */
case LOC_COMPUTED: /* computed location */
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index c21c642..ad658b0 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1041,7 +1041,6 @@ address_info (char *exp, int from_tty)
struct symbol *sym;
struct minimal_symbol *msymbol;
long val;
- long basereg;
asection *section;
CORE_ADDR load_addr;
int is_a_field_of_this; /* C++: lookup_symbol sets this to nonzero
@@ -1099,7 +1098,6 @@ address_info (char *exp, int from_tty)
current_language->la_language, DMGL_ANSI);
printf_filtered ("\" is ");
val = SYMBOL_VALUE (sym);
- basereg = SYMBOL_BASEREG (sym);
section = SYMBOL_BFD_SECTION (sym);
switch (SYMBOL_CLASS (sym))
@@ -1172,16 +1170,6 @@ address_info (char *exp, int from_tty)
printf_filtered (_("a reference argument at offset %ld"), val);
break;
- case LOC_BASEREG:
- printf_filtered (_("a variable at offset %ld from register %s"),
- val, gdbarch_register_name (current_gdbarch, basereg));
- break;
-
- case LOC_BASEREG_ARG:
- printf_filtered (_("an argument at offset %ld from register %s"),
- val, gdbarch_register_name (current_gdbarch, basereg));
- break;
-
case LOC_TYPEDEF:
printf_filtered (_("a typedef"));
break;
diff --git a/gdb/stack.c b/gdb/stack.c
index 66019c7..5d78be1 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -264,7 +264,6 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
keep track of stack offsets in them. */
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
break;
@@ -1375,7 +1374,6 @@ print_block_frame_locals (struct block *b, struct frame_info *frame,
case LOC_LOCAL:
case LOC_REGISTER:
case LOC_STATIC:
- case LOC_BASEREG:
case LOC_COMPUTED:
values_printed = 1;
for (j = 0; j < num_tabs; j++)
@@ -1579,7 +1577,6 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
case LOC_REF_ARG:
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
case LOC_COMPUTED_ARG:
values_printed = 1;
fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 8171fa3..90c1918 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -668,16 +668,6 @@ print_symbol (void *args)
SYMBOL_VALUE (symbol));
break;
- case LOC_BASEREG:
- fprintf_filtered (outfile, "local at 0x%lx from register %d",
- SYMBOL_VALUE (symbol), SYMBOL_BASEREG (symbol));
- break;
-
- case LOC_BASEREG_ARG:
- fprintf_filtered (outfile, "arg at 0x%lx from register %d",
- SYMBOL_VALUE (symbol), SYMBOL_BASEREG (symbol));
- break;
-
case LOC_TYPEDEF:
break;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 089c63d..847d5ea 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1959,7 +1959,6 @@ lookup_block_symbol (const struct block *block, const char *name,
SYMBOL_CLASS (sym) != LOC_REF_ARG &&
SYMBOL_CLASS (sym) != LOC_REGPARM &&
SYMBOL_CLASS (sym) != LOC_REGPARM_ADDR &&
- SYMBOL_CLASS (sym) != LOC_BASEREG_ARG &&
SYMBOL_CLASS (sym) != LOC_COMPUTED_ARG)
{
break;
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 169a752..5b28d10 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -485,25 +485,6 @@ enum address_class
LOC_CONST_BYTES,
- /* Value is at SYMBOL_VALUE offset from the current value of
- register number SYMBOL_BASEREG. This exists mainly for the same
- things that LOC_LOCAL and LOC_ARG do; but we need to do this
- instead because on 88k DWARF gives us the offset from the
- frame/stack pointer, rather than the offset from the "canonical
- frame address" used by COFF, stabs, etc., and we don't know how
- to convert between these until we start examining prologues.
-
- Note that LOC_BASEREG is much less general than a DWARF expression.
- We don't need the generality (at least not yet), and storing a general
- DWARF expression would presumably take up more space than the existing
- scheme. */
-
- LOC_BASEREG,
-
- /* Same as LOC_BASEREG but it is an argument. */
-
- LOC_BASEREG_ARG,
-
/* Value is at fixed address, but the address of the variable has
to be determined from the minimal symbol table whenever the
variable is referenced.
@@ -611,8 +592,6 @@ struct symbol
union
{
- /* Used by LOC_BASEREG and LOC_BASEREG_ARG. */
- short basereg;
/* An arbitrary data pointer. Note that this data must be
allocated using the same obstack as the symbol itself. */
/* So far it is only used by LOC_COMPUTED and LOC_COMPUTED_ARG to
@@ -637,7 +616,6 @@ struct symbol
#define SYMBOL_TYPE(symbol) (symbol)->type
#define SYMBOL_LINE(symbol) (symbol)->line
#define SYMBOL_SYMTAB(symbol) (symbol)->symtab
-#define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg
#define SYMBOL_OPS(symbol) (symbol)->ops
#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value.ptr
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 805baa7..9784af1 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1290,19 +1290,6 @@ collect_symbol (struct collection_list *collect,
}
add_memrange (collect, reg, offset, len);
break;
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
- reg = SYMBOL_BASEREG (sym);
- offset = SYMBOL_VALUE (sym);
- if (info_verbose)
- {
- printf_filtered ("LOC_BASEREG %s: collect %ld bytes at offset ",
- DEPRECATED_SYMBOL_NAME (sym), len);
- printf_vma (offset);
- printf_filtered (" from basereg %d\n", reg);
- }
- add_memrange (collect, reg, offset, len);
- break;
case LOC_UNRESOLVED:
printf_filtered ("Don't know LOC_UNRESOLVED %s\n",
DEPRECATED_SYMBOL_NAME (sym));
@@ -1338,7 +1325,6 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc,
case LOC_LOCAL:
case LOC_STATIC:
case LOC_REGISTER:
- case LOC_BASEREG:
if (type == 'L') /* collecting Locals */
{
count++;
@@ -1350,7 +1336,6 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc,
case LOC_REF_ARG:
case LOC_REGPARM:
case LOC_REGPARM_ADDR:
- case LOC_BASEREG_ARG:
if (type == 'A') /* collecting Arguments */
{
count++;
@@ -2491,18 +2476,6 @@ scope_info (char *args, int from_tty)
printf_filtered ("a function at address ");
printf_filtered ("%s", paddress (BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
break;
- case LOC_BASEREG:
- printf_filtered ("a variable at offset %ld from register $%s",
- SYMBOL_VALUE (sym),
- gdbarch_register_name
- (current_gdbarch, SYMBOL_BASEREG (sym)));
- break;
- case LOC_BASEREG_ARG:
- printf_filtered ("an argument at offset %ld from register $%s",
- SYMBOL_VALUE (sym),
- gdbarch_register_name
- (current_gdbarch, SYMBOL_BASEREG (sym)));
- break;
case LOC_UNRESOLVED:
msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym),
NULL, NULL);