* sparc-tdep.c (sparc_extract_struct_value_address): Make it

work correctly on little-endian hosts.
	(sparc_push_arguments): New function.
	(gdb_print_insn_sparc): New function.
	(_initialize_sparc_tdep): Make gdb_print_insn_sparc the default
	disassembler, so that SPARClite-specific instructions will
	be recognized.
	* sparcl-tdep.c (readchar): Print debugging information.
	(debug_serial_write): New function, a replacement for SERIAL_WRITE
	that prints debugging information.
	* config/sparc/tm-sparc.h (PUSH_ARGUMENTS): Define.
	(sparc_push_arguments): Declare.
This commit is contained in:
Mark Alexander
1998-04-15 00:25:58 +00:00
parent 93f967158f
commit e50f526e68
4 changed files with 194 additions and 31 deletions

View File

@@ -245,7 +245,7 @@ extern CORE_ADDR sparc_pc_adjust PARAMS ((CORE_ADDR));
#define CANNOT_STORE_REGISTER(regno) ((regno) == G0_REGNUM)
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function. */
subroutine will return. This is called from call_function_by_hand. */
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ char val[4]; \
@@ -648,3 +648,15 @@ extern int deferred_stores;
/* Select the sparc disassembler */
#define TM_PRINT_INSN_MACH bfd_mach_sparc
/* Arguments smaller than an int must promoted to ints when synthesizing
function calls. */
#ifdef __STDC__
struct value;
#endif
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = sparc_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
extern CORE_ADDR
sparc_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));