* config/arm/linux.mt: Remove code protected by GDBSERVER define.
[deliverable/binutils-gdb.git] / gdb / config / m68k / tm-delta68.h
CommitLineData
c906108c 1/* Target definitions for delta68.
a1de33a8 2 Copyright 1993, 1994, 1998, 1999, 2000 Free Software Foundation, Inc.
c906108c 3
c5aa993b 4 This file is part of GDB.
c906108c 5
c5aa993b
JM
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
c906108c 10
c5aa993b
JM
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
c906108c 15
c5aa993b
JM
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
c906108c 20
da3331ec
AC
21struct frame_info;
22
f88e2c52
AC
23#include "regcache.h"
24
c906108c
SS
25/* Define BPT_VECTOR if it is different than the default.
26 This is the vector number used by traps to indicate a breakpoint. */
27
28#define BPT_VECTOR 0x1
29
30#define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
31#define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
32
33/* Amount PC must be decremented by after a breakpoint.
34 On the Delta, the kernel decrements it for us. */
35
36#define DECR_PC_AFTER_BREAK 0
37
38/* Not sure what happens if we try to store this register, but
39 phdm@info.ucl.ac.be says we need this define. */
40
41#define CANNOT_STORE_REGISTER(regno) (regno == FPI_REGNUM)
42
43/* Extract from an array REGBUF containing the (raw) register state
44 a function return value of type TYPE, and copy that, in virtual format,
45 into VALBUF. */
46
47/* When it returns a float/double value, use fp0 in sysV68. */
48/* When it returns a pointer value, use a0 in sysV68. */
49
26e9b323 50#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
c906108c 51 if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
781a750d 52 DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
c906108c
SS
53 &REGBUF[REGISTER_BYTE (FP0_REGNUM)], \
54 VALBUF); \
55 else \
56 memcpy ((VALBUF), \
57 (char *) ((REGBUF) + \
58 (TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : \
59 (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)))), \
60 TYPE_LENGTH(TYPE))
61
62/* Write into appropriate registers a function return value
63 of type TYPE, given in virtual format. */
64
65/* When it returns a float/double value, use fp0 in sysV68. */
66/* When it returns a pointer value, use a0 in sysV68. */
67
ebba8386 68#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
c906108c
SS
69 if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
70 { \
71 char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
781a750d 72 DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
73937e03 73 deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
c906108c
SS
74 raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
75 } \
76 else \
73937e03 77 deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
c906108c
SS
78 VALBUF, TYPE_LENGTH (TYPE))
79
80/* Return number of args passed to a frame.
81 Can return -1, meaning no way to tell. */
82
a14ed312 83extern int delta68_frame_num_args (struct frame_info *fi);
cce74817 84#define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
c906108c
SS
85
86/* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
87 the processor's instruction cache as it should. */
88#define CLEAR_INSN_CACHE() clear_insn_cache()
89
90#include "m68k/tm-m68k.h"
91
92/* Extract from an array REGBUF containing the (raw) register state
93 the address in which a function should return its structure value,
94 as a CORE_ADDR (or an expression that can be used as one). */
95
26e9b323
AC
96#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
97#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
c906108c 98 (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
89c3b6d3 99
a14ed312 100extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
89c3b6d3
PDM
101#define IN_SIGTRAMP(pc,name) delta68_in_sigtramp (pc, name)
102
a14ed312 103extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
8bedc050
AC
104#undef DEPRECATED_FRAME_SAVED_PC
105#define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
89c3b6d3 106
a14ed312 107extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
89c3b6d3
PDM
108#undef FRAME_ARGS_ADDRESS
109#define FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
This page took 0.349502 seconds and 4 git commands to generate.