* event-loop.c (toplevel) [!HAVE_POLL] [NO_FD_SET]: Remove unused
[platform/upstream/binutils.git] / gdb / solib-svr4.h
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
22 /* Critical offsets and sizes which describe struct r_debug and
23    struct link_map on SVR4-like targets.  All offsets and sizes are
24    in bytes unless otherwise specified.  */
25
26 struct link_map_offsets
27   {
28     /* Size of struct r_debug (or equivalent), or at least enough of it to
29        be able to obtain the r_map field.  */
30     int r_debug_size;
31
32     /* Offset to the r_map field in struct r_debug.  */
33     int r_map_offset;
34
35     /* Size of the r_map field in struct r_debug.  */
36     int r_map_size;
37
38     /* Size of struct link_map (or equivalent), or at least enough of it
39        to be able to obtain the fields below.  */
40     int link_map_size;
41
42     /* Offset to l_addr field in struct link_map.  */
43     int l_addr_offset;
44
45     /* Size of l_addr field in struct link_map.  */
46     int l_addr_size;
47
48     /* Offset to l_next field in struct link_map.  */
49     int l_next_offset;
50
51     /* Size of l_next field in struct link_map.  */
52     int l_next_size;
53
54     /* Offset to l_prev field in struct link_map.  */
55     int l_prev_offset;
56
57     /* Size of l_prev field in struct link_map.  */
58     int l_prev_size;
59
60     /* Offset to l_name field in struct link_map.  */
61     int l_name_offset;
62
63     /* Size of l_name field in struct link_map.  */
64     int l_name_size;
65   };
66
67 extern void set_solib_svr4_fetch_link_map_offsets (
68   struct link_map_offsets *(*func) (void));
69
70 /* legacy_svr4_fetch_link_map_offsets_hook is a pointer to a function
71    which is used to fetch link map offsets.  It will only be set
72    by solib-legacy.c, if at all. */
73 extern struct link_map_offsets *(*legacy_svr4_fetch_link_map_offsets_hook)(void);