Commit | Line | Data |
---|---|---|
16461d7d | 1 | /* Native support for GNU/Linux, for GDB, the GNU debugger. |
b6ba6518 | 2 | Copyright 1999, 2000, 2001 |
16461d7d KB |
3 | Free Software Foundation, Inc. |
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 | ||
22 | #ifndef NM_LINUX_H | |
23 | #define NM_LINUX_H | |
24 | ||
d61e6540 | 25 | #include "nm-linux.h" |
16461d7d KB |
26 | |
27 | /* Note: It seems likely that we'll have to eventually define | |
28 | FETCH_INFERIOR_REGISTERS. But until that time, we'll make do | |
29 | with the following. */ | |
30 | ||
31 | #define CANNOT_FETCH_REGISTER(regno) ia64_cannot_fetch_register(regno) | |
32 | extern int ia64_cannot_fetch_register (int regno); | |
33 | ||
34 | #define CANNOT_STORE_REGISTER(regno) ia64_cannot_store_register(regno) | |
35 | extern int ia64_cannot_store_register (int regno); | |
36 | ||
37 | #ifdef GDBSERVER | |
38 | #define REGISTER_U_ADDR(addr, blockend, regno) \ | |
39 | (addr) = ia64_register_u_addr ((blockend),(regno)); | |
40 | ||
41 | extern int ia64_register_u_addr(int, int); | |
42 | #endif /* GDBSERVER */ | |
43 | ||
364693ab KB |
44 | #define U_REGS_OFFSET 0 |
45 | ||
16461d7d KB |
46 | #define PTRACE_ARG3_TYPE long |
47 | #define PTRACE_XFER_TYPE long | |
48 | ||
acf7b9e1 KB |
49 | /* Hardware watchpoints */ |
50 | ||
51 | #define TARGET_HAS_HARDWARE_WATCHPOINTS | |
52 | ||
53 | #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1 | |
54 | ||
55 | /* The IA-64 architecture can step over a watch point (without triggering | |
56 | it again) if the "dd" (data debug fault disable) bit in the processor | |
57 | status word is set. | |
58 | ||
59 | This PSR bit is set in ia64_linux_stopped_by_watchpoint when the | |
60 | code there has determined that a hardware watchpoint has indeed | |
61 | been hit. The CPU will then be able to execute one instruction | |
62 | without triggering a watchpoint. */ | |
63 | #define HAVE_STEPPABLE_WATCHPOINT 1 | |
64 | ||
65 | #define STOPPED_BY_WATCHPOINT(W) \ | |
39f77062 KB |
66 | ia64_linux_stopped_by_watchpoint (inferior_ptid) |
67 | extern CORE_ADDR ia64_linux_stopped_by_watchpoint (ptid_t ptid); | |
acf7b9e1 KB |
68 | |
69 | #define target_insert_watchpoint(addr, len, type) \ | |
39f77062 KB |
70 | ia64_linux_insert_watchpoint (inferior_ptid, addr, len, type) |
71 | extern int ia64_linux_insert_watchpoint (ptid_t ptid, CORE_ADDR addr, | |
acf7b9e1 KB |
72 | int len, int rw); |
73 | ||
74 | #define target_remove_watchpoint(addr, len, type) \ | |
39f77062 KB |
75 | ia64_linux_remove_watchpoint (inferior_ptid, addr, len) |
76 | extern int ia64_linux_remove_watchpoint (ptid_t ptid, CORE_ADDR addr, | |
77 | int len); | |
acf7b9e1 | 78 | |
fbad0893 KB |
79 | /* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h |
80 | once we have converted all Linux targets to use the new threads | |
81 | stuff (without the #undef of course). */ | |
82 | ||
83 | extern int lin_lwp_prepare_to_proceed (void); | |
84 | #undef PREPARE_TO_PROCEED | |
85 | #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () | |
86 | ||
39f77062 KB |
87 | extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); |
88 | #define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) | |
fbad0893 KB |
89 | |
90 | #include <signal.h> | |
91 | ||
92 | extern void lin_thread_get_thread_signals (sigset_t *mask); | |
93 | #define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) | |
94 | ||
16461d7d | 95 | #endif /* #ifndef NM_LINUX_H */ |