]>
Commit | Line | Data |
---|---|---|
13437d4b KB |
1 | /* Handle shared libraries for GDB, the GNU Debugger. |
2 | Copyright 2000 | |
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 | ||
da3331ec AC |
22 | struct objfile; |
23 | ||
13437d4b KB |
24 | /* Critical offsets and sizes which describe struct r_debug and |
25 | struct link_map on SVR4-like targets. All offsets and sizes are | |
26 | in bytes unless otherwise specified. */ | |
27 | ||
28 | struct link_map_offsets | |
29 | { | |
30 | /* Size of struct r_debug (or equivalent), or at least enough of it to | |
31 | be able to obtain the r_map field. */ | |
32 | int r_debug_size; | |
33 | ||
34 | /* Offset to the r_map field in struct r_debug. */ | |
35 | int r_map_offset; | |
36 | ||
37 | /* Size of the r_map field in struct r_debug. */ | |
38 | int r_map_size; | |
39 | ||
40 | /* Size of struct link_map (or equivalent), or at least enough of it | |
41 | to be able to obtain the fields below. */ | |
42 | int link_map_size; | |
43 | ||
44 | /* Offset to l_addr field in struct link_map. */ | |
45 | int l_addr_offset; | |
46 | ||
47 | /* Size of l_addr field in struct link_map. */ | |
48 | int l_addr_size; | |
49 | ||
50 | /* Offset to l_next field in struct link_map. */ | |
51 | int l_next_offset; | |
52 | ||
53 | /* Size of l_next field in struct link_map. */ | |
54 | int l_next_size; | |
55 | ||
56 | /* Offset to l_prev field in struct link_map. */ | |
57 | int l_prev_offset; | |
58 | ||
59 | /* Size of l_prev field in struct link_map. */ | |
60 | int l_prev_size; | |
61 | ||
62 | /* Offset to l_name field in struct link_map. */ | |
63 | int l_name_offset; | |
64 | ||
65 | /* Size of l_name field in struct link_map. */ | |
66 | int l_name_size; | |
67 | }; | |
68 | ||
e5e2b9ff KB |
69 | /* set_solib_svr4_fetch_link_map_offsets() is intended to be called by |
70 | a <arch>_gdbarch_init() function. It is used to establish an | |
71 | architecture specific link_map_offsets fetcher for the architecture | |
72 | being defined. */ | |
73 | ||
74 | extern void set_solib_svr4_fetch_link_map_offsets | |
75 | (struct gdbarch *gdbarch, struct link_map_offsets *(*func) (void)); | |
21479ded | 76 | |
550633cb EZ |
77 | /* This function is called by thread_db.c. Return the address of the |
78 | link map for the given objfile. */ | |
79 | extern CORE_ADDR svr4_fetch_objfile_link_map (struct objfile *objfile); | |
80 | ||
21479ded KB |
81 | /* legacy_svr4_fetch_link_map_offsets_hook is a pointer to a function |
82 | which is used to fetch link map offsets. It will only be set | |
83 | by solib-legacy.c, if at all. */ | |
84 | extern struct link_map_offsets *(*legacy_svr4_fetch_link_map_offsets_hook)(void); |