Commit | Line | Data |
---|---|---|
eb7cedd9 MK |
1 | /* Native-dependent definitions for OpenBSD/i386. |
2 | Copyright 2001 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | #ifndef NM_OBSD_H | |
22 | #define NM_OBSD_H | |
23 | ||
24 | /* Type of the third argument to the `ptrace' system call. */ | |
25 | #define PTRACE_ARG3_TYPE caddr_t | |
26 | ||
27 | /* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ | |
28 | #define FETCH_INFERIOR_REGISTERS | |
29 | ||
30 | /* We can attach and detach. */ | |
31 | #define ATTACH_DETACH | |
32 | \f | |
33 | ||
34 | /* Support for the user struct. */ | |
35 | ||
36 | /* Return the size of the user struct. */ | |
37 | ||
38 | #define KERNEL_U_SIZE kernel_u_size () | |
39 | extern int kernel_u_size (void); | |
40 | ||
41 | /* This is the amount to subtract from u.u_ar0 | |
42 | to get the offset in the core file of the register values. */ | |
43 | ||
44 | #include <machine/vmparam.h> | |
45 | #define KERNEL_U_ADDR USRSTACK | |
46 | ||
47 | #define REGISTER_U_ADDR(addr, blockend, regno) \ | |
48 | (addr) = register_u_addr ((blockend), (regno)) | |
49 | extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regno); | |
50 | \f | |
51 | ||
52 | /* Shared library support. */ | |
53 | ||
54 | #include "solib.h" /* Support for shared libraries. */ | |
55 | ||
56 | /* Make structure definitions match up with those expected in `solib.c'. */ | |
57 | ||
58 | #define link_object sod | |
59 | #define lo_name sod_name | |
60 | #define lo_library sod_library | |
61 | #define lo_unused sod_reserved | |
62 | #define lo_major sod_major | |
63 | #define lo_minor sod_minor | |
64 | #define lo_next sod_next | |
65 | ||
66 | #define link_map so_map | |
67 | #define lm_addr som_addr | |
68 | #define lm_name som_path | |
69 | #define lm_next som_next | |
70 | #define lm_lop som_sod | |
71 | #define lm_lob som_sodbase | |
72 | #define lm_rwt som_write | |
73 | #define lm_ld som_dynamic | |
74 | #define lm_lpd som_spd | |
75 | ||
76 | #define link_dynamic_2 section_dispatch_table | |
77 | #define ld_loaded sdt_loaded | |
78 | #define ld_need sdt_sods | |
79 | #define ld_rules sdt_filler1 | |
80 | #define ld_got sdt_got | |
81 | #define ld_plt sdt_plt | |
82 | #define ld_rel sdt_rel | |
83 | #define ld_hash sdt_hash | |
84 | #define ld_stab sdt_nzlist | |
85 | #define ld_stab_hash sdt_filler2 | |
86 | #define ld_buckets sdt_buckets | |
87 | #define ld_symbols sdt_strings | |
88 | #define ld_symb_size sdt_str_sz | |
89 | #define ld_text sdt_text_sz | |
90 | #define ld_plt_sz sdt_plt_sz | |
91 | ||
92 | #define rtc_symb rt_symbol | |
93 | #define rtc_sp rt_sp | |
94 | #define rtc_next rt_next | |
95 | ||
96 | #define ld_debug so_debug | |
97 | #define ldd_version dd_version | |
98 | #define ldd_in_debugger dd_in_debugger | |
99 | #define ldd_sym_loaded dd_sym_loaded | |
100 | #define ldd_bp_addr dd_bpt_addr | |
101 | #define ldd_bp_inst dd_bpt_shadow | |
102 | #define ldd_cp dd_cc | |
103 | ||
104 | #define link_dynamic _dynamic | |
105 | #define ld_version d_version | |
106 | #define ldd d_debug | |
107 | #define ld_un d_un | |
108 | #define ld_2 d_sdt | |
109 | ||
110 | #endif /* nm-obsd.h */ |