Commit | Line | Data |
---|---|---|
f8d13125 | 1 | /* Native support for GNU/Linux. |
92362027 AC |
2 | |
3 | Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | |
c2d11a7d JM |
4 | |
5 | This file is part of GDB. | |
6 | ||
7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 2 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with this program; if not, write to the Free Software | |
19 | Foundation, Inc., 59 Temple Place - Suite 330, | |
20 | Boston, MA 02111-1307, USA. */ | |
21 | ||
da3331ec AC |
22 | struct target_ops; |
23 | ||
92362027 | 24 | /* GNU/Linux is SVR4-ish but its /proc file system isn't. */ |
c2d11a7d JM |
25 | #undef USE_PROC_FS |
26 | ||
11d18042 | 27 | /* Tell GDB that we can attach and detach other processes. */ |
c2d11a7d JM |
28 | #define ATTACH_DETACH |
29 | ||
a14bd2ea MK |
30 | /* Since we're building a native debugger, we can include <signal.h> |
31 | to find the range of real-time signals. */ | |
32 | ||
33 | #include <signal.h> | |
34 | ||
35 | #ifdef __SIGRTMIN | |
36 | #define REALTIME_LO __SIGRTMIN | |
37 | #define REALTIME_HI (__SIGRTMAX + 1) | |
38 | #endif | |
39 | ||
11d18042 MK |
40 | /* We define this if link.h is available, because with ELF we use SVR4 |
41 | style shared libraries. */ | |
c2d11a7d JM |
42 | |
43 | #ifdef HAVE_LINK_H | |
44 | #define SVR4_SHARED_LIBS | |
11d18042 | 45 | #include "solib.h" /* Support for shared libraries. */ |
c2d11a7d | 46 | #endif |
11d18042 | 47 | \f |
c2d11a7d | 48 | |
a14bd2ea MK |
49 | /* Override child_wait in `inftarg.c'. */ |
50 | struct target_waitstatus; | |
51 | extern ptid_t child_wait (ptid_t ptid, struct target_waitstatus *ourstatus); | |
52 | #define CHILD_WAIT | |
c2d11a7d | 53 | |
a14bd2ea MK |
54 | extern int lin_lwp_prepare_to_proceed (void); |
55 | #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () | |
c2d11a7d | 56 | |
a14bd2ea MK |
57 | extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); |
58 | #define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) | |
c2d11a7d | 59 | |
a14bd2ea MK |
60 | extern void lin_thread_get_thread_signals (sigset_t *mask); |
61 | #define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) | |
ed9a39eb JM |
62 | |
63 | /* Defined to make stepping-over-breakpoints be thread-atomic. */ | |
64 | #define USE_THREAD_STEP_NEEDED 1 | |
a14bd2ea | 65 | \f |
ed9a39eb | 66 | |
c60c0f5f MS |
67 | /* Use elf_gregset_t and elf_fpregset_t, rather than |
68 | gregset_t and fpregset_t. */ | |
69 | ||
8f0b51af KB |
70 | #define GDB_GREGSET_T elf_gregset_t |
71 | #define GDB_FPREGSET_T elf_fpregset_t | |
4b09dc8c MS |
72 | |
73 | /* Override child_pid_to_exec_file in 'inftarg.c'. */ | |
74 | #define CHILD_PID_TO_EXEC_FILE | |
75 | ||
eb784848 DJ |
76 | struct mem_attrib; |
77 | extern int linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len, | |
78 | int write, struct mem_attrib *attrib, | |
79 | struct target_ops *target); |