1 |
1181 |
sfurman |
/* Native support for GNU/Linux x86-64.
|
2 |
|
|
|
3 |
|
|
Copyright 2001, 2002 Free Software Foundation, Inc. Contributed by
|
4 |
|
|
Jiri Smid, SuSE Labs.
|
5 |
|
|
|
6 |
|
|
This file is part of GDB.
|
7 |
|
|
|
8 |
|
|
This program is free software; you can redistribute it and/or modify
|
9 |
|
|
it under the terms of the GNU General Public License as published by
|
10 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
11 |
|
|
(at your option) any later version.
|
12 |
|
|
|
13 |
|
|
This program is distributed in the hope that it will be useful,
|
14 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
|
|
GNU General Public License for more details.
|
17 |
|
|
|
18 |
|
|
You should have received a copy of the GNU General Public License
|
19 |
|
|
along with this program; if not, write to the Free Software
|
20 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
21 |
|
|
Boston, MA 02111-1307, USA. */
|
22 |
|
|
|
23 |
|
|
#ifndef NM_X86_64_H
|
24 |
|
|
#define NM_X86_64_H
|
25 |
|
|
|
26 |
|
|
#include "config/nm-linux.h"
|
27 |
|
|
|
28 |
|
|
#define I386_USE_GENERIC_WATCHPOINTS
|
29 |
|
|
#include "i386/nm-i386.h"
|
30 |
|
|
|
31 |
|
|
/* Support for 8-byte wide hw watchpoints. */
|
32 |
|
|
#define TARGET_HAS_DR_LEN_8 1
|
33 |
|
|
|
34 |
|
|
/* Provide access to the i386 hardware debugging registers. */
|
35 |
|
|
|
36 |
|
|
extern void x86_64_linux_dr_set_control (unsigned long control);
|
37 |
|
|
#define I386_DR_LOW_SET_CONTROL(control) \
|
38 |
|
|
x86_64_linux_dr_set_control (control)
|
39 |
|
|
|
40 |
|
|
extern void x86_64_linux_dr_set_addr (int regnum, CORE_ADDR addr);
|
41 |
|
|
#define I386_DR_LOW_SET_ADDR(regnum, addr) \
|
42 |
|
|
x86_64_linux_dr_set_addr (regnum, addr)
|
43 |
|
|
|
44 |
|
|
extern void x86_64_linux_dr_reset_addr (int regnum);
|
45 |
|
|
#define I386_DR_LOW_RESET_ADDR(regnum) \
|
46 |
|
|
x86_64_linux_dr_reset_addr (regnum)
|
47 |
|
|
|
48 |
|
|
extern unsigned long x86_64_linux_dr_get_status (void);
|
49 |
|
|
#define I386_DR_LOW_GET_STATUS() \
|
50 |
|
|
x86_64_linux_dr_get_status ()
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
#define REGISTER_U_ADDR(addr, blockend, regno) \
|
54 |
|
|
(addr) = x86_64_register_u_addr ((blockend),(regno));
|
55 |
|
|
CORE_ADDR x86_64_register_u_addr (CORE_ADDR, int);
|
56 |
|
|
|
57 |
|
|
/* Return the size of the user struct. */
|
58 |
|
|
#define KERNEL_U_SIZE kernel_u_size()
|
59 |
|
|
extern int kernel_u_size (void);
|
60 |
|
|
|
61 |
|
|
/* Offset of the registers within the user area. */
|
62 |
|
|
#define U_REGS_OFFSET 0
|
63 |
|
|
|
64 |
|
|
/* This is the amount to subtract from u.u_ar0
|
65 |
|
|
to get the offset in the core file of the register values. */
|
66 |
|
|
#define KERNEL_U_ADDR 0x0
|
67 |
|
|
|
68 |
|
|
#define PTRACE_ARG3_TYPE void*
|
69 |
|
|
#define PTRACE_XFER_TYPE unsigned long
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
/* We define this if link.h is available, because with ELF we use SVR4 style
|
73 |
|
|
shared libraries. */
|
74 |
|
|
|
75 |
|
|
#ifdef HAVE_LINK_H
|
76 |
|
|
#define SVR4_SHARED_LIBS
|
77 |
|
|
#include "solib.h" /* Support for shared libraries. */
|
78 |
|
|
#endif
|
79 |
|
|
|
80 |
|
|
/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
|
81 |
|
|
#define FETCH_INFERIOR_REGISTERS
|
82 |
|
|
|
83 |
|
|
#undef PREPARE_TO_PROCEED
|
84 |
|
|
|
85 |
|
|
#include <signal.h>
|
86 |
|
|
|
87 |
|
|
extern void lin_thread_get_thread_signals (sigset_t * mask);
|
88 |
|
|
#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask)
|
89 |
|
|
|
90 |
|
|
#endif /* NM_X86_64.h */
|