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/stabsread.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/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 6d6b094..e9580f9 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -930,6 +930,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_CLASS (sym) = LOC_ARG; SYMBOL_VALUE (sym) = valu; SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + SYMBOL_IS_ARGUMENT (sym) = 1; add_symbol_to_list (sym, &local_symbols); if (gdbarch_byte_order (gdbarch) != BFD_ENDIAN_BIG) @@ -974,7 +975,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, case 'R': /* Parameter which is in a register. */ SYMBOL_TYPE (sym) = read_type (&p, objfile); - SYMBOL_CLASS (sym) = LOC_REGPARM; + SYMBOL_CLASS (sym) = LOC_REGISTER; + SYMBOL_IS_ARGUMENT (sym) = 1; SYMBOL_VALUE (sym) = gdbarch_stab_reg_to_regnum (current_gdbarch, valu); if (SYMBOL_VALUE (sym) >= gdbarch_num_regs (current_gdbarch) + gdbarch_num_pseudo_regs (current_gdbarch)) @@ -1039,7 +1041,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, && strcmp (DEPRECATED_SYMBOL_NAME (prev_sym), DEPRECATED_SYMBOL_NAME (sym)) == 0) { - SYMBOL_CLASS (prev_sym) = LOC_REGPARM; + SYMBOL_CLASS (prev_sym) = LOC_REGISTER; /* Use the type from the LOC_REGISTER; that is the type that is actually in that register. */ SYMBOL_TYPE (prev_sym) = SYMBOL_TYPE (sym); @@ -1265,6 +1267,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, /* Reference parameter */ SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_REF_ARG; + SYMBOL_IS_ARGUMENT (sym) = 1; SYMBOL_VALUE (sym) = valu; SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); @@ -1274,6 +1277,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, /* Reference parameter which is in a register. */ SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR; + SYMBOL_IS_ARGUMENT (sym) = 1; SYMBOL_VALUE (sym) = gdbarch_stab_reg_to_regnum (current_gdbarch, valu); if (SYMBOL_VALUE (sym) >= gdbarch_num_regs (current_gdbarch) + gdbarch_num_pseudo_regs (current_gdbarch)) @@ -1315,11 +1319,11 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, register or on the stack) instead of the structure itself. */ if (gdbarch_stabs_argument_has_addr (gdbarch, SYMBOL_TYPE (sym)) - && (SYMBOL_CLASS (sym) == LOC_REGPARM || SYMBOL_CLASS (sym) == LOC_ARG)) + && SYMBOL_IS_ARGUMENT (sym)) { - /* We have to convert LOC_REGPARM to LOC_REGPARM_ADDR (for + /* We have to convert LOC_REGISTER to LOC_REGPARM_ADDR (for variables passed in a register). */ - if (SYMBOL_CLASS (sym) == LOC_REGPARM) + if (SYMBOL_CLASS (sym) == LOC_REGISTER) SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR; /* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th and subsequent arguments on SPARC, for example). */ |