GDB (xrefs)

/tmp/gdb-8.1/gdb/solib-target.c
Go to the documentation of this file.
1 /* Definitions for targets which report shared library events.
2
3 Copyright (C) 2007-2018 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 #include "defs.h"
21 #include "objfiles.h"
22 #include "solist.h"
23 #include "symtab.h"
24 #include "symfile.h"
25 #include "target.h"
26 #include "vec.h"
27 #include "solib-target.h"
28 #include <vector>
29
30 /* Private data for each loaded library. */
31 struct lm_info_target : public lm_info_base
32 {
33 /* The library's name. The name is normally kept in the struct
34 so_list; it is only here during XML parsing. */
35 std::string name;
36
37 /* The target can either specify segment bases or section bases, not
38 both. */
39
40 /* The base addresses for each independently relocatable segment of
41 this shared library. */
42 std::vector<CORE_ADDR> segment_bases;
43
44 /* The base addresses for each independently allocatable,
45 relocatable section of this shared library. */
46 std::vector<CORE_ADDR> section_bases;
47
48 /* The cached offsets for each section of this shared library,
49 determined from SEGMENT_BASES, or SECTION_BASES. */
50 section_offsets *offsets = NULL;
51 };
52
53 typedef lm_info_target *lm_info_target_p;
54 DEF_VEC_P(lm_info_target_p);
55
56 #if !defined(HAVE_LIBEXPAT)
57
58 static VEC(lm_info_target_p) *
59 solib_target_parse_libraries (const char *library)
60 {
61 static int have_warned;
62
63 if (!have_warned)
64 {
65 have_warned = 1;
66 warning (_("Can not parse XML library list; XML support was disabled "
67 "at compile time"));
68 }
69
70 return NULL;
71 }
72
73 #else /* HAVE_LIBEXPAT */
74
75 #include "xml-support.h"
76
77 /* Handle the start of a <segment> element. */
78
79 static void
80 library_list_start_segment (struct gdb_xml_parser *parser,
81 const struct gdb_xml_element *element,
82 void *user_data, VEC(gdb_xml_value_s) *attributes)
83 {
84 VEC(lm_info_target_p) **list = (VEC(lm_info_target_p) **) user_data;
85 lm_info_target *last = VEC_last (lm_info_target_p, *list);
86 ULONGEST *address_p
87 = (ULONGEST *) xml_find_attribute (attributes, "address")->value;
88 CORE_ADDR address = (CORE_ADDR) *address_p;
89
90 if (!last->section_bases.empty ())
91 gdb_xml_error (parser,
92 _("Library list with both segments and sections"));
93
94 last->segment_bases.push_back (address);
95 }
96
97 static void
98 library_list_start_section (struct gdb_xml_parser *parser,
99 const struct gdb_xml_element *element,
100 void *user_data, VEC(gdb_xml_value_s) *attributes)
101 {
102 VEC(lm_info_target_p) **list = (VEC(lm_info_target_p) **) user_data;
103 lm_info_target *last = VEC_last (lm_info_target_p, *list);
104 ULONGEST *address_p
105 = (ULONGEST *) xml_find_attribute (attributes, "address")->value;
106 CORE_ADDR address = (CORE_ADDR) *address_p;
107
108 if (!last->segment_bases.empty ())
109 gdb_xml_error (parser,
110 _("Library list with both segments and sections"));
111
112 last->section_bases.push_back (address);
113 }
114
115 /* Handle the start of a <library> element. */
116
117 static void
118 library_list_start_library (struct gdb_xml_parser *parser,
119 const struct gdb_xml_element *element,
120 void *user_data, VEC(gdb_xml_value_s) *attributes)
121 {
122 VEC(lm_info_target_p) **list = (VEC(lm_info_target_p) **) user_data;
123 lm_info_target *item = new lm_info_target;
124 const char *name
125 = (const char *) xml_find_attribute (attributes, "name")->value;
126
127 item->name = xstrdup (name);
128 VEC_safe_push (lm_info_target_p, *list, item);
129 }
130
131 static void
132 library_list_end_library (struct gdb_xml_parser *parser,
133 const struct gdb_xml_element *element,
134 void *user_data, const char *body_text)
135 {
136 VEC(lm_info_target_p) **list = (VEC(lm_info_target_p) **) user_data;
137 lm_info_target *lm_info = VEC_last (lm_info_target_p, *list);
138
139 if (lm_info->segment_bases.empty () && lm_info->section_bases.empty ())
140 gdb_xml_error (parser, _("No segment or section bases defined"));
141 }
142
143
144 /* Handle the start of a <library-list> element. */
145
146 static void
147 library_list_start_list (struct gdb_xml_parser *parser,
148 const struct gdb_xml_element *element,
149 void *user_data, VEC(gdb_xml_value_s) *attributes)
150 {
151 struct gdb_xml_value *version = xml_find_attribute (attributes, "version");
152
153 /* #FIXED attribute may be omitted, Expat returns NULL in such case. */
154 if (version != NULL)
155 {
156 const char *string = (const char *) version->value;
157
158 if (strcmp (string, "1.0") != 0)
159 gdb_xml_error (parser,
160 _("Library list has unsupported version \"%s\""),
161 string);
162 }
163 }
164
165 /* Discard the constructed library list. */
166
167 static void
168 solib_target_free_library_list (void *p)
169 {
170 VEC(lm_info_target_p) **result = (VEC(lm_info_target_p) **) p;
171 lm_info_target *info;
172 int ix;
173
174 for (ix = 0; VEC_iterate (lm_info_target_p, *result, ix, info); ix++)
175 delete info;
176
177 VEC_free (lm_info_target_p, *result);
178 *result = NULL;
179 }
180
181 /* The allowed elements and attributes for an XML library list.
182 The root element is a <library-list>. */
183
184 static const struct gdb_xml_attribute segment_attributes[] = {
185 { "address", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
186 { NULL, GDB_XML_AF_NONE, NULL, NULL }
187 };
188
189 static const struct gdb_xml_attribute section_attributes[] = {
190 { "address", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
191 { NULL, GDB_XML_AF_NONE, NULL, NULL }
192 };
193
194 static const struct gdb_xml_element library_children[] = {
195 { "segment", segment_attributes, NULL,
196 GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
197 library_list_start_segment, NULL },
198 { "section", section_attributes, NULL,
199 GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
200 library_list_start_section, NULL },
201 { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
202 };
203
204 static const struct gdb_xml_attribute library_attributes[] = {
205 { "name", GDB_XML_AF_NONE, NULL, NULL },
206 { NULL, GDB_XML_AF_NONE, NULL, NULL }
207 };
208
209 static const struct gdb_xml_element library_list_children[] = {
210 { "library", library_attributes, library_children,
211 GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
212 library_list_start_library, library_list_end_library },
213 { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
214 };
215
216 static const struct gdb_xml_attribute library_list_attributes[] = {
217 { "version", GDB_XML_AF_OPTIONAL, NULL, NULL },
218 { NULL, GDB_XML_AF_NONE, NULL, NULL }
219 };
220
221 static const struct gdb_xml_element library_list_elements[] = {
222 { "library-list", library_list_attributes, library_list_children,
223 GDB_XML_EF_NONE, library_list_start_list, NULL },
224 { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
225 };
226
227 static VEC(lm_info_target_p) *
228 solib_target_parse_libraries (const char *library)
229 {
230 VEC(lm_info_target_p) *result = NULL;
231 struct cleanup *back_to = make_cleanup (solib_target_free_library_list,
232 &result);
233
234 if (gdb_xml_parse_quick (_("target library list"), "library-list.dtd",
235 library_list_elements, library, &result) == 0)
236 {
237 /* Parsed successfully, keep the result. */
238 discard_cleanups (back_to);
239 return result;
240 }
241
242 do_cleanups (back_to);
243 return NULL;
244 }
245 #endif
246
247 static struct so_list *
248 solib_target_current_sos (void)
249 {
250 struct so_list *new_solib, *start = NULL, *last = NULL;
251 VEC(lm_info_target_p) *library_list;
252 lm_info_target *info;
253 int ix;
254
255 /* Fetch the list of shared libraries. */
256 gdb::unique_xmalloc_ptr<char> library_document
257 = target_read_stralloc (&current_target, TARGET_OBJECT_LIBRARIES, NULL);
258 if (library_document == NULL)
259 return NULL;
260
261 /* Parse the list. */
262 library_list = solib_target_parse_libraries (library_document.get ());
263
264 if (library_list == NULL)
265 return NULL;
266
267 /* Build a struct so_list for each entry on the list. */
268 for (ix = 0; VEC_iterate (lm_info_target_p, library_list, ix, info); ix++)
269 {
270 new_solib = XCNEW (struct so_list);
271 strncpy (new_solib->so_name, info->name.c_str (),
272 SO_NAME_MAX_PATH_SIZE - 1);
273 new_solib->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
274 strncpy (new_solib->so_original_name, info->name.c_str (),
275 SO_NAME_MAX_PATH_SIZE - 1);
276 new_solib->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
277 new_solib->lm_info = info;
278
279 /* We no longer need this copy of the name. */
280 info->name.clear ();
281
282 /* Add it to the list. */
283 if (!start)
284 last = start = new_solib;
285 else
286 {
287 last->next = new_solib;
288 last = new_solib;
289 }
290 }
291
292 /* Free the library list, but not its members. */
293 VEC_free (lm_info_target_p, library_list);
294
295 return start;
296 }
297
298 static void
299 solib_target_solib_create_inferior_hook (int from_tty)
300 {
301 /* Nothing needed. */
302 }
303
304 static void
305 solib_target_clear_solib (void)
306 {
307 /* Nothing needed. */
308 }
309
310 static void
311 solib_target_free_so (struct so_list *so)
312 {
313 lm_info_target *li = (lm_info_target *) so->lm_info;
314
315 gdb_assert (li->name.empty ());
316
317 delete li;
318 }
319
320 static void
321 solib_target_relocate_section_addresses (struct so_list *so,
322 struct target_section *sec)
323 {
324 CORE_ADDR offset;
325 lm_info_target *li = (lm_info_target *) so->lm_info;
326
327 /* Build the offset table only once per object file. We can not do
328 it any earlier, since we need to open the file first. */
329 if (li->offsets == NULL)
330 {
331 int num_sections = gdb_bfd_count_sections (so->abfd);
332
333 li->offsets
334 = ((struct section_offsets *)
335 xzalloc (SIZEOF_N_SECTION_OFFSETS (num_sections)));
336
337 if (!li->section_bases.empty ())
338 {
339 int i;
340 asection *sect;
341 int num_alloc_sections = 0;
342
343 for (i = 0, sect = so->abfd->sections;
344 sect != NULL;
345 i++, sect = sect->next)
346 if ((bfd_get_section_flags (so->abfd, sect) & SEC_ALLOC))
347 num_alloc_sections++;
348
349 if (num_alloc_sections != li->section_bases.size ())
350 warning (_("\
351 Could not relocate shared library \"%s\": wrong number of ALLOC sections"),
352 so->so_name);
353 else
354 {
355 int bases_index = 0;
356 int found_range = 0;
357
358 so->addr_low = ~(CORE_ADDR) 0;
359 so->addr_high = 0;
360 for (i = 0, sect = so->abfd->sections;
361 sect != NULL;
362 i++, sect = sect->next)
363 {
364 if (!(bfd_get_section_flags (so->abfd, sect) & SEC_ALLOC))
365 continue;
366 if (bfd_section_size (so->abfd, sect) > 0)
367 {
368 CORE_ADDR low, high;
369
370 low = li->section_bases[i];
371 high = low + bfd_section_size (so->abfd, sect) - 1;
372
373 if (low < so->addr_low)
374 so->addr_low = low;
375 if (high > so->addr_high)
376 so->addr_high = high;
377 gdb_assert (so->addr_low <= so->addr_high);
378 found_range = 1;
379 }
380 li->offsets->offsets[i] = li->section_bases[bases_index];
381 bases_index++;
382 }
383 if (!found_range)
384 so->addr_low = so->addr_high = 0;
385 gdb_assert (so->addr_low <= so->addr_high);
386 }
387 }
388 else if (!li->segment_bases.empty ())
389 {
390 struct symfile_segment_data *data;
391
392 data = get_symfile_segment_data (so->abfd);
393 if (data == NULL)
394 warning (_("\
395 Could not relocate shared library \"%s\": no segments"), so->so_name);
396 else
397 {
398 ULONGEST orig_delta;
399 int i;
400
401 if (!symfile_map_offsets_to_segments (so->abfd, data, li->offsets,
402 li->segment_bases.size (),
403 li->segment_bases.data ()))
404 warning (_("\
405 Could not relocate shared library \"%s\": bad offsets"), so->so_name);
406
407 /* Find the range of addresses to report for this library in
408 "info sharedlibrary". Report any consecutive segments
409 which were relocated as a single unit. */
410 gdb_assert (li->segment_bases.size () > 0);
411 orig_delta = li->segment_bases[0] - data->segment_bases[0];
412
413 for (i = 1; i < data->num_segments; i++)
414 {
415 /* If we have run out of offsets, assume all
416 remaining segments have the same offset. */
417 if (i >= li->segment_bases.size ())
418 continue;
419
420 /* If this segment does not have the same offset, do
421 not include it in the library's range. */
422 if (li->segment_bases[i] - data->segment_bases[i]
423 != orig_delta)
424 break;
425 }
426
427 so->addr_low = li->segment_bases[0];
428 so->addr_high = (data->segment_bases[i - 1]
429 + data->segment_sizes[i - 1]
430 + orig_delta);
431 gdb_assert (so->addr_low <= so->addr_high);
432
433 free_symfile_segment_data (data);
434 }
435 }
436 }
437
438 offset = li->offsets->offsets[gdb_bfd_section_index
439 (sec->the_bfd_section->owner,
440 sec->the_bfd_section)];
441 sec->addr += offset;
442 sec->endaddr += offset;
443 }
444
445 static int
446 solib_target_open_symbol_file_object (int from_tty)
447 {
448 /* We can't locate the main symbol file based on the target's
449 knowledge; the user has to specify it. */
450 return 0;
451 }
452
453 static int
454 solib_target_in_dynsym_resolve_code (CORE_ADDR pc)
455 {
456 /* We don't have a range of addresses for the dynamic linker; there
457 may not be one in the program's address space. So only report
458 PLT entries (which may be import stubs). */
459 return in_plt_section (pc);
460 }
461
462 struct target_so_ops solib_target_so_ops;
463
464 void
465 _initialize_solib_target (void)
466 {
467 solib_target_so_ops.relocate_section_addresses
468 = solib_target_relocate_section_addresses;
469 solib_target_so_ops.free_so = solib_target_free_so;
470 solib_target_so_ops.clear_solib = solib_target_clear_solib;
471 solib_target_so_ops.solib_create_inferior_hook
472 = solib_target_solib_create_inferior_hook;
473 solib_target_so_ops.current_sos = solib_target_current_sos;
474 solib_target_so_ops.open_symbol_file_object
475 = solib_target_open_symbol_file_object;
476 solib_target_so_ops.in_dynsym_resolve_code
477 = solib_target_in_dynsym_resolve_code;
478 solib_target_so_ops.bfd_open = solib_bfd_open;
479
480 /* Set current_target_so_ops to solib_target_so_ops if not already
481 set. */
482 if (current_target_so_ops == 0)
483 current_target_so_ops = &solib_target_so_ops;
484 }
lm_info_target::name
std::string name
Definition: solib-target.c:35
string
const char * string
Definition: signals.c:50
library_list_attributes
static const struct gdb_xml_attribute library_list_attributes[]
Definition: solib-target.c:216
solib_target_relocate_section_addresses
static void solib_target_relocate_section_addresses(struct so_list *so, struct target_section *sec)
Definition: solib-target.c:321
section_attributes
static const struct gdb_xml_attribute section_attributes[]
Definition: solib-target.c:189
section_offsets::offsets
CORE_ADDR offsets[1]
Definition: symtab.h:1273
_initialize_solib_target
void _initialize_solib_target(void)
Definition: solib-target.c:465
library_list_start_library
static void library_list_start_library(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: solib-target.c:118
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
gdb_xml_value::value
void * value
Definition: xml-support.h:78
gdb_bfd_section_index
int gdb_bfd_section_index(bfd *abfd, asection *section)
Definition: gdb_bfd.c:888
lm_info_target_p
lm_info_target * lm_info_target_p
Definition: solib-target.c:53
so_list::next
struct so_list * next
Definition: solist.h:44
solist.h
if
if(!(yy_init))
Definition: ada-lex.c:1075
warning
void warning(const char *fmt,...)
Definition: errors.c:26
symfile_segment_data::segment_bases
CORE_ADDR * segment_bases
Definition: symfile.h:85
gdb_xml_parser
Definition: xml-support.c:68
target_so_ops::relocate_section_addresses
void(* relocate_section_addresses)(struct so_list *so, struct target_section *)
Definition: solist.h:95
gdb_xml_value
Definition: xml-support.h:75
target_so_ops::solib_create_inferior_hook
void(* solib_create_inferior_hook)(int from_tty)
Definition: solist.h:112
target_so_ops::current_sos
struct so_list *(* current_sos)(void)
Definition: solist.h:121
so_list
Definition: solist.h:38
library_list_start_section
static void library_list_start_section(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: solib-target.c:98
VEC_safe_push
#define VEC_safe_push(T, V, O)
Definition: vec.h:276
library_list_elements
static const struct gdb_xml_element library_list_elements[]
Definition: solib-target.c:221
SO_NAME_MAX_PATH_SIZE
#define SO_NAME_MAX_PATH_SIZE
Definition: solist.h:22
cleanup
Definition: cleanups.c:38
_
#define _(String)
Definition: gdb_locale.h:35
target_so_ops
Definition: solist.h:91
defs.h
GDB_XML_AF_NONE
Definition: xml-support.h:106
target_read_stralloc
gdb::unique_xmalloc_ptr< char > target_read_stralloc(struct target_ops *ops, enum target_object object, const char *annex)
Definition: target.c:1927
target_so_ops::bfd_open
gdb_bfd_ref_ptr(* bfd_open)(char *pathname)
Definition: solist.h:132
objfiles.h
so_list::abfd
bfd * abfd
Definition: solist.h:71
library_list_children
static const struct gdb_xml_element library_list_children[]
Definition: solib-target.c:209
VEC
static VEC(lm_info_target_p)
Definition: solib-target.c:227
target_so_ops::clear_solib
void(* clear_solib)(void)
Definition: solist.h:109
symtab.h
solib_target_so_ops
struct target_so_ops solib_target_so_ops
Definition: solib-target.c:462
SIZEOF_N_SECTION_OFFSETS
#define SIZEOF_N_SECTION_OFFSETS(n)
Definition: symtab.h:1283
name
const char *const name
Definition: aarch64-tdep.c:76
VEC_iterate
#define VEC_iterate(T, V, I, P)
Definition: vec.h:181
GDB_XML_AF_OPTIONAL
Definition: xml-support.h:107
target_so_ops::in_dynsym_resolve_code
int(* in_dynsym_resolve_code)(CORE_ADDR pc)
Definition: solist.h:129
section_offsets
Definition: symtab.h:1271
lm_info_base
Definition: solist.h:34
GDB_XML_EF_NONE
Definition: xml-support.h:127
gdb::unique_xmalloc_ptr
std::unique_ptr< T, xfree_deleter< T > > unique_xmalloc_ptr
Definition: gdb_unique_ptr.h:48
gdb_xml_parse_quick
int gdb_xml_parse_quick(const char *name, const char *dtd_name, const struct gdb_xml_element *elements, const char *document, void *user_data)
Definition: xml-support.c:647
current_target
struct target_ops current_target
xml_find_attribute
struct gdb_xml_value * xml_find_attribute(VEC(gdb_xml_value_s) *attributes, const char *name)
Definition: xml-support.c:231
library_children
static const struct gdb_xml_element library_children[]
Definition: solib-target.c:194
library_list_start_list
static void library_list_start_list(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: solib-target.c:147
get_symfile_segment_data
struct symfile_segment_data * get_symfile_segment_data(bfd *abfd)
Definition: symfile.c:3668
xzalloc
void * xzalloc(size_t size)
Definition: common-utils.c:92
symfile_segment_data::num_segments
int num_segments
Definition: symfile.h:81
library_list_end_library
static void library_list_end_library(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
Definition: solib-target.c:132
lm_info_target::section_bases
std::vector< CORE_ADDR > section_bases
Definition: solib-target.c:46
lm_info_target::offsets
section_offsets * offsets
Definition: solib-target.c:50
so_list::so_original_name
char so_original_name[SO_NAME_MAX_PATH_SIZE]
Definition: solist.h:57
make_cleanup
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
Definition: cleanups.c:116
version
const char version[]
Definition: version.c:2
DEF_VEC_P
DEF_VEC_P(lm_info_target_p)
so_list::so_name
char so_name[SO_NAME_MAX_PATH_SIZE]
Definition: solist.h:60
xml-support.h
target_section::endaddr
CORE_ADDR endaddr
Definition: target.h:2318
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
solib_target_free_library_list
static void solib_target_free_library_list(void *p)
Definition: solib-target.c:168
target_section::the_bfd_section
struct bfd_section * the_bfd_section
Definition: target.h:2320
gdb_xml_element
Definition: xml-support.h:165
symfile_segment_data
Definition: symfile.h:76
target_section::addr
CORE_ADDR addr
Definition: target.h:2317
gdb_xml_error
void gdb_xml_error(struct gdb_xml_parser *parser, const char *format,...)
Definition: xml-support.c:219
VEC_last
#define VEC_last(T, V)
Definition: vec.h:158
gdb_assert
#define gdb_assert(expr)
Definition: gdb_assert.h:32
solib-target.h
segment_attributes
static const struct gdb_xml_attribute segment_attributes[]
Definition: solib-target.c:184
solib_target_free_so
static void solib_target_free_so(struct so_list *so)
Definition: solib-target.c:311
solib_target_clear_solib
static void solib_target_clear_solib(void)
Definition: solib-target.c:305
target_so_ops::open_symbol_file_object
int(* open_symbol_file_object)(int from_ttyp)
Definition: solist.h:125
so_list::addr_low
CORE_ADDR addr_low
Definition: solist.h:88
discard_cleanups
void discard_cleanups(struct cleanup *old_chain)
Definition: cleanups.c:212
XCNEW
#define XCNEW(T)
Definition: poison.h:121
in_plt_section
static int in_plt_section(CORE_ADDR pc)
Definition: objfiles.h:542
gdb_bfd_count_sections
int gdb_bfd_count_sections(bfd *abfd)
Definition: gdb_bfd.c:906
target_so_ops::free_so
void(* free_so)(struct so_list *so)
Definition: solist.h:100
offset
int offset
Definition: agent.c:65
VEC_free
#define VEC_free(T, V)
Definition: vec.h:196
target_section
Definition: target.h:2315
current_target_so_ops
struct target_so_ops * current_target_so_ops
Definition: solib.c:90
target.h
lm_info_target
Definition: solib-target.c:31
library_list_start_segment
static void library_list_start_segment(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: solib-target.c:80
TARGET_OBJECT_LIBRARIES
Definition: target.h:168
gdb_xml_parse_attr_ulongest
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest
ULONGEST
unsigned long long ULONGEST
Definition: common-types.h:53
gdb_xml_attribute
Definition: xml-support.h:114
solib_target_solib_create_inferior_hook
static void solib_target_solib_create_inferior_hook(int from_tty)
Definition: solib-target.c:299
GDB_XML_EF_OPTIONAL
Definition: xml-support.h:128
so_list::addr_high
CORE_ADDR addr_high
Definition: solist.h:88
library_attributes
static const struct gdb_xml_attribute library_attributes[]
Definition: solib-target.c:204
free_symfile_segment_data
void free_symfile_segment_data(struct symfile_segment_data *data)
Definition: symfile.c:3679
solib_bfd_open
gdb_bfd_ref_ptr solib_bfd_open(char *pathname)
Definition: solib.c:496
lm_info_target::segment_bases
std::vector< CORE_ADDR > segment_bases
Definition: solib-target.c:42
so_list::lm_info
lm_info_base * lm_info
Definition: solist.h:50
symfile_segment_data::segment_sizes
CORE_ADDR * segment_sizes
Definition: symfile.h:89
symfile_map_offsets_to_segments
int symfile_map_offsets_to_segments(bfd *abfd, const struct symfile_segment_data *data, struct section_offsets *offsets, int num_segment_bases, const CORE_ADDR *segment_bases)
Definition: symfile.c:3703
solib_target_in_dynsym_resolve_code
static int solib_target_in_dynsym_resolve_code(CORE_ADDR pc)
Definition: solib-target.c:454
solib_target_current_sos
static struct so_list * solib_target_current_sos(void)
Definition: solib-target.c:248
solib_target_open_symbol_file_object
static int solib_target_open_symbol_file_object(int from_tty)
Definition: solib-target.c:446
do_cleanups
void do_cleanups(struct cleanup *old_chain)
Definition: cleanups.c:174
symfile.h
vec.h