1999-04-16 03:35:26 +02:00
|
|
|
|
/* Definitions to make GDB run on an Alpha box under OSF1. This is
|
|
|
|
|
also used by the Alpha/Netware and Alpha/Linux targets.
|
2002-01-19 06:26:47 +01:00
|
|
|
|
Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002
|
2001-03-06 09:22:02 +01:00
|
|
|
|
Free Software Foundation, Inc.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
This file is part of GDB.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
(at your option) any later version.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
|
Boston, MA 02111-1307, USA. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
#ifndef TM_ALPHA_H
|
|
|
|
|
#define TM_ALPHA_H
|
|
|
|
|
|
2001-03-15 00:23:16 +01:00
|
|
|
|
#include "regcache.h"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#include "bfd.h"
|
|
|
|
|
#include "coff/sym.h" /* Needed for PDR below. */
|
|
|
|
|
#include "coff/symconst.h"
|
|
|
|
|
|
|
|
|
|
struct frame_info;
|
|
|
|
|
struct type;
|
|
|
|
|
struct value;
|
|
|
|
|
struct symbol;
|
|
|
|
|
|
|
|
|
|
/* Redefine some target bit sizes from the default. */
|
|
|
|
|
|
|
|
|
|
#define TARGET_LONG_BIT 64
|
|
|
|
|
#define TARGET_LONG_LONG_BIT 64
|
|
|
|
|
#define TARGET_PTR_BIT 64
|
|
|
|
|
|
|
|
|
|
/* Number of traps that happen between exec'ing the shell
|
|
|
|
|
* to run an inferior, and when we finally get to
|
|
|
|
|
* the inferior code. This is 2 on most implementations.
|
|
|
|
|
*/
|
|
|
|
|
#define START_INFERIOR_TRAPS_EXPECTED 3
|
|
|
|
|
|
|
|
|
|
/* Offset from address of function to start of its code.
|
|
|
|
|
Zero on most machines. */
|
|
|
|
|
|
|
|
|
|
#define FUNCTION_START_OFFSET 0
|
|
|
|
|
|
|
|
|
|
/* Advance PC across any function entry prologue instructions
|
|
|
|
|
to reach some "real" code. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define SKIP_PROLOGUE(pc) alpha_skip_prologue((pc))
|
|
|
|
|
extern CORE_ADDR alpha_skip_prologue (CORE_ADDR addr);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Immediately after a function call, return the saved pc.
|
|
|
|
|
Can't always go through the frames for this because on some machines
|
|
|
|
|
the new frame is not set up until the new function executes
|
|
|
|
|
some instructions. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define SAVED_PC_AFTER_CALL(frame) alpha_saved_pc_after_call(frame)
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern CORE_ADDR alpha_saved_pc_after_call (struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Are we currently handling a signal ? */
|
|
|
|
|
|
2002-01-19 06:26:47 +01:00
|
|
|
|
#define IN_SIGTRAMP(pc, name) alpha_osf_in_sigtramp ((pc), (name))
|
|
|
|
|
extern int alpha_osf_in_sigtramp (CORE_ADDR, char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Stack grows downward. */
|
|
|
|
|
|
2002-01-19 06:26:47 +01:00
|
|
|
|
#define INNER_THAN(lhs,rhs) core_addr_lessthan ((lhs), (rhs))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
#define BREAKPOINT {0x80, 0, 0, 0} /* call_pal bpt */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Amount PC must be decremented by after a breakpoint.
|
|
|
|
|
This is often the number of bytes in BREAKPOINT
|
|
|
|
|
but not always. */
|
|
|
|
|
|
|
|
|
|
#ifndef DECR_PC_AFTER_BREAK
|
|
|
|
|
#define DECR_PC_AFTER_BREAK 4
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Say how long (ordinary) registers are. This is a piece of bogosity
|
|
|
|
|
used in push_word and a few other places; REGISTER_RAW_SIZE is the
|
|
|
|
|
real way to know how big a register is. */
|
|
|
|
|
|
|
|
|
|
#define REGISTER_SIZE 8
|
|
|
|
|
|
|
|
|
|
/* Number of machine registers */
|
|
|
|
|
|
|
|
|
|
#define NUM_REGS 66
|
|
|
|
|
|
2002-01-19 01:09:16 +01:00
|
|
|
|
|
|
|
|
|
/* Return the name of register REGNO. */
|
|
|
|
|
|
|
|
|
|
#define REGISTER_NAME(regno) alpha_register_name ((regno))
|
|
|
|
|
extern char *alpha_register_name (int);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Register numbers of various important registers.
|
|
|
|
|
Note that most of these values are "real" register numbers,
|
|
|
|
|
and correspond to the general registers of the machine,
|
|
|
|
|
and FP_REGNUM is a "phony" register number which is too large
|
|
|
|
|
to be an actual register number as far as the user is concerned
|
|
|
|
|
but serves to get the desired value when passed to read_register. */
|
|
|
|
|
|
|
|
|
|
#define V0_REGNUM 0 /* Function integer return value */
|
|
|
|
|
#define T7_REGNUM 8 /* Return address register for OSF/1 __add* */
|
|
|
|
|
#define GCC_FP_REGNUM 15 /* Used by gcc as frame register */
|
|
|
|
|
#define A0_REGNUM 16 /* Loc of first arg during a subr call */
|
|
|
|
|
#define T9_REGNUM 23 /* Return address register for OSF/1 __div* */
|
|
|
|
|
#define T12_REGNUM 27 /* Contains start addr of current proc */
|
|
|
|
|
#define SP_REGNUM 30 /* Contains address of top of stack */
|
|
|
|
|
#define RA_REGNUM 26 /* Contains return address value */
|
|
|
|
|
#define ZERO_REGNUM 31 /* Read-only register, always 0 */
|
1999-07-07 22:19:36 +02:00
|
|
|
|
#define FP0_REGNUM 32 /* Floating point register 0 */
|
|
|
|
|
#define FPA0_REGNUM 48 /* First float arg during a subr call */
|
1999-04-26 20:34:20 +02:00
|
|
|
|
#define FPCR_REGNUM 63 /* Floating point control register */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#define PC_REGNUM 64 /* Contains program counter */
|
|
|
|
|
#define FP_REGNUM 65 /* Virtual frame pointer */
|
|
|
|
|
|
|
|
|
|
#define CANNOT_FETCH_REGISTER(regno) \
|
2002-01-19 06:26:47 +01:00
|
|
|
|
alpha_cannot_fetch_register ((regno))
|
|
|
|
|
extern int alpha_cannot_fetch_register (int);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#define CANNOT_STORE_REGISTER(regno) \
|
2002-01-19 06:26:47 +01:00
|
|
|
|
alpha_cannot_store_register ((regno))
|
|
|
|
|
extern int alpha_cannot_store_register (int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Total amount of space needed to store our copies of the machine's
|
|
|
|
|
register state, the array `registers'. */
|
|
|
|
|
#define REGISTER_BYTES (NUM_REGS * 8)
|
|
|
|
|
|
|
|
|
|
/* Index within `registers' of the first byte of the space for
|
|
|
|
|
register N. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define REGISTER_BYTE(N) alpha_register_byte ((N))
|
|
|
|
|
extern int alpha_register_byte (int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Number of bytes of storage in the actual machine representation
|
|
|
|
|
for register N. On Alphas, all regs are 8 bytes. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define REGISTER_RAW_SIZE(N) alpha_register_raw_size ((N))
|
|
|
|
|
extern int alpha_register_raw_size (int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Number of bytes of storage in the program's representation
|
|
|
|
|
for register N. On Alphas, all regs are 8 bytes. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define REGISTER_VIRTUAL_SIZE(N) alpha_register_virtual_size ((N))
|
|
|
|
|
extern int alpha_register_virtual_size (int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Largest value REGISTER_RAW_SIZE can have. */
|
|
|
|
|
|
|
|
|
|
#define MAX_REGISTER_RAW_SIZE 8
|
|
|
|
|
|
|
|
|
|
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
|
|
|
|
|
|
|
|
|
|
#define MAX_REGISTER_VIRTUAL_SIZE 8
|
|
|
|
|
|
|
|
|
|
/* Nonzero if register N requires conversion
|
|
|
|
|
from raw format to virtual format.
|
|
|
|
|
The alpha needs a conversion between register and memory format if
|
|
|
|
|
the register is a floating point register and
|
1999-07-07 22:19:36 +02:00
|
|
|
|
memory format is float, as the register format must be double
|
1999-04-16 03:35:26 +02:00
|
|
|
|
or
|
1999-07-07 22:19:36 +02:00
|
|
|
|
memory format is an integer with 4 bytes or less, as the representation
|
|
|
|
|
of integers in floating point registers is different. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-01-19 06:26:47 +01:00
|
|
|
|
#define REGISTER_CONVERTIBLE(N) alpha_register_convertible ((N))
|
|
|
|
|
extern int alpha_register_convertible (int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Convert data from raw format for register REGNUM in buffer FROM
|
|
|
|
|
to virtual format with type TYPE in buffer TO. */
|
|
|
|
|
|
|
|
|
|
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM, TYPE, FROM, TO) \
|
|
|
|
|
alpha_register_convert_to_virtual (REGNUM, TYPE, FROM, TO)
|
|
|
|
|
extern void
|
2000-05-28 03:12:42 +02:00
|
|
|
|
alpha_register_convert_to_virtual (int, struct type *, char *, char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Convert data from virtual format with type TYPE in buffer FROM
|
|
|
|
|
to raw format for register REGNUM in buffer TO. */
|
|
|
|
|
|
|
|
|
|
#define REGISTER_CONVERT_TO_RAW(TYPE, REGNUM, FROM, TO) \
|
|
|
|
|
alpha_register_convert_to_raw (TYPE, REGNUM, FROM, TO)
|
|
|
|
|
extern void
|
2000-05-28 03:12:42 +02:00
|
|
|
|
alpha_register_convert_to_raw (struct type *, int, char *, char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Return the GDB type object for the "standard" data type
|
|
|
|
|
of data in register N. */
|
|
|
|
|
|
2002-01-19 21:22:28 +01:00
|
|
|
|
#define REGISTER_VIRTUAL_TYPE(N) alpha_register_virtual_type ((N))
|
|
|
|
|
extern struct type * alpha_register_virtual_type (int);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Store the address of the place in which to copy the structure the
|
|
|
|
|
subroutine will return. Handled by alpha_push_arguments. */
|
|
|
|
|
|
2002-01-19 21:22:28 +01:00
|
|
|
|
#define STORE_STRUCT_RETURN(addr, sp) \
|
|
|
|
|
alpha_store_struct_return ((addr), (sp))
|
|
|
|
|
extern void alpha_store_struct_return (CORE_ADDR, CORE_ADDR);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
/**/
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Extract from an array REGBUF containing the (raw) register state
|
|
|
|
|
a function return value of type TYPE, and copy that, in virtual format,
|
|
|
|
|
into VALBUF. */
|
|
|
|
|
|
|
|
|
|
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
|
|
|
|
|
alpha_extract_return_value(TYPE, REGBUF, VALBUF)
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern void alpha_extract_return_value (struct type *, char *, char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Write into appropriate registers a function return value
|
|
|
|
|
of type TYPE, given in virtual format. */
|
|
|
|
|
|
|
|
|
|
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
|
|
|
|
|
alpha_store_return_value(TYPE, VALBUF)
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern void alpha_store_return_value (struct type *, char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Extract from an array REGBUF containing the (raw) register state
|
|
|
|
|
the address in which a function should return its structure value,
|
|
|
|
|
as a CORE_ADDR (or an expression that can be used as one). */
|
|
|
|
|
/* The address is passed in a0 upon entry to the function, but when
|
|
|
|
|
the function exits, the compiler has copied the value to v0. This
|
|
|
|
|
convention is specified by the System V ABI, so I think we can rely
|
|
|
|
|
on it. */
|
|
|
|
|
|
|
|
|
|
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
|
2002-01-19 21:22:28 +01:00
|
|
|
|
alpha_extract_struct_value_address (REGBUF)
|
|
|
|
|
extern CORE_ADDR alpha_extract_struct_value_address (char *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Structures are returned by ref in extra arg0 */
|
2002-01-19 06:26:47 +01:00
|
|
|
|
#define USE_STRUCT_CONVENTION(gcc_p, type) \
|
|
|
|
|
alpha_use_struct_convention ((gcc_p), (type))
|
|
|
|
|
extern int alpha_use_struct_convention (int, struct type *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Describe the pointer in each stack frame to the previous stack frame
|
|
|
|
|
(its caller). */
|
|
|
|
|
|
|
|
|
|
/* FRAME_CHAIN takes a frame's nominal address
|
|
|
|
|
and produces the frame's chain-pointer. */
|
|
|
|
|
|
2002-01-19 06:26:47 +01:00
|
|
|
|
#define FRAME_CHAIN(thisframe) alpha_frame_chain (thisframe)
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern CORE_ADDR alpha_frame_chain (struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Define other aspects of the stack frame. */
|
|
|
|
|
|
|
|
|
|
|
1999-05-25 20:09:09 +02:00
|
|
|
|
/* An expression that tells us whether the function invocation represented
|
|
|
|
|
by FI does not have a frame on the stack associated with it. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* We handle this differently for alpha, and maybe we should not */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
|
|
|
|
|
generic_frameless_function_invocation_not ((FI))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Saved Pc. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define FRAME_SAVED_PC(FRAME) alpha_frame_saved_pc(FRAME)
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern CORE_ADDR alpha_frame_saved_pc (struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* The alpha has two different virtual pointers for arguments and locals.
|
|
|
|
|
|
|
|
|
|
The virtual argument pointer is pointing to the bottom of the argument
|
|
|
|
|
transfer area, which is located immediately below the virtual frame
|
|
|
|
|
pointer. Its size is fixed for the native compiler, it is either zero
|
|
|
|
|
(for the no arguments case) or large enough to hold all argument registers.
|
|
|
|
|
gcc uses a variable sized argument transfer area. As it has
|
|
|
|
|
to stay compatible with the native debugging tools it has to use the same
|
|
|
|
|
virtual argument pointer and adjust the argument offsets accordingly.
|
|
|
|
|
|
|
|
|
|
The virtual local pointer is localoff bytes below the virtual frame
|
|
|
|
|
pointer, the value of localoff is obtained from the PDR. */
|
|
|
|
|
|
|
|
|
|
#define ALPHA_NUM_ARG_REGS 6
|
|
|
|
|
|
2002-01-19 07:44:56 +01:00
|
|
|
|
#define FRAME_ARGS_ADDRESS(fi) alpha_frame_args_address ((fi))
|
|
|
|
|
extern CORE_ADDR alpha_frame_args_address (struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-01-19 07:44:56 +01:00
|
|
|
|
#define FRAME_LOCALS_ADDRESS(fi) alpha_frame_locals_address ((fi))
|
|
|
|
|
extern CORE_ADDR alpha_frame_locals_address (struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Return number of args passed to a frame.
|
|
|
|
|
Can return -1, meaning no way to tell. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define FRAME_NUM_ARGS(fi) frame_num_args_unknown ((fi))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Return number of bytes at start of arglist that are not really args. */
|
|
|
|
|
|
|
|
|
|
#define FRAME_ARGS_SKIP 0
|
|
|
|
|
|
|
|
|
|
/* Put here the code to store, into a struct frame_saved_regs,
|
|
|
|
|
the addresses of the saved registers of frame described by FRAME_INFO.
|
|
|
|
|
This includes special registers such as pc and fp saved in special
|
|
|
|
|
ways in the stack frame. sp is even more special:
|
|
|
|
|
the address we return for it IS the sp for the next frame. */
|
|
|
|
|
|
|
|
|
|
#define FRAME_INIT_SAVED_REGS(frame_info) \
|
2002-01-19 07:44:56 +01:00
|
|
|
|
alpha_frame_init_saved_regs (frame_info)
|
|
|
|
|
extern void alpha_frame_init_saved_regs (struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Things needed for making the inferior call functions. */
|
|
|
|
|
|
|
|
|
|
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
|
1999-05-25 20:09:09 +02:00
|
|
|
|
(alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
extern CORE_ADDR
|
2000-05-28 03:12:42 +02:00
|
|
|
|
alpha_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Push an empty stack frame, to record the current PC, etc. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define PUSH_DUMMY_FRAME alpha_push_dummy_frame()
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern void alpha_push_dummy_frame (void);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Discard from the stack the innermost frame, restoring all registers. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define POP_FRAME alpha_pop_frame()
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern void alpha_pop_frame (void);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Alpha OSF/1 inhibits execution of code on the stack.
|
|
|
|
|
But there is no need for a dummy on the alpha. PUSH_ARGUMENTS
|
|
|
|
|
takes care of all argument handling and bp_call_dummy takes care
|
|
|
|
|
of stopping the dummy. */
|
|
|
|
|
|
|
|
|
|
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
|
|
|
|
|
|
|
|
|
|
/* On the Alpha the call dummy code is never copied to user space,
|
|
|
|
|
stopping the user call is achieved via a bp_call_dummy breakpoint.
|
|
|
|
|
But we need a fake CALL_DUMMY definition to enable the proper
|
|
|
|
|
call_function_by_hand and to avoid zero length array warnings
|
|
|
|
|
in valops.c */
|
|
|
|
|
|
2002-01-20 01:23:10 +01:00
|
|
|
|
#define CALL_DUMMY_P (1)
|
|
|
|
|
|
|
|
|
|
#define CALL_DUMMY_WORDS alpha_call_dummy_words
|
|
|
|
|
extern LONGEST alpha_call_dummy_words[];
|
|
|
|
|
|
|
|
|
|
#define SIZEOF_CALL_DUMMY_WORDS 0
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
#define CALL_DUMMY_START_OFFSET (0)
|
|
|
|
|
|
|
|
|
|
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
|
|
|
|
|
|
|
|
|
|
#define CALL_DUMMY_ADDRESS() alpha_call_dummy_address()
|
2002-01-20 01:23:10 +01:00
|
|
|
|
extern CORE_ADDR alpha_call_dummy_address (void);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Insert the specified number of args and function address
|
|
|
|
|
into a call sequence of the above form stored at DUMMYNAME.
|
|
|
|
|
We only have to set RA_REGNUM to the dummy breakpoint address
|
|
|
|
|
and T12_REGNUM (the `procedure value register') to the function address. */
|
|
|
|
|
|
2002-01-19 21:22:28 +01:00
|
|
|
|
#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);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* There's a mess in stack frame creation. See comments in blockframe.c
|
|
|
|
|
near reference to INIT_FRAME_PC_FIRST. */
|
|
|
|
|
|
2002-01-19 21:22:28 +01:00
|
|
|
|
#define INIT_FRAME_PC(fromleaf, prev) init_frame_pc_noop ((fromleaf), (prev))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
#define INIT_FRAME_PC_FIRST(fromleaf, prev) \
|
2002-01-19 21:22:28 +01:00
|
|
|
|
alpha_init_frame_pc_first ((fromleaf), (prev))
|
|
|
|
|
extern void alpha_init_frame_pc_first (int, struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Special symbol found in blocks associated with routines. We can hang
|
|
|
|
|
alpha_extra_func_info_t's off of this. */
|
|
|
|
|
|
|
|
|
|
#define MIPS_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern void ecoff_relocate_efi (struct symbol *, CORE_ADDR);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Specific information about a procedure.
|
|
|
|
|
This overlays the ALPHA's PDR records,
|
|
|
|
|
alpharead.c (ab)uses this to save memory */
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
typedef struct alpha_extra_func_info
|
|
|
|
|
{
|
|
|
|
|
long numargs; /* number of args to procedure (was iopt) */
|
|
|
|
|
PDR pdr; /* Procedure descriptor record */
|
|
|
|
|
}
|
|
|
|
|
*alpha_extra_func_info_t;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Define the extra_func_info that mipsread.c needs.
|
|
|
|
|
FIXME: We should define our own PDR interface, perhaps in a separate
|
|
|
|
|
header file. This would get rid of the <bfd.h> inclusion in all sources
|
|
|
|
|
and would abstract the mips/alpha interface from ecoff. */
|
|
|
|
|
#define mips_extra_func_info alpha_extra_func_info
|
|
|
|
|
#define mips_extra_func_info_t alpha_extra_func_info_t
|
|
|
|
|
|
|
|
|
|
|
2002-01-19 07:44:56 +01:00
|
|
|
|
#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \
|
|
|
|
|
alpha_init_extra_frame_info(fromleaf, fci)
|
|
|
|
|
extern void alpha_init_extra_frame_info (int, struct frame_info *);
|
|
|
|
|
|
|
|
|
|
#define PRINT_EXTRA_FRAME_INFO(fi) alpha_print_extra_frame_info ((fi))
|
|
|
|
|
extern void alpha_print_extra_frame_info (struct frame_info *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* It takes two values to specify a frame on the ALPHA. Sigh.
|
|
|
|
|
|
|
|
|
|
In fact, at the moment, the *PC* is the primary value that sets up
|
|
|
|
|
a frame. The PC is looked up to see what function it's in; symbol
|
|
|
|
|
information from that function tells us which register is the frame
|
|
|
|
|
pointer base, and what offset from there is the "virtual frame pointer".
|
|
|
|
|
(This is usually an offset from SP.) FIXME -- this should be cleaned
|
|
|
|
|
up so that the primary value is the SP, and the PC is used to disambiguate
|
|
|
|
|
multiple functions with the same SP that are at different stack levels. */
|
|
|
|
|
|
|
|
|
|
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* This is used by heuristic_proc_start. It should be shot it the head. */
|
|
|
|
|
#ifndef VM_MIN_ADDRESS
|
|
|
|
|
#define VM_MIN_ADDRESS (CORE_ADDR)0x120000000
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* If PC is in a shared library trampoline code, return the PC
|
|
|
|
|
where the function itself actually starts. If not, return 0. */
|
|
|
|
|
#define SKIP_TRAMPOLINE_CODE(pc) find_solib_trampoline_target (pc)
|
|
|
|
|
|
|
|
|
|
/* If the current gcc for for this target does not produce correct debugging
|
|
|
|
|
information for float parameters, both prototyped and unprototyped, then
|
|
|
|
|
define this macro. This forces gdb to always assume that floats are
|
|
|
|
|
passed as doubles and then converted in the callee.
|
|
|
|
|
|
|
|
|
|
For the alpha, it appears that the debug info marks the parameters as
|
|
|
|
|
floats regardless of whether the function is prototyped, but the actual
|
|
|
|
|
values are always passed in as doubles. Thus by setting this to 1, both
|
|
|
|
|
types of calls will work. */
|
|
|
|
|
|
2002-01-20 02:33:15 +01:00
|
|
|
|
#define COERCE_FLOAT_TO_DOUBLE(formal, actual) \
|
|
|
|
|
standard_coerce_float_to_double ((formal), (actual))
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Return TRUE if procedure descriptor PROC is a procedure descriptor
|
|
|
|
|
that refers to a dynamically generated sigtramp function.
|
|
|
|
|
|
|
|
|
|
OSF/1 doesn't use dynamic sigtramp functions, so this is always
|
|
|
|
|
FALSE. */
|
|
|
|
|
|
|
|
|
|
#define PROC_DESC_IS_DYN_SIGTRAMP(proc) (0)
|
|
|
|
|
#define SET_PROC_DESC_IS_DYN_SIGTRAMP(proc)
|
|
|
|
|
|
|
|
|
|
/* If PC is inside a dynamically generated sigtramp function, return
|
|
|
|
|
how many bytes the program counter is beyond the start of that
|
|
|
|
|
function. Otherwise, return a negative value.
|
|
|
|
|
|
|
|
|
|
OSF/1 doesn't use dynamic sigtramp functions, so this always
|
|
|
|
|
returns -1. */
|
|
|
|
|
|
|
|
|
|
#define DYNAMIC_SIGTRAMP_OFFSET(pc) (-1)
|
|
|
|
|
|
|
|
|
|
/* Translate a signal handler frame into the address of the sigcontext
|
|
|
|
|
structure. */
|
|
|
|
|
|
|
|
|
|
#define SIGCONTEXT_ADDR(frame) \
|
|
|
|
|
(read_memory_integer ((frame)->next ? frame->next->frame : frame->frame, 8))
|
|
|
|
|
|
|
|
|
|
/* If FRAME refers to a sigtramp frame, return the address of the next
|
|
|
|
|
frame. */
|
|
|
|
|
|
|
|
|
|
#define FRAME_PAST_SIGTRAMP_FRAME(frame, pc) \
|
|
|
|
|
(alpha_osf_skip_sigtramp_frame (frame, pc))
|
2000-05-28 03:12:42 +02:00
|
|
|
|
extern CORE_ADDR alpha_osf_skip_sigtramp_frame (struct frame_info *,
|
|
|
|
|
CORE_ADDR);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-01-18 19:00:44 +01:00
|
|
|
|
/* Single step based on where the current instruction will take us. */
|
|
|
|
|
extern void alpha_software_single_step (enum target_signal, int);
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#endif /* TM_ALPHA_H */
|