Phase 1 of the ptid_t changes.
[deliverable/binutils-gdb.git] / gdb / config / i386 / nm-linux.h
CommitLineData
fb0e1ba7 1/* Native support for Linux/x86.
b6ba6518 2 Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
84346e11 3 1999, 2000, 2001
c906108c
SS
4 Free Software Foundation, Inc.
5
c5aa993b 6 This file is part of GDB.
c906108c 7
c5aa993b
JM
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.
c906108c 12
c5aa993b
JM
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.
c906108c 17
c5aa993b
JM
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. */
c906108c
SS
22
23#ifndef NM_LINUX_H
24#define NM_LINUX_H
25
84346e11
MK
26/* GNU/Linux supports the i386 hardware debugging registers. */
27#define I386_USE_GENERIC_WATCHPOINTS
28
29#include "i386/nm-i386.h"
c2d11a7d 30#include "nm-linux.h"
c906108c 31
84346e11
MK
32/* Return sizeof user struct to callers in less machine dependent
33 routines. */
c906108c 34
a14ed312 35extern int kernel_u_size (void);
84346e11 36#define KERNEL_U_SIZE kernel_u_size()
c906108c 37
c906108c
SS
38#define U_REGS_OFFSET 0
39
84346e11
MK
40extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regnum);
41#define REGISTER_U_ADDR(addr, blockend, regnum) \
42 (addr) = register_u_addr (blockend, regnum)
c906108c 43
84346e11 44/* Provide access to the i386 hardware debugging registers. */
c906108c 45
7bf0983e 46extern void i386_linux_dr_set_control (unsigned long control);
84346e11
MK
47#define I386_DR_LOW_SET_CONTROL(control) \
48 i386_linux_dr_set_control (control)
c906108c 49
84346e11
MK
50extern void i386_linux_dr_set_addr (int regnum, CORE_ADDR addr);
51#define I386_DR_LOW_SET_ADDR(regnum, addr) \
52 i386_linux_dr_set_addr (regnum, addr)
c906108c 53
84346e11
MK
54extern void i386_linux_dr_reset_addr (int regnum);
55#define I386_DR_LOW_RESET_ADDR(regnum) \
56 i386_linux_dr_reset_addr (regnum)
c906108c 57
7bf0983e 58extern unsigned long i386_linux_dr_get_status (void);
84346e11
MK
59#define I386_DR_LOW_GET_STATUS() \
60 i386_linux_dr_get_status ()
c906108c 61
84346e11
MK
62/* We define this if link.h is available, because with ELF we use SVR4
63 style shared libraries. */
c906108c
SS
64
65#ifdef HAVE_LINK_H
66#define SVR4_SHARED_LIBS
84346e11 67#include "solib.h" /* Support for shared libraries. */
c906108c
SS
68#endif
69
f60300e7 70/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
d4f3574e
SS
71#define FETCH_INFERIOR_REGISTERS
72
84346e11
MK
73/* Nevertheless, define CANNOT_{FETCH,STORE}_REGISTER, because we
74 might fall back on the code `infptrace.c' (well a copy of that code
75 in `i386-linux-nat.c' for now) and we can access only the
f60300e7 76 general-purpose registers in that way. */
d5d65353
PS
77extern int cannot_fetch_register (int regno);
78extern int cannot_store_register (int regno);
79#define CANNOT_FETCH_REGISTER(regno) cannot_store_register (regno)
80#define CANNOT_STORE_REGISTER(regno) cannot_fetch_register (regno)
f60300e7 81
a6abb2c0
MK
82/* Override child_resume in `infptrace.c'. */
83#define CHILD_RESUME
84
fb0e1ba7
MK
85/* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h
86 once we have converted all Linux targets to use the new threads
87 stuff (without the #undef of course). */
88
89extern int lin_lwp_prepare_to_proceed (void);
90#undef PREPARE_TO_PROCEED
91#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
92
39f77062
KB
93extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
94#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
fb0e1ba7 95
8c3a7998
MK
96#include <signal.h>
97
fb0e1ba7
MK
98extern void lin_thread_get_thread_signals (sigset_t *mask);
99#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask)
100
101#endif /* nm_linux.h */
This page took 0.127015 seconds and 4 git commands to generate.