aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2008-05-27 19:29:52 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2008-05-27 19:29:52 +0000
commit2a2d4dc30115b5723b26b19d039b8924b1ceb27a (patch)
tree830c99be07d3da94a858914028271bf70b6459e4 /gdb/symtab.h
parent725a9891bcc665280fb0f749d47416c8e6ea94b7 (diff)
downloadbinutils-2a2d4dc30115b5723b26b19d039b8924b1ceb27a.zip
binutils-2a2d4dc30115b5723b26b19d039b8924b1ceb27a.tar.gz
binutils-2a2d4dc30115b5723b26b19d039b8924b1ceb27a.tar.bz2
* symtab.h (enum address_class): Remove LOC_REGPARM and
LOC_COMPUTED_ARG. (struct symbol): Add is_argument. (SYMBOL_IS_ARGUMENT): Define. * ada-lang.c (ada_add_block_symbols): Use SYMBOL_IS_ARGUMENT. * buildsym.c (finish_block): Likewise. * stack.c (print_frame_args, print_block_frame_locals) (print_frame_arg_vars): Likewise. * symtab.c (lookup_block_symbol): Likewise. * tracepoint.c (add_local_symbols): Likewise. * mi/mi-cmd-stack.c (list_args_or_locals): Likewise. * coffread.c (process_coff_symbol): Set SYMBOL_IS_ARGUMENT. * dwarf2read.c (new_symbol): Likewise. * mdebugread.c (parse_symbol): Likewise. * stabsread.c (define_symbol): Likewise. * ada-exp.y (select_possible_type_sym): Don't handle LOC_REGPARM and LOC_COMPUTED_ARG. * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise. * ax-gdb.c (gen_var_ref): Likewise. * eval.c (evaluate_subexp_for_address): Likewise. * findvar.c (symbol_read_needs_frame, read_var_value): Likewise. * m2-exp.y (yylex): Likewise. * printcmd.c (address_info): Likewise. * symmisc.c (print_symbol, print_partial_symbols): Likewise. * tracepoint.c (collect_symbol, scope_info): Likewise. testsuite/: * gdb.base/frame-args.exp: Handle arguments that are optimized out.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index cd9936a..ae4faf5 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -426,7 +426,13 @@ enum address_class
LOC_STATIC,
- /* Value is in register. SYMBOL_VALUE is the register number. */
+ /* Value is in register. SYMBOL_VALUE is the register number.
+
+ For some symbol formats (stabs, for some compilers at least),
+ the compiler generates two symbols, an argument and a register.
+ In some cases we combine them to a single LOC_REGISTER in symbol
+ reading, but currently not for all cases (e.g. it's passed on the
+ stack and then loaded into a register). */
LOC_REGISTER,
@@ -438,22 +444,7 @@ enum address_class
LOC_REF_ARG,
- /* Value is in register number SYMBOL_VALUE. Just like LOC_REGISTER
- except this is an argument. Probably the cleaner way to handle
- this would be to separate address_class (which would include
- separate ARG and LOCAL to deal with the frame's arguments
- (get_frame_args_address) versus the frame's locals
- (get_frame_locals_address), and an is_argument flag.
-
- For some symbol formats (stabs, for some compilers at least),
- the compiler generates two symbols, an argument and a register.
- In some cases we combine them to a single LOC_REGPARM in symbol
- reading, but currently not for all cases (e.g. it's passed on the
- stack and then loaded into a register). */
-
- LOC_REGPARM,
-
- /* Value is in specified register. Just like LOC_REGPARM except the
+ /* Value is in specified register. Just like LOC_REGISTER except the
register holds the address of the argument instead of the argument
itself. This is currently used for the passing of structs and unions
on sparc and hppa. It is also used for call by reference where the
@@ -505,9 +496,6 @@ enum address_class
/* The variable's address is computed by a set of location
functions (see "struct symbol_ops" below). */
LOC_COMPUTED,
-
- /* Same as LOC_COMPUTED, but for function arguments. */
- LOC_COMPUTED_ARG
};
/* The methods needed to implement a symbol class. These methods can
@@ -576,6 +564,10 @@ struct symbol
ENUM_BITFIELD(address_class) aclass : 6;
+ /* Whether this is an argument. */
+
+ unsigned is_argument : 1;
+
/* Line number of definition. FIXME: Should we really make the assumption
that nobody will try to debug files longer than 64K lines? What about
machine generated programs? */
@@ -590,7 +582,7 @@ struct symbol
/* An arbitrary data pointer, allowing symbol readers to record
additional information on a per-symbol basis. 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
+ /* So far it is only used by LOC_COMPUTED to
find the location information. For a LOC_BLOCK symbol
for a function in a compilation unit compiled with DWARF 2
information, this is information used internally by the DWARF 2
@@ -608,6 +600,7 @@ struct symbol
#define SYMBOL_DOMAIN(symbol) (symbol)->domain
#define SYMBOL_CLASS(symbol) (symbol)->aclass
+#define SYMBOL_IS_ARGUMENT(symbol) (symbol)->is_argument
#define SYMBOL_TYPE(symbol) (symbol)->type
#define SYMBOL_LINE(symbol) (symbol)->line
#define SYMBOL_SYMTAB(symbol) (symbol)->symtab