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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
-#define SKIP_PROLOGUE(pc) \
-{ register int op = (unsigned char) read_memory_integer (pc, 1); \
- if (op == 0x11) pc += 2; /* skip brb */ \
- if (op == 0x31) pc += 3; /* skip brw */ \
- if (op == 0xC2 && \
- ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5E) \
- pc += 3; /* skip subl2 */ \
- if (op == 0x9E && \
- ((unsigned char) read_memory_integer (pc+1, 1)) == 0xAE && \
- ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5E) \
- pc += 4; /* skip movab */ \
- if (op == 0x9E && \
- ((unsigned char) read_memory_integer (pc+1, 1)) == 0xCE && \
- ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5E) \
- pc += 5; /* skip movab */ \
- if (op == 0x9E && \
- ((unsigned char) read_memory_integer (pc+1, 1)) == 0xEE && \
- ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5E) \
- pc += 7; /* skip movab */ \
-}
+extern CORE_ADDR vax_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (vax_skip_prologue (pc))
/* Immediately after a function call, return the saved pc.
Can't always go through the frames for this because on some machines
/* On the VAX, sigtramp is in the u area. Can't check the exact
addresses because for cross-debugging we don't have VAX include
files around. This should be close enough. */
-#define SIGTRAMP_START STACK_END_ADDR
-#define SIGTRAMP_END 0x80000000
+#define SIGTRAMP_START(pc) STACK_END_ADDR
+#define SIGTRAMP_END(pc) 0x80000000
/* Stack grows downward. */
-#define INNER_THAN <
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. */
#define DECR_PC_AFTER_BREAK 0
-/* Nonzero if instruction at PC is a return instruction. */
-
-#define ABOUT_TO_RETURN(pc) (read_memory_integer (pc, 1) == 04)
-
/* Return 1 if P points to an invalid floating point value.
LEN is the length in bytes -- not relevant on the Vax. */
#define INVALID_FLOAT(p, len) ((*(short *) p & 0xff80) == 0x8000)
-/* Say how long (ordinary) registers are. */
+/* 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_TYPE long
+#define REGISTER_SIZE 4
/* Number of machine registers */
#define MAX_REGISTER_VIRTUAL_SIZE 4
-/* Nonzero if register N requires conversion
- from raw format to virtual format. */
-
-#define REGISTER_CONVERTIBLE(N) 0
-
-/* Convert data from raw format for register REGNUM
- to virtual format for register REGNUM. */
-
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
- bcopy ((FROM), (TO), 4);
-
-/* Convert data from virtual format for register REGNUM
- to raw format for register REGNUM. */
-
-#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
- bcopy ((FROM), (TO), 4);
-
/* Return the GDB type object for the "standard" data type
of data in register N. */
into VALBUF. */
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- bcopy (REGBUF, VALBUF, TYPE_LENGTH (TYPE))
+ memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE))
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
{ register int regnum; \
register int regmask = read_memory_integer ((frame_info)->frame+4, 4) >> 16; \
register CORE_ADDR next_addr; \
- bzero (&frame_saved_regs, sizeof frame_saved_regs); \
+ memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \
next_addr = (frame_info)->frame + 16; \
/* Regmask's low bit is for register 0, \
which is the first one that would be pushed. */ \
fp += (regnum + 1) * 4; } \
write_register (SP_REGNUM, fp); \
flush_cached_frames (); \
- set_current_frame (create_new_frame (read_register (FP_REGNUM),\
- read_pc ())); }
+}
/* This sequence of words is the instructions
calls #69, @#32323232
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
+#define CALL_DUMMY_BREAKPOINT_OFFSET 7
+
/* Insert the specified number of args and function address
into a call sequence of the above form stored at DUMMYNAME. */
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
{ *((char *) dummyname + 1) = nargs; \
*(int *)((char *) dummyname + 3) = fun; }
+
+/* If vax pcc says CHAR or SHORT, it provides the correct address. */
+
+#define BELIEVE_PCC_PROMOTION 1