diff options
author | Jason Thorpe <thorpej@netbsd.org> | 2002-01-19 20:22:28 +0000 |
---|---|---|
committer | Jason Thorpe <thorpej@netbsd.org> | 2002-01-19 20:22:28 +0000 |
commit | 0d056799fda335eaa9a7cd1206098c9076de74c1 (patch) | |
tree | 517081c2ba64464742c4d8ab5940e835f7b96046 /gdb/alpha-tdep.c | |
parent | 63e63b07a26b1d38e53851cbbb42f9ffb1b54f40 (diff) | |
download | fsf-binutils-gdb-0d056799fda335eaa9a7cd1206098c9076de74c1.zip fsf-binutils-gdb-0d056799fda335eaa9a7cd1206098c9076de74c1.tar.gz fsf-binutils-gdb-0d056799fda335eaa9a7cd1206098c9076de74c1.tar.bz2 |
* alpha-tdep.c (alpha_register_virtual_type): New function.
(alpha_init_frame_pc_first): Ditto.
(alpha_fix_call_dummy): Ditto.
(alpha_store_struct_return): Ditto.
(alpha_extract_struct_value_address): Ditto.
* config/alpha/tm-alpha.h (REGISTER_VIRTUAL_TYPE): Use
alpha_register_virtual_type.
(STORE_STRUCT_RETURN): Use alpha_store_struct_return.
(EXTRACT_STRUCT_VALUE_ADDRESS): Use
alpha_extract_struct_value_address.
(FIX_CALL_DUMMY): Use alpha_fix_call_dummy.
(INIT_FRAME_PC): Use init_frame_pc_noop.
(INIT_FRAME_PC_FIRST): Use alpha_init_frame_pc_first.
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r-- | gdb/alpha-tdep.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 6345279..a717e10 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -315,6 +315,13 @@ alpha_register_convertible (int regno) { return (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31); } + +struct type * +alpha_register_virtual_type (int regno) +{ + return ((regno >= FP0_REGNUM && regno < (FP0_REGNUM+31)) + ? builtin_type_double : builtin_type_long); +} /* Guaranteed to set frame->saved_regs to some values (it never leaves it @@ -416,6 +423,13 @@ alpha_frame_init_saved_regs (struct frame_info *fi) fi->saved_regs[SP_REGNUM] = fi->frame; } +void +alpha_init_frame_pc_first (int fromleaf, struct frame_info *prev) +{ + prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : + prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ()); +} + static CORE_ADDR read_next_frame_reg (struct frame_info *fi, int regno) { @@ -1479,6 +1493,18 @@ alpha_call_dummy_address (void) return SYMBOL_VALUE_ADDRESS (sym) + 4; } +void +alpha_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, + struct value **args, struct type *type, int gcc_p) +{ + CORE_ADDR bp_address = CALL_DUMMY_ADDRESS (); + + if (bp_address == 0) + error ("no place to put call"); + write_register (RA_REGNUM, bp_address); + write_register (T12_REGNUM, fun); +} + int alpha_use_struct_convention (int gcc_p, struct type *type) { @@ -1486,6 +1512,20 @@ alpha_use_struct_convention (int gcc_p, struct type *type) return 1; } +void +alpha_store_struct_return (CORE_ADDR addr, CORE_ADDR sp) +{ + /* Store the address of the place in which to copy the structure the + subroutine will return. Handled by alpha_push_arguments. */ +} + +CORE_ADDR +alpha_extract_struct_value_address (char *regbuf) +{ + return (extract_address (regbuf + REGISTER_BYTE (V0_REGNUM), + REGISTER_RAW_SIZE (V0_REGNUM))); +} + /* alpha_software_single_step() is called just before we want to resume the inferior, if we want to single-step it but there is no hardware or kernel single-step support (NetBSD on Alpha, for example). We find |