* lin-lwp.c (child_wait): Check SAVE_ERRNO instead of ERRNO in
[deliverable/binutils-gdb.git] / gdb / config / i386 / nm-fbsd.h
CommitLineData
e6031aeb 1/* Native-dependent definitions for FreeBSD/i386.
0afdd437 2 Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1997, 2000, 2001
b6ba6518 3 Free Software Foundation, Inc.
c906108c 4
c5aa993b
JM
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. */
c906108c 21
e6031aeb
MK
22#ifndef NM_FBSD_H
23#define NM_FBSD_H
c906108c 24
0afdd437
MK
25#ifdef HAVE_PT_GETDBREGS
26#define I386_USE_GENERIC_WATCHPOINTS
27#endif
28
29#include "i386/nm-i386.h"
30
31/* Provide access to the i386 hardware debugging registers. */
32
33#define I386_DR_LOW_SET_CONTROL(control) \
34 i386bsd_dr_set_control (control)
35extern void i386bsd_dr_set_control (unsigned long control);
36
37#define I386_DR_LOW_SET_ADDR(regnum, addr) \
38 i386bsd_dr_set_addr (regnum, addr)
39extern void i386bsd_dr_set_addr (int regnum, CORE_ADDR addr);
40
41#define I386_DR_LOW_RESET_ADDR(regnum) \
42 i386bsd_dr_reset_addr (regnum)
43extern void i386bsd_dr_reset_addr (int regnum);
44
45#define I386_DR_LOW_GET_STATUS() \
46 i386bsd_dr_get_status ()
47extern unsigned long i386bsd_dr_get_status (void);
48\f
49
e6031aeb
MK
50/* Type of the third argument to the `ptrace' system call. */
51#define PTRACE_ARG3_TYPE caddr_t
52
53/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
54#define FETCH_INFERIOR_REGISTERS
55
25630444
MK
56/* Override child_resume in `infptrace.c' to work around a kernel bug. */
57#define CHILD_RESUME
58
e6031aeb
MK
59/* We can attach and detach. */
60#define ATTACH_DETACH
61\f
62
63/* Support for the user struct. */
64
65/* Return the size of the user struct. */
66
67#define KERNEL_U_SIZE kernel_u_size ()
68extern int kernel_u_size (void);
c906108c
SS
69
70/* This is the amount to subtract from u.u_ar0
71 to get the offset in the core file of the register values. */
72
73#include <machine/vmparam.h>
74#define KERNEL_U_ADDR USRSTACK
75
76#define REGISTER_U_ADDR(addr, blockend, regno) \
e6031aeb
MK
77 (addr) = register_u_addr ((blockend), (regno))
78extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regno);
79\f
c906108c 80
e6031aeb 81/* Shared library support. */
c906108c 82
e6031aeb
MK
83/* The FreeBSD <link.h> uses the same condition to distinguish ELF
84 from a.out. ELF implies SVR4 shared libraries. */
85#if (defined (FREEBSD_ELF) || defined (__ELF__)) && !defined (FREEBSD_AOUT)
86#define SVR4_SHARED_LIBS
87#endif
88
89#include "solib.h" /* Support for shared libraries. */
90#ifdef SVR4_SHARED_LIBS
91#include "elf/common.h" /* Additional ELF shared library info. */
92#endif
93
94#ifndef SVR4_SHARED_LIBS
95
96/* Make structure definitions match up with those expected in `solib.c'. */
c906108c 97
c906108c
SS
98#define link_object sod
99#define lo_name sod_name
100#define lo_library sod_library
101#define lo_unused sod_reserved
102#define lo_major sod_major
103#define lo_minor sod_minor
104#define lo_next sod_next
105
106#define link_map so_map
107#define lm_addr som_addr
108#define lm_name som_path
109#define lm_next som_next
110#define lm_lop som_sod
111#define lm_lob som_sodbase
112#define lm_rwt som_write
113#define lm_ld som_dynamic
114#define lm_lpd som_spd
115
116#define link_dynamic_2 section_dispatch_table
117#define ld_loaded sdt_loaded
118#define ld_need sdt_sods
119#define ld_rules sdt_filler1
120#define ld_got sdt_got
121#define ld_plt sdt_plt
122#define ld_rel sdt_rel
123#define ld_hash sdt_hash
124#define ld_stab sdt_nzlist
125#define ld_stab_hash sdt_filler2
126#define ld_buckets sdt_buckets
127#define ld_symbols sdt_strings
128#define ld_symb_size sdt_str_sz
129#define ld_text sdt_text_sz
130#define ld_plt_sz sdt_plt_sz
131
132#define rtc_symb rt_symbol
133#define rtc_sp rt_sp
134#define rtc_next rt_next
135
136#define ld_debug so_debug
137#define ldd_version dd_version
138#define ldd_in_debugger dd_in_debugger
139#define ldd_sym_loaded dd_sym_loaded
140#define ldd_bp_addr dd_bpt_addr
141#define ldd_bp_inst dd_bpt_shadow
142#define ldd_cp dd_cc
143
144#define link_dynamic _dynamic
145#define ld_version d_version
146#define ldd d_debug
147#define ld_un d_un
148#define ld_2 d_sdt
149
e6031aeb 150#endif /* !SVR4_SHARED_LIBS */
c906108c 151
e6031aeb 152#endif /* NM_FBSD_H */
This page took 0.152 seconds and 4 git commands to generate.