Thu Apr 22 14:50:05 1993 Jim Kingdon (kingdon@cygnus.com)

* symtab.h: Fix LOC_REF_ARG comment.

Wed Apr 22 20:21:30 1993  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
			  and Jim Kingdon (kingdon@cygnus.com)

	* stabsread.c (define_symbol): Combine a 'p', 'r' arg pair to a
	LOC_REGPARM symbol.
	* config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Revise comments.
	symfile.c (compare_symbols): Don't check first character; STRCMP
	does that.

	* stabsread.c (define_symbol): Generate a LOC_REGPARM_ADDR for
	structures that are passed by address in a register.
	* symtab.h (enum address_class): Add LOC_REGPARM_ADDR.
	* findvar.c (read_var_value),
	printcmd.c (address_info, print_frame_args),
	stack.c (print_frame_arg_vars), symmisc.c (print_{,partial_}symbol),
	* symtab.c (lookup_block_symbol): Deal with it.
This commit is contained in:
Jim Kingdon
1993-04-22 22:27:25 +00:00
parent 4365c36c9b
commit 5afa2040f4
6 changed files with 86 additions and 18 deletions

View File

@@ -448,10 +448,7 @@ enum address_class
LOC_ARG,
/* Value address is at SYMBOL_VALUE offset in arglist. Currently
this is used for C++ references (and presumably will be used for
Pascal VAR parameters), and is only dereferenced in certain
contexts. */
/* Value address is at SYMBOL_VALUE offset in arglist. */
LOC_REF_ARG,
@@ -462,13 +459,20 @@ enum address_class
FRAME_LOCALS_ADDRESS), and an is_argument flag.
For some symbol formats (stabs, for some compilers at least),
gdb generates a LOC_ARG and a LOC_REGISTER rather than a LOC_REGPARM.
This is because that's what the compiler does, but perhaps it would
be better if the symbol-reading code detected this (is it possible?)
and generated a LOC_REGPARM. */
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 I'm not sure whether we do for all cases (I'm thinking
of when 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
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. */
LOC_REGPARM_ADDR,
/* Value is a local variable at SYMBOL_VALUE offset in stack frame. */
LOC_LOCAL,