GDB (xrefs)

Classes | Typedefs | Functions | Variables
/tmp/gdb-8.1/gdb/solib-target.c File Reference
`#include "defs.h"`
`#include "objfiles.h"`
`#include "solist.h"`
`#include "symtab.h"`
`#include "symfile.h"`
`#include "target.h"`
`#include "vec.h"`
`#include "solib-target.h"`
`#include <vector>`
`#include "xml-support.h"`

Go to the source code of this file.

## Classes
struct | lm_info_target

## Typedefs
typedef lm_info_target * | lm_info_target_p

## Functions
| DEF_VEC_P (lm_info_target_p)
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)
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)
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)
static void | library_list_end_library (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
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)
static void | solib_target_free_library_list (void *p)
static | VEC (lm_info_target_p)
static struct so_list * | solib_target_current_sos (void)
static void | solib_target_solib_create_inferior_hook (int from_tty)
static void | solib_target_clear_solib (void)
static void | solib_target_free_so (struct so_list *so)
static void | solib_target_relocate_section_addresses (struct so_list *so, struct target_section *sec)
static int | solib_target_open_symbol_file_object (int from_tty)
static int | solib_target_in_dynsym_resolve_code (CORE_ADDR pc)
void | _initialize_solib_target (void)

## Variables
static const struct gdb_xml_attribute | segment_attributes []
static const struct gdb_xml_attribute | section_attributes []
static const struct gdb_xml_element | library_children []
static const struct gdb_xml_attribute | library_attributes []
static const struct gdb_xml_element | library_list_children []
static const struct gdb_xml_attribute | library_list_attributes []
static const struct gdb_xml_element | library_list_elements []
struct target_so_ops | solib_target_so_ops

## Typedef Documentation

## ◆ lm_info_target_p

typedef lm_info_target* lm_info_target_p

Definition at line 53 of file solib-target.c.

## Function Documentation

## ◆ _initialize_solib_target()

void _initialize_solib_target | ( | void |  | ) |

Definition at line 465 of file solib-target.c.

References target_so_ops::bfd_open, target_so_ops::clear_solib, target_so_ops::current_sos, current_target_so_ops, target_so_ops::free_so, target_so_ops::in_dynsym_resolve_code, target_so_ops::open_symbol_file_object, target_so_ops::relocate_section_addresses, solib_bfd_open(), target_so_ops::solib_create_inferior_hook, solib_target_clear_solib(), solib_target_current_sos(), solib_target_free_so(), solib_target_in_dynsym_resolve_code(), solib_target_open_symbol_file_object(), solib_target_relocate_section_addresses(), solib_target_so_ops, and solib_target_solib_create_inferior_hook().

## ◆ DEF_VEC_P()

DEF_VEC_P | ( | lm_info_target_p |  | ) |

## ◆ 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
| ) |  |
| static

Definition at line 132 of file solib-target.c.

References _, gdb_xml_error(), lm_info_target::section_bases, lm_info_target::segment_bases, VEC(), and VEC_last.

## ◆ 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
| ) |  |
| static

Definition at line 118 of file solib-target.c.

References lm_info_target::name, name, gdb_xml_value::value, VEC(), VEC_safe_push, and xml_find_attribute().

## ◆ 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
| ) |  |
| static

Definition at line 147 of file solib-target.c.

References _, gdb_xml_error(), if(), string, version, and xml_find_attribute().

## ◆ 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
| ) |  |
| static

Definition at line 98 of file solib-target.c.

References _, gdb_xml_error(), lm_info_target::section_bases, lm_info_target::segment_bases, gdb_xml_value::value, VEC(), VEC_last, and xml_find_attribute().

## ◆ 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
| ) |  |
| static

Definition at line 80 of file solib-target.c.

References _, gdb_xml_error(), lm_info_target::section_bases, lm_info_target::segment_bases, gdb_xml_value::value, VEC(), VEC_last, and xml_find_attribute().

## ◆ solib_target_clear_solib()

static void solib_target_clear_solib | ( | void |  | ) |
| static

Definition at line 305 of file solib-target.c.

Referenced by _initialize_solib_target().

## ◆ solib_target_current_sos()

static struct so_list* solib_target_current_sos | ( | void |  | ) |
| static

Definition at line 248 of file solib-target.c.

References current_target, so_list::lm_info, lm_info_target::name, so_list::next, so_list::so_name, SO_NAME_MAX_PATH_SIZE, so_list::so_original_name, TARGET_OBJECT_LIBRARIES, target_read_stralloc(), VEC(), VEC_free, VEC_iterate, and XCNEW.

Referenced by _initialize_solib_target().

## ◆ solib_target_free_library_list()

static void solib_target_free_library_list | ( | void * | p | ) |
| static

Definition at line 168 of file solib-target.c.

References VEC(), VEC_free, and VEC_iterate.

Referenced by VEC().

## ◆ solib_target_free_so()

static void solib_target_free_so | ( | struct so_list * | so | ) |
| static

Definition at line 311 of file solib-target.c.

References gdb_assert, so_list::lm_info, and lm_info_target::name.

Referenced by _initialize_solib_target().

## ◆ solib_target_in_dynsym_resolve_code()

static int solib_target_in_dynsym_resolve_code | ( | CORE_ADDR | pc | ) |
| static

Definition at line 454 of file solib-target.c.

