GDB (xrefs)
Loading...
Searching...
No Matches
solib-aix.c
Go to the documentation of this file.
1/* Copyright (C) 2013-2023 Free Software Foundation, Inc.
2
3 This file is part of GDB.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18#include "defs.h"
19#include "solib-aix.h"
20#include "solib.h"
21#include "solist.h"
22#include "inferior.h"
23#include "gdb_bfd.h"
24#include "objfiles.h"
25#include "symtab.h"
26#include "xcoffread.h"
27#include "observable.h"
28
29/* Our private data in struct so_list. */
30
32{
33 /* The name of the file mapped by the loader. Apart from the entry
34 for the main executable, this is usually a shared library (which,
35 on AIX, is an archive library file, created using the "ar"
36 command). */
37 std::string filename;
38
39 /* The name of the shared object file with the actual dynamic
40 loading dependency. This may be empty (Eg. main executable). */
41 std::string member_name;
42
43 /* The address in inferior memory where the text section got mapped. */
44 CORE_ADDR text_addr = 0;
45
46 /* The size of the text section, obtained via the loader data. */
47 ULONGEST text_size = 0;
48
49 /* The address in inferior memory where the data section got mapped. */
50 CORE_ADDR data_addr = 0;
51
52 /* The size of the data section, obtained via the loader data. */
53 ULONGEST data_size = 0;
54};
55
56/* This module's per-inferior data. */
57
59{
60 /* The list of shared libraries.
61
62 Note that the first element of this list is always the main
63 executable, which is not technically a shared library. But
64 we need that information to perform its relocation, and
65 the same principles applied to shared libraries also apply
66 to the main executable. So it's simpler to keep it as part
67 of this list. */
68 gdb::optional<std::vector<lm_info_aix>> library_list;
69};
70
71/* Key to our per-inferior data. */
74
75/* Return this module's data for the given inferior.
76 If none is found, add a zero'ed one now. */
77
78static struct solib_aix_inferior_data *
80{
81 struct solib_aix_inferior_data *data;
82
84 if (data == NULL)
85 data = solib_aix_inferior_data_handle.emplace (inf);
86
87 return data;
88}
89
90#if !defined(HAVE_LIBEXPAT)
91
92/* Dummy implementation if XML support is not compiled in. */
93
94static gdb::optional<std::vector<lm_info_aix>>
95solib_aix_parse_libraries (const char *library)
96{
97 static int have_warned;
98
99 if (!have_warned)
100 {
101 have_warned = 1;
102 warning (_("Can not parse XML library list; XML support was disabled "
103 "at compile time"));
104 }
105
106 return {};
107}
108
109#else /* HAVE_LIBEXPAT */
110
111#include "xml-support.h"
112
113/* Handle the start of a <library> element. */
114
115static void
116library_list_start_library (struct gdb_xml_parser *parser,
117 const struct gdb_xml_element *element,
118 void *user_data,
119 std::vector<gdb_xml_value> &attributes)
120{
121 std::vector<lm_info_aix> *list = (std::vector<lm_info_aix> *) user_data;
122 lm_info_aix item;
123 struct gdb_xml_value *attr;
124
125 attr = xml_find_attribute (attributes, "name");
126 item.filename = (const char *) attr->value.get ();
127
128 attr = xml_find_attribute (attributes, "member");
129 if (attr != NULL)
130 item.member_name = (const char *) attr->value.get ();
131
132 attr = xml_find_attribute (attributes, "text_addr");
133 item.text_addr = * (ULONGEST *) attr->value.get ();
134
135 attr = xml_find_attribute (attributes, "text_size");
136 item.text_size = * (ULONGEST *) attr->value.get ();
137
138 attr = xml_find_attribute (attributes, "data_addr");
139 item.data_addr = * (ULONGEST *) attr->value.get ();
140
141 attr = xml_find_attribute (attributes, "data_size");
142 item.data_size = * (ULONGEST *) attr->value.get ();
143
144 list->push_back (std::move (item));
145}
146
147/* Handle the start of a <library-list-aix> element. */
148
149static void
150library_list_start_list (struct gdb_xml_parser *parser,
151 const struct gdb_xml_element *element,
152 void *user_data,
153 std::vector<gdb_xml_value> &attributes)
154{
155 char *version
156 = (char *) xml_find_attribute (attributes, "version")->value.get ();
157
158 if (strcmp (version, "1.0") != 0)
159 gdb_xml_error (parser,
160 _("Library list has unsupported version \"%s\""),
161 version);
162}
163
164/* The allowed elements and attributes for an AIX library list
165 described in XML format. The root element is a <library-list-aix>. */
166
167static const struct gdb_xml_attribute library_attributes[] =
168{
169 { "name", GDB_XML_AF_NONE, NULL, NULL },
170 { "member", GDB_XML_AF_OPTIONAL, NULL, NULL },
171 { "text_addr", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
172 { "text_size", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
173 { "data_addr", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
174 { "data_size", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
175 { NULL, GDB_XML_AF_NONE, NULL, NULL }
176};
177
178static const struct gdb_xml_element library_list_children[] =
179{
180 { "library", library_attributes, NULL,
182 library_list_start_library, NULL},
183 { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
184};
185
186static const struct gdb_xml_attribute library_list_attributes[] =
187{
188 { "version", GDB_XML_AF_NONE, NULL, NULL },
189 { NULL, GDB_XML_AF_NONE, NULL, NULL }
190};
191
192static const struct gdb_xml_element library_list_elements[] =
193{
194 { "library-list-aix", library_list_attributes, library_list_children,
195 GDB_XML_EF_NONE, library_list_start_list, NULL },
196 { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
197};
198
199/* Parse LIBRARY, a string containing the loader info in XML format,
200 and return a vector of lm_info_aix objects.
201
202 Return an empty option if the parsing failed. */
203
204static gdb::optional<std::vector<lm_info_aix>>
205solib_aix_parse_libraries (const char *library)
206{
207 std::vector<lm_info_aix> result;
208
209 if (gdb_xml_parse_quick (_("aix library list"), "library-list-aix.dtd",
210 library_list_elements, library, &result) == 0)
211 return result;
212
213 return {};
214}
215
216#endif /* HAVE_LIBEXPAT */
217
218/* Return the loader info for the given inferior (INF), or an empty
219 option if the list could not be computed.
220
221 Cache the result in per-inferior data, so as to avoid recomputing it
222 each time this function is called.
223
224 If an error occurs while computing this list, and WARNING_MSG
225 is not NULL, then print a warning including WARNING_MSG and
226 a description of the error. */
227
228static gdb::optional<std::vector<lm_info_aix>> &
229solib_aix_get_library_list (struct inferior *inf, const char *warning_msg)
230{
231 struct solib_aix_inferior_data *data;
232
233 /* If already computed, return the cached value. */
235 if (data->library_list.has_value ())
236 return data->library_list;
237
238 gdb::optional<gdb::char_vector> library_document
239 = target_read_stralloc (current_inferior ()->top_target (),
241 NULL);
242 if (!library_document && warning_msg != NULL)
243 {
244 warning (_("%s (failed to read TARGET_OBJECT_LIBRARIES_AIX)"),
245 warning_msg);
246 return data->library_list;
247 }
248
249 solib_debug_printf ("TARGET_OBJECT_LIBRARIES_AIX = %s",
250 library_document->data ());
251
252 data->library_list = solib_aix_parse_libraries (library_document->data ());
253 if (!data->library_list.has_value () && warning_msg != NULL)
254 warning (_("%s (missing XML support?)"), warning_msg);
255
256 return data->library_list;
257}
258
259/* If the .bss section's VMA is set to an address located before
260 the end of the .data section, causing the two sections to overlap,
261 return the overlap in bytes. Otherwise, return zero.
262
263 Motivation:
264
265 The GNU linker sometimes sets the start address of the .bss session
266 before the end of the .data section, making the 2 sections overlap.
267 The loader appears to handle this situation gracefully, by simply
268 loading the bss section right after the end of the .data section.
269
270 This means that the .data and the .bss sections are sometimes
271 no longer relocated by the same amount. The problem is that
272 the ldinfo data does not contain any information regarding
273 the relocation of the .bss section, assuming that it would be
274 identical to the information provided for the .data section
275 (this is what would normally happen if the program was linked
276 correctly).
277
278 GDB therefore needs to detect those cases, and make the corresponding
279 adjustment to the .bss section offset computed from the ldinfo data
280 when necessary. This function returns the adjustment amount (or
281 zero when no adjustment is needed). */
282
283static CORE_ADDR
285{
286 struct bfd_section *data_sect, *bss_sect;
287
288 data_sect = bfd_get_section_by_name (abfd, ".data");
289 if (data_sect == NULL)
290 return 0; /* No overlap possible. */
291
292 bss_sect = bfd_get_section_by_name (abfd, ".bss");
293 if (bss_sect == NULL)
294 return 0; /* No overlap possible. */
295
296 /* Assume the problem only occurs with linkers that place the .bss
297 section after the .data section (the problem has only been
298 observed when using the GNU linker, and the default linker
299 script always places the .data and .bss sections in that order). */
300 if (bfd_section_vma (bss_sect) < bfd_section_vma (data_sect))
301 return 0;
302
303 if (bfd_section_vma (bss_sect)
304 < bfd_section_vma (data_sect) + bfd_section_size (data_sect))
305 return (bfd_section_vma (data_sect) + bfd_section_size (data_sect)
306 - bfd_section_vma (bss_sect));
307
308 return 0;
309}
310
311/* Implement the "relocate_section_addresses" target_so_ops method. */
312
313static void
315 struct target_section *sec)
316{
317 struct bfd_section *bfd_sect = sec->the_bfd_section;
318 bfd *abfd = bfd_sect->owner;
319 const char *section_name = bfd_section_name (bfd_sect);
320 lm_info_aix *info = (lm_info_aix *) so->lm_info;
321
322 if (strcmp (section_name, ".text") == 0)
323 {
324 sec->addr = info->text_addr;
325 sec->endaddr = sec->addr + info->text_size;
326
327 /* The text address given to us by the loader contains
328 XCOFF headers, so we need to adjust by this much. */
329 sec->addr += bfd_sect->filepos;
330 }
331 else if (strcmp (section_name, ".data") == 0)
332 {
333 sec->addr = info->data_addr;
334 sec->endaddr = sec->addr + info->data_size;
335 }
336 else if (strcmp (section_name, ".bss") == 0)
337 {
338 /* The information provided by the loader does not include
339 the address of the .bss section, but we know that it gets
340 relocated by the same offset as the .data section. So,
341 compute the relocation offset for the .data section, and
342 apply it to the .bss section as well. If the .data section
343 is not defined (which seems highly unlikely), do our best
344 by assuming no relocation. */
345 struct bfd_section *data_sect
346 = bfd_get_section_by_name (abfd, ".data");
347 CORE_ADDR data_offset = 0;
348
349 if (data_sect != NULL)
350 data_offset = info->data_addr - bfd_section_vma (data_sect);
351
352 sec->addr = bfd_section_vma (bfd_sect) + data_offset;
353 sec->addr += solib_aix_bss_data_overlap (abfd);
354 sec->endaddr = sec->addr + bfd_section_size (bfd_sect);
355 }
356 else
357 {
358 /* All other sections should not be relocated. */
359 sec->addr = bfd_section_vma (bfd_sect);
360 sec->endaddr = sec->addr + bfd_section_size (bfd_sect);
361 }
362}
363
364/* Implement the "free_so" target_so_ops method. */
365
366static void
368{
369 lm_info_aix *li = (lm_info_aix *) so->lm_info;
370
371 solib_debug_printf ("%s", so->so_name);
372
373 delete li;
374}
375
376/* Implement the "clear_solib" target_so_ops method. */
377
378static void
380{
381 /* Nothing needed. */
382}
383
384/* Compute and return the OBJFILE's section_offset array, using
385 the associated loader info (INFO). */
386
387static section_offsets
389 lm_info_aix *info)
390{
391 bfd *abfd = objfile->obfd.get ();
392
393 section_offsets offsets (objfile->section_offsets.size ());
394
395 /* .text */
396
397 if (objfile->sect_index_text != -1)
398 {
399 struct bfd_section *sect
401
402 offsets[objfile->sect_index_text]
403 = info->text_addr + sect->filepos - bfd_section_vma (sect);
404 }
405
406 /* .data */
407
408 if (objfile->sect_index_data != -1)
409 {
410 struct bfd_section *sect
412
413 offsets[objfile->sect_index_data]
414 = info->data_addr - bfd_section_vma (sect);
415 }
416
417 /* .bss
418
419 The offset of the .bss section should be identical to the offset
420 of the .data section. If no .data section (which seems hard to
421 believe it is possible), assume it is zero. */
422
423 if (objfile->sect_index_bss != -1
424 && objfile->sect_index_data != -1)
425 {
426 offsets[objfile->sect_index_bss]
427 = (offsets[objfile->sect_index_data]
429 }
430
431 /* All other sections should not need relocation. */
432
433 return offsets;
434}
435
436/* Implement the "solib_create_inferior_hook" target_so_ops method. */
437
438static void
440{
441 const char *warning_msg = "unable to relocate main executable";
442
443 /* We need to relocate the main executable... */
444
445 gdb::optional<std::vector<lm_info_aix>> &library_list
447 if (!library_list.has_value ())
448 return; /* Warning already printed. */
449
450 if (library_list->empty ())
451 {
452 warning (_("unable to relocate main executable (no info from loader)"));
453 return;
454 }
455
456 lm_info_aix &exec_info = (*library_list)[0];
458 {
461 &exec_info);
462
463 objfile_relocate (objf, offsets);
464 }
465}
466
467/* Implement the "current_sos" target_so_ops method. */
468
469static struct so_list *
471{
472 struct so_list *start = NULL, *last = NULL;
473 int ix;
474
475 gdb::optional<std::vector<lm_info_aix>> &library_list
477 if (!library_list.has_value ())
478 return NULL;
479
480 /* Build a struct so_list for each entry on the list.
481 We skip the first entry, since this is the entry corresponding
482 to the main executable, not a shared library. */
483 for (ix = 1; ix < library_list->size (); ix++)
484 {
485 struct so_list *new_solib = XCNEW (struct so_list);
486 std::string so_name;
487
488 lm_info_aix &info = (*library_list)[ix];
489 if (info.member_name.empty ())
490 {
491 /* INFO.FILENAME is probably not an archive, but rather
492 a shared object. Unusual, but it should be possible
493 to link a program against a shared object directory,
494 without having to put it in an archive first. */
495 so_name = info.filename;
496 }
497 else
498 {
499 /* This is the usual case on AIX, where the shared object
500 is a member of an archive. Create a synthetic so_name
501 that follows the same convention as AIX's ldd tool
502 (Eg: "/lib/libc.a(shr.o)"). */
503 so_name = string_printf ("%s(%s)", info.filename.c_str (),
504 info.member_name.c_str ());
505 }
506 strncpy (new_solib->so_original_name, so_name.c_str (),
508 new_solib->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
509 memcpy (new_solib->so_name, new_solib->so_original_name,
511 new_solib->lm_info = new lm_info_aix (info);
512
513 /* Add it to the list. */
514 if (!start)
515 last = start = new_solib;
516 else
517 {
518 last->next = new_solib;
519 last = new_solib;
520 }
521 }
522
523 return start;
524}
525
526/* Implement the "open_symbol_file_object" target_so_ops method. */
527
528static int
530{
531 return 0;
532}
533
534/* Implement the "in_dynsym_resolve_code" target_so_ops method. */
535
536static int
538{
539 return 0;
540}
541
542/* Implement the "bfd_open" target_so_ops method. */
543
544static gdb_bfd_ref_ptr
545solib_aix_bfd_open (const char *pathname)
546{
547 /* The pathname is actually a synthetic filename with the following
548 form: "/path/to/sharedlib(member.o)" (double-quotes excluded).
549 split this into archive name and member name.
550
551 FIXME: This is a little hacky. Perhaps we should provide access
552 to the solib's lm_info here? */
553 const int path_len = strlen (pathname);
554 const char *sep;
555 int filename_len;
556 int found_file;
557
558 if (pathname[path_len - 1] != ')')
559 return solib_bfd_open (pathname);
560
561 /* Search for the associated parens. */
562 sep = strrchr (pathname, '(');
563 if (sep == NULL)
564 {
565 /* Should never happen, but recover as best as we can (trying
566 to open pathname without decoding, possibly leading to
567 a failure), rather than triggering an assert failure). */
568 warning (_("missing '(' in shared object pathname: %s"), pathname);
569 return solib_bfd_open (pathname);
570 }
571 filename_len = sep - pathname;
572
573 std::string filename (string_printf ("%.*s", filename_len, pathname));
574 std::string member_name (string_printf ("%.*s", path_len - filename_len - 2,
575 sep + 1));
576
577 /* Calling solib_find makes certain that sysroot path is set properly
578 if program has a dependency on .a archive and sysroot is set via
579 set sysroot command. */
580 gdb::unique_xmalloc_ptr<char> found_pathname
581 = solib_find (filename.c_str (), &found_file);
582 if (found_pathname == NULL)
583 perror_with_name (pathname);
584 gdb_bfd_ref_ptr archive_bfd (solib_bfd_fopen (found_pathname.get (),
585 found_file));
586 if (archive_bfd == NULL)
587 {
588 warning (_("Could not open `%s' as an executable file: %s"),
589 filename.c_str (), bfd_errmsg (bfd_get_error ()));
590 return NULL;
591 }
592
593 if (bfd_check_format (archive_bfd.get (), bfd_object))
594 return archive_bfd;
595
596 if (! bfd_check_format (archive_bfd.get (), bfd_archive))
597 {
598 warning (_("\"%s\": not in executable format: %s."),
599 filename.c_str (), bfd_errmsg (bfd_get_error ()));
600 return NULL;
601 }
602
603 gdb_bfd_ref_ptr object_bfd
604 (gdb_bfd_openr_next_archived_file (archive_bfd.get (), NULL));
605 while (object_bfd != NULL)
606 {
607 if (member_name == bfd_get_filename (object_bfd.get ()))
608 break;
609
610 std::string s = bfd_get_filename (object_bfd.get ());
611
612 /* For every inferior after first int bfd system we
613 will have the pathname instead of the member name
614 registered. Hence the below condition exists. */
615
616 if (s.find ('(') != std::string::npos)
617 {
618 int pos = s.find ('(');
619 int len = s.find (')') - s.find ('(');
620 if (s.substr (pos+1, len-1) == member_name)
621 return object_bfd;
622 }
623
624 object_bfd = gdb_bfd_openr_next_archived_file (archive_bfd.get (),
625 object_bfd.get ());
626 }
627
628 if (object_bfd == NULL)
629 {
630 warning (_("\"%s\": member \"%s\" missing."), filename.c_str (),
631 member_name.c_str ());
632 return NULL;
633 }
634
635 if (! bfd_check_format (object_bfd.get (), bfd_object))
636 {
637 warning (_("%s(%s): not in object format: %s."),
638 filename.c_str (), member_name.c_str (),
639 bfd_errmsg (bfd_get_error ()));
640 return NULL;
641 }
642
643 /* Override the returned bfd's name with the name returned from solib_find
644 along with appended parenthesized member name in order to allow commands
645 listing all shared libraries to display. Otherwise, we would only be
646 displaying the name of the archive member object. */
647 std::string fname = string_printf ("%s%s",
648 bfd_get_filename (archive_bfd.get ()),
649 sep);
650 bfd_set_filename (object_bfd.get (), fname.c_str ());
651
652 return object_bfd;
653}
654
655/* Return the obj_section corresponding to OBJFILE's data section,
656 or NULL if not found. */
657/* FIXME: Define in a more general location? */
658
659static struct obj_section *
661{
662 for (obj_section *osect : objfile->sections ())
663 if (strcmp (bfd_section_name (osect->the_bfd_section), ".data") == 0)
664 return osect;
665
666 return NULL;
667}
668
669/* Return the TOC value corresponding to the given PC address,
670 or raise an error if the value could not be determined. */
671
672CORE_ADDR
674{
675 struct obj_section *pc_osect = find_pc_section (pc);
676 struct obj_section *data_osect;
677 CORE_ADDR result;
678
679 if (pc_osect == NULL)
680 error (_("unable to find TOC entry for pc %s "
681 "(no section contains this PC)"),
682 core_addr_to_string (pc));
683
684 data_osect = data_obj_section_from_objfile (pc_osect->objfile);
685 if (data_osect == NULL)
686 error (_("unable to find TOC entry for pc %s "
687 "(%s has no data section)"),
688 core_addr_to_string (pc), objfile_name (pc_osect->objfile));
689
690 result = data_osect->addr () + xcoff_get_toc_offset (pc_osect->objfile);
691
692 solib_debug_printf ("pc=%s -> %s", core_addr_to_string (pc),
693 core_addr_to_string (result));
694
695 return result;
696}
697
698/* This module's normal_stop observer. */
699
700static void
701solib_aix_normal_stop_observer (struct bpstat *unused_1, int unused_2)
702{
703 struct solib_aix_inferior_data *data
705
706 /* The inferior execution has been resumed, and it just stopped
707 again. This means that the list of shared libraries may have
708 evolved. Reset our cached value. */
709 data->library_list.reset ();
710}
711
712/* The target_so_ops for AIX targets. */
725
727void
static struct @5 attributes[]
void * get(unsigned key)
Definition registry.h:211
gdb_bfd_ref_ptr gdb_bfd_openr_next_archived_file(bfd *archive, bfd *previous)
Definition gdb_bfd.c:956
gdb::ref_ptr< struct bfd, gdb_bfd_ref_policy > gdb_bfd_ref_ptr
Definition gdb_bfd.h:79
struct inferior * current_inferior(void)
Definition inferior.c:55
observable< struct bpstat *, int > normal_stop
void objfile_relocate(struct objfile *objfile, const section_offsets &new_offsets)
Definition objfiles.c:676
struct obj_section * find_pc_section(CORE_ADDR pc)
Definition objfiles.c:1128
const char * objfile_name(const struct objfile *objfile)
Definition objfiles.c:1259
struct program_space * current_program_space
Definition progspace.c:40
static struct solib_aix_inferior_data * get_solib_aix_inferior_data(struct inferior *inf)
Definition solib-aix.c:79
static CORE_ADDR solib_aix_bss_data_overlap(bfd *abfd)
Definition solib-aix.c:284
static void solib_aix_normal_stop_observer(struct bpstat *unused_1, int unused_2)
Definition solib-aix.c:701
static struct so_list * solib_aix_current_sos(void)
Definition solib-aix.c:470
static void solib_aix_solib_create_inferior_hook(int from_tty)
Definition solib-aix.c:439
static const registry< inferior >::key< solib_aix_inferior_data > solib_aix_inferior_data_handle
Definition solib-aix.c:73
static void solib_aix_clear_solib(void)
Definition solib-aix.c:379
void _initialize_solib_aix()
Definition solib-aix.c:728
static struct obj_section * data_obj_section_from_objfile(struct objfile *objfile)
Definition solib-aix.c:660
static void solib_aix_free_so(struct so_list *so)
Definition solib-aix.c:367
static section_offsets solib_aix_get_section_offsets(struct objfile *objfile, lm_info_aix *info)
Definition solib-aix.c:388
static gdb_bfd_ref_ptr solib_aix_bfd_open(const char *pathname)
Definition solib-aix.c:545
static gdb::optional< std::vector< lm_info_aix > > solib_aix_parse_libraries(const char *library)
Definition solib-aix.c:95
const struct target_so_ops solib_aix_so_ops
Definition solib-aix.c:713
static void solib_aix_relocate_section_addresses(struct so_list *so, struct target_section *sec)
Definition solib-aix.c:314
static int solib_aix_open_symbol_file_object(int from_tty)
Definition solib-aix.c:529
static gdb::optional< std::vector< lm_info_aix > > & solib_aix_get_library_list(struct inferior *inf, const char *warning_msg)
Definition solib-aix.c:229
CORE_ADDR solib_aix_get_toc_value(CORE_ADDR pc)
Definition solib-aix.c:673
static int solib_aix_in_dynsym_resolve_code(CORE_ADDR pc)
Definition solib-aix.c:537
gdb_bfd_ref_ptr solib_bfd_fopen(const char *pathname, int fd)
Definition solib.c:423
gdb_bfd_ref_ptr solib_bfd_open(const char *pathname)
Definition solib.c:440
gdb::unique_xmalloc_ptr< char > solib_find(const char *in_pathname, int *fd)
Definition solib.c:384
#define solib_debug_printf(fmt,...)
Definition solib.h:39
#define SO_NAME_MAX_PATH_SIZE
Definition solist.h:22
gdb::unique_xmalloc_ptr< void > value
Definition xml-support.h:78
Definition gnu-nat.c:153
ULONGEST data_size
Definition solib-aix.c:53
ULONGEST text_size
Definition solib-aix.c:47
std::string filename
Definition solib-aix.c:37
std::string member_name
Definition solib-aix.c:41
CORE_ADDR text_addr
Definition solib-aix.c:44
CORE_ADDR data_addr
Definition solib-aix.c:50
CORE_ADDR addr() const
Definition objfiles.h:385
struct objfile * objfile
Definition objfiles.h:401
struct bfd_section * the_bfd_section
Definition objfiles.h:398
struct obj_section * sections_start
Definition objfiles.h:812
iterator_range< section_iterator > sections()
Definition objfiles.h:685
int sect_index_bss
Definition objfiles.h:800
int sect_index_data
Definition objfiles.h:799
gdb_bfd_ref_ptr obfd
Definition objfiles.h:740
int sect_index_text
Definition objfiles.h:798
::section_offsets section_offsets
Definition objfiles.h:786
struct objfile * symfile_object_file
Definition progspace.h:357
char so_name[SO_NAME_MAX_PATH_SIZE]
Definition solist.h:56
struct so_list * next
Definition solist.h:40
char so_original_name[SO_NAME_MAX_PATH_SIZE]
Definition solist.h:53
lm_info_base * lm_info
Definition solist.h:46
gdb::optional< std::vector< lm_info_aix > > library_list
Definition solib-aix.c:68
CORE_ADDR endaddr
struct bfd_section * the_bfd_section
std::vector< CORE_ADDR > section_offsets
Definition symtab.h:1669
gdb::optional< gdb::char_vector > target_read_stralloc(struct target_ops *ops, enum target_object object, const char *annex)
Definition target.c:2321
@ TARGET_OBJECT_LIBRARIES_AIX
Definition target.h:180
const char version[]
Definition version.c:2
CORE_ADDR xcoff_get_toc_offset(struct objfile *objfile)
Definition xcoffread.c:2767
@ GDB_XML_EF_NONE
@ GDB_XML_EF_REPEATABLE
@ GDB_XML_EF_OPTIONAL
void void gdb_xml_error(struct gdb_xml_parser *parser, const char *format,...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(2
void void struct gdb_xml_value * xml_find_attribute(std::vector< gdb_xml_value > &attributes, const char *name)
int gdb_xml_parse_quick(const char *name, const char *dtd_name, const struct gdb_xml_element *elements, const char *document, void *user_data)
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest
@ GDB_XML_AF_OPTIONAL
@ GDB_XML_AF_NONE