* config.sub, config.guess: Update from upstream sources.
[deliverable/binutils-gdb.git] / gdb / solib-svr4.h
CommitLineData
13437d4b 1/* Handle shared libraries for GDB, the GNU Debugger.
e4bbbda8 2
e4cd0d6a 3 Copyright (C) 2000, 2004, 2006
13437d4b
KB
4 Free Software Foundation, Inc.
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
10 the Free Software Foundation; either version 2 of the License, or
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
19 along with this program; if not, write to the Free Software
197e01b6
EZ
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
13437d4b 22
82b38f72
MK
23#ifndef SOLIB_SVR4_H
24#define SOLIB_SVR4_H
db1ea9ba 25
da3331ec
AC
26struct objfile;
27
13437d4b
KB
28/* Critical offsets and sizes which describe struct r_debug and
29 struct link_map on SVR4-like targets. All offsets and sizes are
30 in bytes unless otherwise specified. */
31
32struct link_map_offsets
33 {
e4cd0d6a
MK
34 /* Offset and size of r_debug.r_version. */
35 int r_version_offset, r_version_size;
13437d4b 36
e4cd0d6a 37 /* Offset of r_debug.r_map. */
13437d4b
KB
38 int r_map_offset;
39
e4cd0d6a
MK
40 /* Offset of r_debug.r_ldsomap. */
41 int r_ldsomap_offset;
13437d4b
KB
42
43 /* Size of struct link_map (or equivalent), or at least enough of it
44 to be able to obtain the fields below. */
45 int link_map_size;
46
47 /* Offset to l_addr field in struct link_map. */
48 int l_addr_offset;
49
50 /* Size of l_addr field in struct link_map. */
51 int l_addr_size;
52
cc10cae3
AO
53 /* Offset to l_ld field in struct link_map. */
54 int l_ld_offset;
55
56 /* Size of l_ld field in struct link_map. */
57 int l_ld_size;
58
13437d4b
KB
59 /* Offset to l_next field in struct link_map. */
60 int l_next_offset;
61
62 /* Size of l_next field in struct link_map. */
63 int l_next_size;
64
65 /* Offset to l_prev field in struct link_map. */
66 int l_prev_offset;
67
68 /* Size of l_prev field in struct link_map. */
69 int l_prev_size;
70
71 /* Offset to l_name field in struct link_map. */
72 int l_name_offset;
73
74 /* Size of l_name field in struct link_map. */
75 int l_name_size;
76 };
77
e5e2b9ff
KB
78/* set_solib_svr4_fetch_link_map_offsets() is intended to be called by
79 a <arch>_gdbarch_init() function. It is used to establish an
80 architecture specific link_map_offsets fetcher for the architecture
81 being defined. */
82
83extern void set_solib_svr4_fetch_link_map_offsets
84 (struct gdbarch *gdbarch, struct link_map_offsets *(*func) (void));
21479ded 85
550633cb
EZ
86/* This function is called by thread_db.c. Return the address of the
87 link map for the given objfile. */
88extern CORE_ADDR svr4_fetch_objfile_link_map (struct objfile *objfile);
89
21479ded
KB
90/* legacy_svr4_fetch_link_map_offsets_hook is a pointer to a function
91 which is used to fetch link map offsets. It will only be set
7095b863
MS
92 by solib-legacy.c, if at all. */
93extern struct link_map_offsets *(*legacy_svr4_fetch_link_map_offsets_hook) (void);
e4bbbda8
MK
94
95/* Fetch (and possibly build) an appropriate `struct link_map_offsets'
96 for ILP32 and LP64 SVR4 systems. */
97extern struct link_map_offsets *svr4_ilp32_fetch_link_map_offsets (void);
98extern struct link_map_offsets *svr4_lp64_fetch_link_map_offsets (void);
db1ea9ba 99
82b38f72 100#endif /* solib-svr4.h */
This page took 0.543525 seconds and 4 git commands to generate.