* emulparams/ns32knbsd.sh (EXECUTABLE_SYMBOLS): Set _DYNAMIC to 0.
[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
a90cd31d
MK
59/* Override child_pid_to_exec_file in 'inftarg.c'. */
60#define CHILD_PID_TO_EXEC_FILE
61
e6031aeb
MK
62/* We can attach and detach. */
63#define ATTACH_DETACH
64\f
65
66/* Support for the user struct. */
67
68/* Return the size of the user struct. */
69
70#define KERNEL_U_SIZE kernel_u_size ()
71extern int kernel_u_size (void);
c906108c
SS
72
73/* This is the amount to subtract from u.u_ar0
74 to get the offset in the core file of the register values. */
75
76#include <machine/vmparam.h>
77#define KERNEL_U_ADDR USRSTACK
78
79#define REGISTER_U_ADDR(addr, blockend, regno) \
e6031aeb
MK
80 (addr) = register_u_addr ((blockend), (regno))
81extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regno);
82\f
c906108c 83
e6031aeb 84/* Shared library support. */
c906108c 85
e6031aeb
MK
86/* The FreeBSD <link.h> uses the same condition to distinguish ELF
87 from a.out. ELF implies SVR4 shared libraries. */
88#if (defined (FREEBSD_ELF) || defined (__ELF__)) && !defined (FREEBSD_AOUT)
89#define SVR4_SHARED_LIBS
90#endif
91
92#include "solib.h" /* Support for shared libraries. */
93#ifdef SVR4_SHARED_LIBS
94#include "elf/common.h" /* Additional ELF shared library info. */
95#endif
96
97#ifndef SVR4_SHARED_LIBS
98
99/* Make structure definitions match up with those expected in `solib.c'. */
c906108c 100
c906108c
SS
101#define link_object sod
102#define lo_name sod_name
103#define lo_library sod_library
104#define lo_unused sod_reserved
105#define lo_major sod_major
106#define lo_minor sod_minor
107#define lo_next sod_next
108
109#define link_map so_map
110#define lm_addr som_addr
111#define lm_name som_path
112#define lm_next som_next
113#define lm_lop som_sod
114#define lm_lob som_sodbase
115#define lm_rwt som_write
116#define lm_ld som_dynamic
117#define lm_lpd som_spd
118
119#define link_dynamic_2 section_dispatch_table
120#define ld_loaded sdt_loaded
121#define ld_need sdt_sods
122#define ld_rules sdt_filler1
123#define ld_got sdt_got
124#define ld_plt sdt_plt
125#define ld_rel sdt_rel
126#define ld_hash sdt_hash
127#define ld_stab sdt_nzlist
128#define ld_stab_hash sdt_filler2
129#define ld_buckets sdt_buckets
130#define ld_symbols sdt_strings
131#define ld_symb_size sdt_str_sz
132#define ld_text sdt_text_sz
133#define ld_plt_sz sdt_plt_sz
134
135#define rtc_symb rt_symbol
136#define rtc_sp rt_sp
137#define rtc_next rt_next
138
139#define ld_debug so_debug
140#define ldd_version dd_version
141#define ldd_in_debugger dd_in_debugger
142#define ldd_sym_loaded dd_sym_loaded
143#define ldd_bp_addr dd_bpt_addr
144#define ldd_bp_inst dd_bpt_shadow
145#define ldd_cp dd_cc
146
147#define link_dynamic _dynamic
148#define ld_version d_version
149#define ldd d_debug
150#define ld_un d_un
151#define ld_2 d_sdt
152
e6031aeb 153#endif /* !SVR4_SHARED_LIBS */
c906108c 154
e6031aeb 155#endif /* NM_FBSD_H */
This page took 0.172748 seconds and 4 git commands to generate.