mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-25 21:19:54 +00:00
* config/mn10200/tm-mn10200.h (STORE_STRUCT_RETURN): Fix.
* mn10200-tdep.c (mn10200_store_struct_return): New function. (REG_STRUCT_HAS_ADDR): Tweak. Fixes most of the structs.exp tests.
This commit is contained in:
parent
380c32d50d
commit
d601a41faa
@ -8,6 +8,10 @@ Tue Feb 11 15:36:31 1997 Doug Evans <dje@canuck.cygnus.com>
|
||||
end-sanitize-m32r
|
||||
Tue Feb 11 12:28:09 1997 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* config/mn10200/tm-mn10200.h (STORE_STRUCT_RETURN): Fix.
|
||||
* mn10200-tdep.c (mn10200_store_struct_return): New function.
|
||||
(REG_STRUCT_HAS_ADDR): Tweak.
|
||||
|
||||
* config/mn10200/tm-mn10200.h (EXTRACT_RETURN_VALUE): Fix case when
|
||||
extracting a return value from a register pair.
|
||||
|
||||
|
@ -154,8 +154,8 @@ extern CORE_ADDR mn10200_frame_saved_pc PARAMS ((struct frame_info *));
|
||||
} \
|
||||
}
|
||||
|
||||
#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) write_register (0, STRUCT_ADDR);
|
||||
|
||||
#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
|
||||
(SP) = mn10200_store_struct_return (STRUCT_ADDR, SP)
|
||||
|
||||
extern CORE_ADDR mn10200_skip_prologue PARAMS ((CORE_ADDR));
|
||||
#define SKIP_PROLOGUE(pc) pc = mn10200_skip_prologue (pc)
|
||||
@ -190,8 +190,8 @@ mn10200_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
|
||||
|
||||
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
|
||||
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p,type) \
|
||||
(TYPE_LENGTH (type) > 8)
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
|
||||
(TYPE_NFIELDS (TYPE) > 1 || TYPE_LENGTH (TYPE) > 8)
|
||||
|
||||
#define USE_STRUCT_CONVENTION(GCC_P, TYPE) \
|
||||
(TYPE_NFIELDS (TYPE) > 1 || TYPE_LENGTH (TYPE) > 8)
|
||||
|
@ -594,6 +594,30 @@ mn10200_push_return_address (pc, sp)
|
||||
write_memory (sp - 4, buf, 4);
|
||||
return sp - 4;
|
||||
}
|
||||
|
||||
/* Function: store_struct_return (addr,sp)
|
||||
Store the structure value return address for an inferior function
|
||||
call. */
|
||||
|
||||
CORE_ADDR
|
||||
mn10200_store_struct_return (addr, sp)
|
||||
CORE_ADDR addr;
|
||||
CORE_ADDR sp;
|
||||
{
|
||||
unsigned char buf1[4];
|
||||
unsigned char buf2[4];
|
||||
|
||||
/* Get the saved PC and hold onto it. */
|
||||
target_read_memory (sp, buf1, 4);
|
||||
|
||||
/* Now push the structure value address. */
|
||||
store_unsigned_integer (buf2, 4, addr);
|
||||
write_memory (sp, buf2, 4);
|
||||
|
||||
/* Now push the saved PC back onto the stack. */
|
||||
target_write_memory (sp - 4, buf1, 4);
|
||||
return sp - 4;
|
||||
}
|
||||
|
||||
/* Function: frame_saved_pc
|
||||
Find the caller of this frame. We do this by seeing if RP_REGNUM
|
||||
|
Loading…
Reference in New Issue
Block a user