diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2008-05-27 19:29:52 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2008-05-27 19:29:52 +0000 |
commit | 2a2d4dc30115b5723b26b19d039b8924b1ceb27a (patch) | |
tree | 830c99be07d3da94a858914028271bf70b6459e4 /gdb/buildsym.c | |
parent | 725a9891bcc665280fb0f749d47416c8e6ea94b7 (diff) | |
download | gdb-2a2d4dc30115b5723b26b19d039b8924b1ceb27a.zip gdb-2a2d4dc30115b5723b26b19d039b8924b1ceb27a.tar.gz gdb-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/buildsym.c')
-rw-r--r-- | gdb/buildsym.c | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 034c862..f3850a2 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -283,30 +283,8 @@ finish_block (struct symbol *symbol, struct pending **listhead, struct symbol *sym; ALL_BLOCK_SYMBOLS (block, iter, sym) { - switch (SYMBOL_CLASS (sym)) - { - case LOC_ARG: - case LOC_REF_ARG: - case LOC_REGPARM: - case LOC_REGPARM_ADDR: - case LOC_COMPUTED_ARG: - nparams++; - break; - case LOC_UNDEF: - case LOC_CONST: - case LOC_STATIC: - case LOC_REGISTER: - case LOC_LOCAL: - case LOC_TYPEDEF: - case LOC_LABEL: - case LOC_BLOCK: - case LOC_CONST_BYTES: - case LOC_UNRESOLVED: - case LOC_OPTIMIZED_OUT: - case LOC_COMPUTED: - default: - break; - } + if (SYMBOL_IS_ARGUMENT (sym)) + nparams++; } if (nparams > 0) { @@ -320,31 +298,11 @@ finish_block (struct symbol *symbol, struct pending **listhead, if (iparams == nparams) break; - switch (SYMBOL_CLASS (sym)) + if (SYMBOL_IS_ARGUMENT (sym)) { - case LOC_ARG: - case LOC_REF_ARG: - case LOC_REGPARM: - case LOC_REGPARM_ADDR: - case LOC_COMPUTED_ARG: TYPE_FIELD_TYPE (ftype, iparams) = SYMBOL_TYPE (sym); TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0; iparams++; - break; - case LOC_UNDEF: - case LOC_CONST: - case LOC_STATIC: - case LOC_REGISTER: - case LOC_LOCAL: - case LOC_TYPEDEF: - case LOC_LABEL: - case LOC_BLOCK: - case LOC_CONST_BYTES: - case LOC_UNRESOLVED: - case LOC_OPTIMIZED_OUT: - case LOC_COMPUTED: - default: - break; } } } |