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

@ -25,18 +25,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define IEEE_FLOAT
/* When passing a structure to a function, Sun cc passes the address
in a register, not the structure itself. It (under SunOS4) creates
two symbols, so we get a LOC_ARG saying the address is on the stack
(a lie, and a serious one since we don't know which register to
use), and a LOC_REGISTER saying that the struct is in a register
(sort of a lie, but fixable with REG_STRUCT_HAS_ADDR). Gcc version
two (as of 1.92) behaves like sun cc. REG_STRUCT_HAS_ADDR is smart
enough to distinguish between Sun cc, gcc version 1 and gcc version 2.
not the structure itself. It (under SunOS4) creates two symbols,
which we need to combine to a LOC_REGPARM. Gcc version two (as of
1.92) behaves like sun cc. REG_STRUCT_HAS_ADDR is smart enough to
distinguish between Sun cc, gcc version 1 and gcc version 2.
This still doesn't work if the argument is not one passed in a
register (i.e. it's the 7th or later argument). */
#define REG_STRUCT_HAS_ADDR(gcc_p) (gcc_p != 1)
#define STRUCT_ARG_SYM_GARBAGE(gcc_p) (gcc_p != 1)
/* If Pcc says that a parameter is a short, it's a short. This is
because the parameter does get passed in in a register as an int,