diff options
author | Jeff Law <law@redhat.com> | 1997-04-24 19:35:11 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1997-04-24 19:35:11 +0000 |
commit | 726229db592b463b8748bd1faec33823ed43e90d (patch) | |
tree | 9186f9af5e5191a92bf59860ebf82c5578419884 /gdb/config | |
parent | abe293a0c6db0ad1cff41f857248832324d36f67 (diff) | |
download | gdb-726229db592b463b8748bd1faec33823ed43e90d.zip gdb-726229db592b463b8748bd1faec33823ed43e90d.tar.gz gdb-726229db592b463b8748bd1faec33823ed43e90d.tar.bz2 |
* config/mn10300/tm-mn10300.h (STORE_RETURN_VALUE): Pointers are
returned in $a0.
(EXTRACT_RETURN_VALUE): Likewise.
* mn10300-tdep.c (mn10300_analyze_prologue): Check for a return
insn at "pc", not "fi->pc".
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/mn10300/tm-mn10300.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h index 4b759ca..d7b06b6 100644 --- a/gdb/config/mn10300/tm-mn10300.h +++ b/gdb/config/mn10300/tm-mn10300.h @@ -97,14 +97,21 @@ extern CORE_ADDR mn10300_frame_saved_pc PARAMS ((struct frame_info *)); into VALBUF. */ #define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ - memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE)) + if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \ + memcpy (VALBUF, REGBUF + REGISTER_BYTE (4), TYPE_LENGTH (TYPE)); \ + else \ + memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE)); + #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ extract_address (REGBUF + REGISTER_BYTE (0), \ REGISTER_RAW_SIZE (0)) #define STORE_RETURN_VALUE(TYPE, VALBUF) \ - write_register_bytes(REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); + if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \ + write_register_bytes(REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \ + else \ + write_register_bytes(REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \ (SP) = mn10300_store_struct_return (STRUCT_ADDR, SP) |