MIPS/Linux support
[deliverable/binutils-gdb.git] / gdb / config / mips / tm-linux.h
1 /* Target-dependent definitions for Linux/MIPS.
2 Copyright 2001 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
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.
10
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.
15
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. */
20
21 #ifndef TM_MIPSLINUX_H
22 #define TM_MIPSLINUX_H
23
24 #include "mips/tm-mips.h"
25
26 /* We don't want to inherit tm-mips.h's shared library trampoline code. */
27
28 #undef IN_SOLIB_CALL_TRAMPOLINE
29 #undef IN_SOLIB_RETURN_TRAMPOLINE
30 #undef SKIP_TRAMPOLINE_CODE
31 #undef IGNORE_HELPER_CALL
32
33 /* FIXME: Do not include "tm-linux.h", because we do not want the host's
34 <signal.h>. Instead, copy the non-signal bits for now. */
35
36 /* We need this file for the SOLIB_TRAMPOLINE stuff. */
37
38 #include "tm-sysv4.h"
39
40 /* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
41 link.h is available on all linux platforms. For I386 and SH3/4,
42 we hard-code the information rather than use link.h anyway (for
43 the benefit of cross-debugging). We may move to doing that for
44 other architectures as well. */
45
46 #define SVR4_SHARED_LIBS
47 #include "solib.h" /* Support for shared libraries. */
48
49 /* End from "tm-linux.h". */
50
51 /* There's an E_MIPS_ABI_O32 flag in e_flags, but we don't use it - in
52 fact, using it may violate the o32 ABI. */
53
54 #define MIPS_DEFAULT_ABI MIPS_ABI_O32
55
56 /* Linux/MIPS has __SIGRTMAX == 127. */
57
58 #define REALTIME_LO 32
59 #define REALTIME_HI 128
60
61 /* Use target_specific function to define link map offsets. */
62
63 extern struct link_map_offsets *mips_linux_svr4_fetch_link_map_offsets (void);
64 #define SVR4_FETCH_LINK_MAP_OFFSETS() \
65 mips_linux_svr4_fetch_link_map_offsets ()
66
67 /* Details about jmp_buf. */
68
69 #define JB_ELEMENT_SIZE 4
70 #define JB_PC 0
71
72 /* Figure out where the longjmp will land. Slurp the arguments out of the
73 stack. We expect the first arg to be a pointer to the jmp_buf structure
74 from which we extract the pc (JB_PC) that we will land at. The pc is
75 copied into ADDR. This routine returns 1 on success. */
76
77 #define GET_LONGJMP_TARGET(ADDR) mips_linux_get_longjmp_target(ADDR)
78 extern int mips_linux_get_longjmp_target (CORE_ADDR *);
79
80 /* We do single stepping in software. */
81
82 #define SOFTWARE_SINGLE_STEP_P() 1
83 #define SOFTWARE_SINGLE_STEP(sig,bp_p) mips_software_single_step (sig, bp_p)
84
85 /* FIXME: This still needs to be implemented. */
86
87 #undef IN_SIGTRAMP
88 #define IN_SIGTRAMP(pc, name) (0)
89
90 #endif /* TM_MIPSLINUX_H */
This page took 0.030769 seconds and 4 git commands to generate.