Index: alpha-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-tdep.c,v retrieving revision 1.15 diff -c -r1.15 alpha-tdep.c *** alpha-tdep.c 2002/01/19 06:44:55 1.15 --- alpha-tdep.c 2002/01/19 20:05:17 *************** *** 315,320 **** --- 315,327 ---- { 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,421 **** --- 423,435 ---- 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,1489 **** --- 1493,1529 ---- 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) { /* Structures are returned by ref in extra arg0. */ 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 Index: config/alpha/tm-alpha.h =================================================================== RCS file: /cvs/src/src/gdb/config/alpha/tm-alpha.h,v retrieving revision 1.11 diff -c -r1.11 tm-alpha.h *** tm-alpha.h 2002/01/19 06:44:56 1.11 --- tm-alpha.h 2002/01/19 20:05:19 *************** *** 195,208 **** /* Return the GDB type object for the "standard" data type of data in register N. */ ! #define REGISTER_VIRTUAL_TYPE(N) \ ! (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+31) \ ! ? builtin_type_double : builtin_type_long) \ /* Store the address of the place in which to copy the structure the subroutine will return. Handled by alpha_push_arguments. */ ! #define STORE_STRUCT_RETURN(addr, sp) /**/ /* Extract from an array REGBUF containing the (raw) register state --- 195,209 ---- /* Return the GDB type object for the "standard" data type of data in register N. */ ! #define REGISTER_VIRTUAL_TYPE(N) alpha_register_virtual_type ((N)) ! extern struct type * alpha_register_virtual_type (int); /* Store the address of the place in which to copy the structure the subroutine will return. Handled by alpha_push_arguments. */ ! #define STORE_STRUCT_RETURN(addr, sp) \ ! alpha_store_struct_return ((addr), (sp)) ! extern void alpha_store_struct_return (CORE_ADDR, CORE_ADDR); /**/ /* Extract from an array REGBUF containing the (raw) register state *************** *** 229,236 **** on it. */ #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ ! (extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \ ! REGISTER_RAW_SIZE (V0_REGNUM))) /* Structures are returned by ref in extra arg0 */ #define USE_STRUCT_CONVENTION(gcc_p, type) \ --- 230,237 ---- on it. */ #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ ! alpha_extract_struct_value_address (REGBUF) ! extern CORE_ADDR alpha_extract_struct_value_address (char *); /* Structures are returned by ref in extra arg0 */ #define USE_STRUCT_CONVENTION(gcc_p, type) \ *************** *** 346,368 **** We only have to set RA_REGNUM to the dummy breakpoint address and T12_REGNUM (the `procedure value register') to the function address. */ ! #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, 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); \ ! } /* There's a mess in stack frame creation. See comments in blockframe.c near reference to INIT_FRAME_PC_FIRST. */ ! #define INIT_FRAME_PC(fromleaf, prev) /* nada */ #define INIT_FRAME_PC_FIRST(fromleaf, prev) \ ! (prev)->pc = ((fromleaf) ? SAVED_PC_AFTER_CALL ((prev)->next) : \ ! (prev)->next ? FRAME_SAVED_PC ((prev)->next) : read_pc ()); /* Special symbol found in blocks associated with routines. We can hang alpha_extra_func_info_t's off of this. */ --- 347,366 ---- We only have to set RA_REGNUM to the dummy breakpoint address and T12_REGNUM (the `procedure value register') to the function address. */ ! #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ ! alpha_fix_call_dummy ((dummyname), (pc), (fun), (nargs), (args), \ ! (type), (gcc_p)) ! extern void alpha_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int, ! struct value **, struct type *, int); /* There's a mess in stack frame creation. See comments in blockframe.c near reference to INIT_FRAME_PC_FIRST. */ ! #define INIT_FRAME_PC(fromleaf, prev) init_frame_pc_noop ((fromleaf), (prev)) #define INIT_FRAME_PC_FIRST(fromleaf, prev) \ ! alpha_init_frame_pc_first ((fromleaf), (prev)) ! extern void alpha_init_frame_pc_first (int, struct frame_info *); /* Special symbol found in blocks associated with routines. We can hang alpha_extra_func_info_t's off of this. */