GDB (xrefs)
/tmp/gdb-7.10/gdb/solib-svr4.h
Go to the documentation of this file.
1 /* Handle shared libraries for GDB, the GNU Debugger.
2 
3  Copyright (C) 2000-2015 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 3 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, see <http://www.gnu.org/licenses/>. */
19 
20 #ifndef SOLIB_SVR4_H
21 #define SOLIB_SVR4_H
22 
23 struct objfile;
24 struct target_so_ops;
25 
26 extern struct target_so_ops svr4_so_ops;
27 
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 
33  {
34  /* Offset and size of r_debug.r_version. */
36 
37  /* Offset of r_debug.r_map. */
39 
40  /* Offset of r_debug.r_brk. */
42 
43  /* Offset of r_debug.r_ldsomap. */
45 
46  /* Size of struct link_map (or equivalent), or at least enough of it
47  to be able to obtain the fields below. */
49 
50  /* Offset to l_addr field in struct link_map. */
52 
53  /* Offset to l_ld field in struct link_map. */
55 
56  /* Offset to l_next field in struct link_map. */
58 
59  /* Offset to l_prev field in struct link_map. */
61 
62  /* Offset to l_name field in struct link_map. */
64  };
65 
66 /* set_solib_svr4_fetch_link_map_offsets() is intended to be called by
67  a <arch>_gdbarch_init() function. It is used to establish an
68  architecture specific link_map_offsets fetcher for the architecture
69  being defined. */
70 
72  (struct gdbarch *gdbarch, struct link_map_offsets *(*func) (void));
73 
74 /* This function is called by thread_db.c. Return the address of the
75  link map for the given objfile. */
77 
78 /* Fetch (and possibly build) an appropriate `struct link_map_offsets'
79  for ILP32 and LP64 SVR4 systems. */
82 
83 /* Return 1 if PC lies in the dynamic symbol resolution code of the
84  SVR4 run time loader. */
86 
87 #endif /* solib-svr4.h */
bfd_vma CORE_ADDR
Definition: common-types.h:41
void(* func)(char *)
int svr4_in_dynsym_resolve_code(CORE_ADDR pc)
Definition: solib-svr4.c:1618
struct link_map_offsets * svr4_lp64_fetch_link_map_offsets(void)
Definition: solib-svr4.c:3180
CORE_ADDR svr4_fetch_objfile_link_map(struct objfile *objfile)
Definition: solib-svr4.c:1573
struct link_map_offsets * svr4_ilp32_fetch_link_map_offsets(void)
Definition: solib-svr4.c:3149
void set_solib_svr4_fetch_link_map_offsets(struct gdbarch *gdbarch, struct link_map_offsets *(*func)(void))
Definition: solib-svr4.c:3108
struct target_so_ops svr4_so_ops
Definition: solib-svr4.c:3208