mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-28 22:21:26 +08:00
* 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.
This commit is contained in:
@ -1237,7 +1237,6 @@ collect_symbol (struct collection_list *collect,
|
||||
add_memrange (collect, memrange_absolute, offset, len);
|
||||
break;
|
||||
case LOC_REGISTER:
|
||||
case LOC_REGPARM:
|
||||
reg = SYMBOL_VALUE (sym);
|
||||
if (info_verbose)
|
||||
printf_filtered ("LOC_REG[parm] %s: ",
|
||||
@ -1317,31 +1316,13 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc,
|
||||
QUIT; /* allow user to bail out with ^C */
|
||||
ALL_BLOCK_SYMBOLS (block, iter, sym)
|
||||
{
|
||||
switch (SYMBOL_CLASS (sym))
|
||||
if (SYMBOL_IS_ARGUMENT (sym)
|
||||
? type == 'A' /* collecting Arguments */
|
||||
: type == 'L') /* collecting Locals */
|
||||
{
|
||||
default:
|
||||
warning (_("don't know how to trace local symbol %s"),
|
||||
DEPRECATED_SYMBOL_NAME (sym));
|
||||
case LOC_LOCAL:
|
||||
case LOC_STATIC:
|
||||
case LOC_REGISTER:
|
||||
if (type == 'L') /* collecting Locals */
|
||||
{
|
||||
count++;
|
||||
collect_symbol (collect, sym, frame_regno,
|
||||
frame_offset);
|
||||
}
|
||||
break;
|
||||
case LOC_ARG:
|
||||
case LOC_REF_ARG:
|
||||
case LOC_REGPARM:
|
||||
case LOC_REGPARM_ADDR:
|
||||
if (type == 'A') /* collecting Arguments */
|
||||
{
|
||||
count++;
|
||||
collect_symbol (collect, sym, frame_regno,
|
||||
frame_offset);
|
||||
}
|
||||
count++;
|
||||
collect_symbol (collect, sym, frame_regno,
|
||||
frame_offset);
|
||||
}
|
||||
}
|
||||
if (BLOCK_FUNCTION (block))
|
||||
@ -2439,8 +2420,13 @@ scope_info (char *args, int from_tty)
|
||||
printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (sym)));
|
||||
break;
|
||||
case LOC_REGISTER:
|
||||
printf_filtered ("a local variable in register $%s",
|
||||
gdbarch_register_name
|
||||
if (SYMBOL_IS_ARGUMENT (sym))
|
||||
printf_filtered ("an argument in register $%s",
|
||||
gdbarch_register_name
|
||||
(current_gdbarch, SYMBOL_VALUE (sym)));
|
||||
else
|
||||
printf_filtered ("a local variable in register $%s",
|
||||
gdbarch_register_name
|
||||
(current_gdbarch, SYMBOL_VALUE (sym)));
|
||||
break;
|
||||
case LOC_ARG:
|
||||
@ -2455,11 +2441,6 @@ scope_info (char *args, int from_tty)
|
||||
printf_filtered ("a reference argument at offset %ld",
|
||||
SYMBOL_VALUE (sym));
|
||||
break;
|
||||
case LOC_REGPARM:
|
||||
printf_filtered ("an argument in register $%s",
|
||||
gdbarch_register_name
|
||||
(current_gdbarch, SYMBOL_VALUE (sym)));
|
||||
break;
|
||||
case LOC_REGPARM_ADDR:
|
||||
printf_filtered ("the address of an argument, in register $%s",
|
||||
gdbarch_register_name
|
||||
@ -2491,7 +2472,6 @@ scope_info (char *args, int from_tty)
|
||||
printf_filtered ("optimized out.\n");
|
||||
continue;
|
||||
case LOC_COMPUTED:
|
||||
case LOC_COMPUTED_ARG:
|
||||
SYMBOL_OPS (sym)->describe_location (sym, gdb_stdout);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user