]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/config/i386/nm-linux.h
PARAMS removal.
[thirdparty/binutils-gdb.git] / gdb / config / i386 / nm-linux.h
CommitLineData
c906108c 1/* Native support for GNU/Linux, for GDB, the GNU debugger.
f60300e7 2 Copyright (C) 1986, 1987, 1989, 1992, 1996, 1998, 2000
c906108c
SS
3 Free Software Foundation, Inc.
4
c5aa993b 5 This file is part of GDB.
c906108c 6
c5aa993b
JM
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.
c906108c 11
c5aa993b
JM
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.
c906108c 16
c5aa993b
JM
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. */
c906108c
SS
21
22#ifndef NM_LINUX_H
23#define NM_LINUX_H
24
25#include "i386/nm-i386v.h"
c2d11a7d 26#include "nm-linux.h"
c906108c
SS
27
28/* Return sizeof user struct to callers in less machine dependent routines */
29
30#define KERNEL_U_SIZE kernel_u_size()
a14ed312 31extern int kernel_u_size (void);
c906108c 32
c906108c
SS
33#define U_REGS_OFFSET 0
34
35/* GNU/Linux supports the 386 hardware debugging registers. */
36
37#define TARGET_HAS_HARDWARE_WATCHPOINTS
38
39#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
40
41/* After a watchpoint trap, the PC points to the instruction after
42 the one that caused the trap. Therefore we don't need to step over it.
43 But we do need to reset the status register to avoid another trap. */
44#define HAVE_CONTINUABLE_WATCHPOINT
45
46#define STOPPED_BY_WATCHPOINT(W) \
47 i386_stopped_by_watchpoint (inferior_pid)
48
49/* Use these macros for watchpoint insertion/removal. */
50
51#define target_insert_watchpoint(addr, len, type) \
52 i386_insert_watchpoint (inferior_pid, addr, len, type)
53
54#define target_remove_watchpoint(addr, len, type) \
55 i386_remove_watchpoint (inferior_pid, addr, len)
56
57/* We define this if link.h is available, because with ELF we use SVR4 style
58 shared libraries. */
59
60#ifdef HAVE_LINK_H
61#define SVR4_SHARED_LIBS
62#include "solib.h" /* Support for shared libraries. */
63#endif
64
f60300e7 65/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
d4f3574e
SS
66#define FETCH_INFERIOR_REGISTERS
67
f60300e7
MK
68/* Nevertheless, define CANNOT_{FETCH,STORE}_REGISTER, because we fall
69 back on the code `infptrace.c' (well a copy of that code in
70 `i386-linux-nat.c' for now) and we can access only the
71 general-purpose registers in that way. */
72#define CANNOT_FETCH_REGISTER(regno) ((regno) >= NUM_GREGS)
73#define CANNOT_STORE_REGISTER(regno) CANNOT_FETCH_REGISTER (regno)
74
a6abb2c0
MK
75/* Override child_resume in `infptrace.c'. */
76#define CHILD_RESUME
77
a14ed312
KB
78extern CORE_ADDR i386_stopped_by_watchpoint (int);
79extern int i386_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw);
80extern int i386_remove_watchpoint (int pid, CORE_ADDR addr, int len);
c906108c
SS
81
82#endif /* #ifndef NM_LINUX_H */