Commit | Line | Data |
---|---|---|
92362027 AC |
1 | /* Native support for GNU/Linux x86-64. |
2 | ||
430eaf2e | 3 | Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
c4f35dd8 MK |
4 | |
5 | Contributed by Jiri Smid, SuSE Labs. | |
53e95fcf JS |
6 | |
7 | This file is part of GDB. | |
8 | ||
9 | This program is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
11 | the Free Software Foundation; either version 2 of the License, or | |
12 | (at your option) any later version. | |
13 | ||
14 | This program is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
20 | along with this program; if not, write to the Free Software | |
21 | Foundation, Inc., 59 Temple Place - Suite 330, | |
22 | Boston, MA 02111-1307, USA. */ | |
23 | ||
9c1488cb MK |
24 | #ifndef NM_LINUX64_H |
25 | #define NM_LINUX64_H | |
53e95fcf | 26 | |
c4f35dd8 | 27 | /* GNU/Linux supports the i386 hardware debugging registers. */ |
53e95fcf | 28 | #define I386_USE_GENERIC_WATCHPOINTS |
c4f35dd8 | 29 | |
53e95fcf | 30 | #include "i386/nm-i386.h" |
c4f35dd8 | 31 | #include "config/nm-linux.h" |
53e95fcf | 32 | |
c4f35dd8 | 33 | /* Support for 8-byte wide hardware watchpoints. */ |
53e95fcf JS |
34 | #define TARGET_HAS_DR_LEN_8 1 |
35 | ||
36 | /* Provide access to the i386 hardware debugging registers. */ | |
37 | ||
430eaf2e | 38 | extern void amd64_linux_dr_set_control (unsigned long control); |
53e95fcf | 39 | #define I386_DR_LOW_SET_CONTROL(control) \ |
430eaf2e | 40 | amd64_linux_dr_set_control (control) |
53e95fcf | 41 | |
430eaf2e | 42 | extern void amd64_linux_dr_set_addr (int regnum, CORE_ADDR addr); |
53e95fcf | 43 | #define I386_DR_LOW_SET_ADDR(regnum, addr) \ |
430eaf2e | 44 | amd64_linux_dr_set_addr (regnum, addr) |
53e95fcf | 45 | |
430eaf2e | 46 | extern void amd64_linux_dr_reset_addr (int regnum); |
53e95fcf | 47 | #define I386_DR_LOW_RESET_ADDR(regnum) \ |
430eaf2e | 48 | amd64_linux_dr_reset_addr (regnum) |
53e95fcf | 49 | |
430eaf2e | 50 | extern unsigned long amd64_linux_dr_get_status (void); |
53e95fcf | 51 | #define I386_DR_LOW_GET_STATUS() \ |
430eaf2e | 52 | amd64_linux_dr_get_status () |
53e95fcf JS |
53 | \f |
54 | ||
c4f35dd8 MK |
55 | /* Type of the third argument to the `ptrace' system call. */ |
56 | #define PTRACE_ARG3_TYPE long | |
53e95fcf | 57 | |
c4f35dd8 MK |
58 | /* Type of the fourth argument to the `ptrace' system call. */ |
59 | #define PTRACE_XFER_TYPE long | |
53e95fcf JS |
60 | |
61 | /* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ | |
62 | #define FETCH_INFERIOR_REGISTERS | |
53e95fcf | 63 | |
4056d258 ML |
64 | /* `linux-nat.c' and `i386-nat.c' have their own versions of |
65 | child_post_startup_inferior. Define this to use the copy in | |
66 | `x86-86-linux-nat.c' instead, which calls both. */ | |
67 | #define LINUX_CHILD_POST_STARTUP_INFERIOR | |
68 | ||
9c1488cb | 69 | #endif /* nm-linux64.h */ |