This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix frame-args.exp failure
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: schwab at suse dot de (Andreas Schwab)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 27 May 2008 20:16:24 +0200 (CEST)
- Subject: Re: Fix frame-args.exp failure
Andreas Schwab wrote:
> Daniel Jacobowitz <drow@false.org> writes:
> > Wouldn't this make any optimized-out locals be treated like frame
> > arguments? And also see print_frame_arg_vars. I thought there was an
> > "is an argument" flag on variables nowadays but it doesn't look like
> > it.
>
> How about this instead? Tested on ppc-linux.
Did you get a chance to test with non-DWARF-2 debug info as well
(at least stabs would be nice to test)?
> 2008-05-25 Andreas Schwab <schwab@suse.de>
>
> * 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.
Otherwise, this looks good to me, except ...
> Index: gdb/objc-exp.y
> ===================================================================
> RCS file: /cvs/src/src/gdb/objc-exp.y,v
> retrieving revision 1.30
> diff -u -a -p -r1.30 objc-exp.y
> --- gdb/objc-exp.y 19 May 2008 15:50:09 -0000 1.30
> +++ gdb/objc-exp.y 25 May 2008 20:53:31 -0000
> @@ -338,7 +338,7 @@ exp : '[' TYPENAME
> error ("%s is not an ObjC Class",
> copy_name ($2.stoken));
> write_exp_elt_opcode (OP_LONG);
> - write_exp_elt_type (builtin_type_int);
> + write_exp_elt_type (builtin_type_void_data_ptr);
> write_exp_elt_longcst ((LONGEST) class);
> write_exp_elt_opcode (OP_LONG);
> start_msglist();
> @@ -353,7 +353,7 @@ exp : '[' TYPENAME
> exp : '[' CLASSNAME
> {
> write_exp_elt_opcode (OP_LONG);
> - write_exp_elt_type (builtin_type_int);
> + write_exp_elt_type (builtin_type_void_data_ptr);
> write_exp_elt_longcst ((LONGEST) $2.class);
> write_exp_elt_opcode (OP_LONG);
> start_msglist();
> Index: gdb/parser-defs.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/parser-defs.h,v
> retrieving revision 1.26
> diff -u -a -p -r1.26 parser-defs.h
> --- gdb/parser-defs.h 1 Jan 2008 22:53:12 -0000 1.26
> +++ gdb/parser-defs.h 25 May 2008 20:53:31 -0000
> @@ -83,7 +83,7 @@ struct objc_class_str
> {
> struct stoken stoken;
> struct type *type;
> - int class;
> + CORE_ADDR class;
> };
>
>
... these, which appear to be unrelated changes?
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com