Commit | Line | Data |
---|---|---|
13437d4b | 1 | /* Handle shared libraries for GDB, the GNU Debugger. |
e4bbbda8 | 2 | |
4c38e0a4 | 3 | Copyright (C) 2000, 2004, 2006, 2007, 2008, 2009, 2010 |
0fb0cc75 | 4 | Free Software Foundation, Inc. |
13437d4b KB |
5 | |
6 | This file is part of GDB. | |
7 | ||
8 | This program is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 10 | the Free Software Foundation; either version 3 of the License, or |
13437d4b KB |
11 | (at your option) any later version. |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
a9762ec7 | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
13437d4b | 20 | |
82b38f72 MK |
21 | #ifndef SOLIB_SVR4_H |
22 | #define SOLIB_SVR4_H | |
db1ea9ba | 23 | |
da3331ec | 24 | struct objfile; |
7d522c90 DJ |
25 | struct target_so_ops; |
26 | ||
27 | extern struct target_so_ops svr4_so_ops; | |
da3331ec | 28 | |
13437d4b KB |
29 | /* Critical offsets and sizes which describe struct r_debug and |
30 | struct link_map on SVR4-like targets. All offsets and sizes are | |
31 | in bytes unless otherwise specified. */ | |
32 | ||
33 | struct link_map_offsets | |
34 | { | |
e4cd0d6a MK |
35 | /* Offset and size of r_debug.r_version. */ |
36 | int r_version_offset, r_version_size; | |
13437d4b | 37 | |
e4cd0d6a | 38 | /* Offset of r_debug.r_map. */ |
13437d4b KB |
39 | int r_map_offset; |
40 | ||
7cd25cfc DJ |
41 | /* Offset of r_debug.r_brk. */ |
42 | int r_brk_offset; | |
43 | ||
e4cd0d6a MK |
44 | /* Offset of r_debug.r_ldsomap. */ |
45 | int r_ldsomap_offset; | |
13437d4b KB |
46 | |
47 | /* Size of struct link_map (or equivalent), or at least enough of it | |
48 | to be able to obtain the fields below. */ | |
49 | int link_map_size; | |
50 | ||
51 | /* Offset to l_addr field in struct link_map. */ | |
52 | int l_addr_offset; | |
53 | ||
cc10cae3 AO |
54 | /* Offset to l_ld field in struct link_map. */ |
55 | int l_ld_offset; | |
56 | ||
13437d4b KB |
57 | /* Offset to l_next field in struct link_map. */ |
58 | int l_next_offset; | |
59 | ||
13437d4b KB |
60 | /* Offset to l_prev field in struct link_map. */ |
61 | int l_prev_offset; | |
62 | ||
13437d4b KB |
63 | /* Offset to l_name field in struct link_map. */ |
64 | int l_name_offset; | |
13437d4b KB |
65 | }; |
66 | ||
e5e2b9ff KB |
67 | /* set_solib_svr4_fetch_link_map_offsets() is intended to be called by |
68 | a <arch>_gdbarch_init() function. It is used to establish an | |
69 | architecture specific link_map_offsets fetcher for the architecture | |
70 | being defined. */ | |
71 | ||
72 | extern void set_solib_svr4_fetch_link_map_offsets | |
73 | (struct gdbarch *gdbarch, struct link_map_offsets *(*func) (void)); | |
21479ded | 74 | |
550633cb EZ |
75 | /* This function is called by thread_db.c. Return the address of the |
76 | link map for the given objfile. */ | |
77 | extern CORE_ADDR svr4_fetch_objfile_link_map (struct objfile *objfile); | |
78 | ||
e4bbbda8 MK |
79 | /* Fetch (and possibly build) an appropriate `struct link_map_offsets' |
80 | for ILP32 and LP64 SVR4 systems. */ | |
81 | extern struct link_map_offsets *svr4_ilp32_fetch_link_map_offsets (void); | |
82 | extern struct link_map_offsets *svr4_lp64_fetch_link_map_offsets (void); | |
db1ea9ba | 83 | |
7d522c90 DJ |
84 | /* Return 1 if PC lies in the dynamic symbol resolution code of the |
85 | SVR4 run time loader. */ | |
86 | int svr4_in_dynsym_resolve_code (CORE_ADDR pc); | |
87 | ||
82b38f72 | 88 | #endif /* solib-svr4.h */ |