References in_plt_section().

Referenced by _initialize_solib_target().

## ◆ solib_target_open_symbol_file_object()

static int solib_target_open_symbol_file_object | ( | int | from_tty | ) |
| static

Definition at line 446 of file solib-target.c.

Referenced by _initialize_solib_target().

## ◆ solib_target_relocate_section_addresses()

static void solib_target_relocate_section_addresses | ( | struct so_list * | so,
|  | struct target_section * | sec
| ) |  |
| static

Definition at line 321 of file solib-target.c.

References _, so_list::abfd, target_section::addr, so_list::addr_high, so_list::addr_low, target_section::endaddr, free_symfile_segment_data(), gdb_assert, gdb_bfd_count_sections(), gdb_bfd_section_index(), get_symfile_segment_data(), if(), so_list::lm_info, symfile_segment_data::num_segments, offset, lm_info_target::offsets, section_offsets::offsets, lm_info_target::section_bases, lm_info_target::segment_bases, symfile_segment_data::segment_bases, symfile_segment_data::segment_sizes, SIZEOF_N_SECTION_OFFSETS, so_list::so_name, symfile_map_offsets_to_segments(), target_section::the_bfd_section, warning(), and xzalloc().

Referenced by _initialize_solib_target().

## ◆ solib_target_solib_create_inferior_hook()

static void solib_target_solib_create_inferior_hook | ( | int | from_tty | ) |
| static

Definition at line 299 of file solib-target.c.

Referenced by _initialize_solib_target().

## ◆ VEC()

static VEC | ( | lm_info_target_p |  | ) |
| static

Definition at line 227 of file solib-target.c.

References _, discard_cleanups(), do_cleanups(), gdb_xml_parse_quick(), library_list_elements, make_cleanup(), and solib_target_free_library_list().

Referenced by library_list_end_library(), library_list_start_library(), library_list_start_section(), library_list_start_segment(), solib_target_current_sos(), and solib_target_free_library_list().

## Variable Documentation

## ◆ library_attributes

const struct gdb_xml_attribute library_attributes[]
| static

Initial value:
= {
{ "name", GDB_XML_AF_NONE, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
GDB_XML_AF_NONE
Definition: xml-support.h:106

Definition at line 204 of file solib-target.c.

## ◆ library_children

const struct gdb_xml_element library_children[]
| static

Initial value:
= {
{ "segment", segment_attributes, NULL,
GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
library_list_start_segment, NULL },
{ "section", section_attributes, NULL,
GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
library_list_start_section, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
section_attributes
static const struct gdb_xml_attribute section_attributes[]
Definition: solib-target.c:189
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
GDB_XML_EF_NONE
Definition: xml-support.h:127
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
segment_attributes
static const struct gdb_xml_attribute segment_attributes[]
Definition: solib-target.c:184
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
GDB_XML_EF_OPTIONAL
Definition: xml-support.h:128

Definition at line 194 of file solib-target.c.

## ◆ library_list_attributes

const struct gdb_xml_attribute library_list_attributes[]
| static

Initial value:
= {
{ "version", GDB_XML_AF_OPTIONAL, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
GDB_XML_AF_NONE
Definition: xml-support.h:106
GDB_XML_AF_OPTIONAL
Definition: xml-support.h:107

Definition at line 216 of file solib-target.c.

## ◆ library_list_children

const struct gdb_xml_element library_list_children[]
| static

Initial value:
= {
{ "library", library_attributes, library_children,
GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
library_list_start_library, library_list_end_library },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
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
GDB_XML_EF_NONE
Definition: xml-support.h:127
library_children
static const struct gdb_xml_element library_children[]
Definition: solib-target.c:194
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
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
GDB_XML_EF_OPTIONAL
Definition: xml-support.h:128
library_attributes
static const struct gdb_xml_attribute library_attributes[]
Definition: solib-target.c:204

Definition at line 209 of file solib-target.c.

## ◆ library_list_elements

const struct gdb_xml_element library_list_elements[]
| static

Initial value:
= {
{ "library-list", library_list_attributes, library_list_children,
GDB_XML_EF_NONE, library_list_start_list, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
library_list_attributes
static const struct gdb_xml_attribute library_list_attributes[]
Definition: solib-target.c:216
library_list_children
static const struct gdb_xml_element library_list_children[]
Definition: solib-target.c:209
GDB_XML_EF_NONE
Definition: xml-support.h:127
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

Definition at line 221 of file solib-target.c.

Referenced by VEC().

## ◆ section_attributes

const struct gdb_xml_attribute section_attributes[]
| static

Initial value:
= {
{ "address", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
GDB_XML_AF_NONE
Definition: xml-support.h:106
gdb_xml_parse_attr_ulongest
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest

Definition at line 189 of file solib-target.c.

## ◆ segment_attributes

const struct gdb_xml_attribute segment_attributes[]
| static

Initial value:
= {
{ "address", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
GDB_XML_AF_NONE
Definition: xml-support.h:106
gdb_xml_parse_attr_ulongest
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest

Definition at line 184 of file solib-target.c.

## ◆ solib_target_so_ops

struct target_so_ops solib_target_so_ops

Definition at line 462 of file solib-target.c.

Referenced by _initialize_solib_target(), arm_symbian_init_abi(), dicos_init_abi(), and windows_init_abi().