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