GDB (xrefs)
|
#include "defs.h"
#include "gdbcmd.h"
#include "xml-builtin.h"
#include "xml-support.h"
#include "gdbsupport/filestuff.h"
#include "gdbsupport/gdb-safe-ctype.h"
#include <vector>
#include <string>
#include "gdb_expat.h"
Go to the source code of this file.
Classes | |
struct | scope_level |
struct | gdb_xml_parser |
struct | xinclude_parsing_data |
Macros | |
#define | MAX_XINCLUDE_DEPTH 30 |
Functions | |
static void | gdb_xml_body_text (void *data, const XML_Char *text, int length) |
void | gdb_xml_debug (struct gdb_xml_parser *parser, const char *format,...) |
void | gdb_xml_error (struct gdb_xml_parser *parser, const char *format,...) |
struct gdb_xml_value * | xml_find_attribute (std::vector< gdb_xml_value > &attributes, const char *name) |
static void | gdb_xml_start_element_wrapper (void *data, const XML_Char *name, const XML_Char **attrs) |
static void | gdb_xml_end_element_wrapper (void *data, const XML_Char *name) |
static int XMLCALL | gdb_xml_fetch_external_entity (XML_Parser expat_parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) |
int | gdb_xml_parse_quick (const char *name, const char *dtd_name, const struct gdb_xml_element *elements, const char *document, void *user_data) |
static int | xml_parse_unsigned_integer (const char *valstr, ULONGEST *valp) |
ULONGEST | gdb_xml_parse_ulongest (struct gdb_xml_parser *parser, const char *value) |
void * | gdb_xml_parse_attr_ulongest (struct gdb_xml_parser *parser, const struct gdb_xml_attribute *attribute, const char *value) |
void * | gdb_xml_parse_attr_enum (struct gdb_xml_parser *parser, const struct gdb_xml_attribute *attribute, const char *value) |
static void | xinclude_start_include (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, std::vector< gdb_xml_value > &attributes) |
static void | xinclude_end_include (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text) |
static void XMLCALL | xml_xinclude_default (void *data_, const XML_Char *s, int len) |
static void XMLCALL | xml_xinclude_start_doctype (void *data_, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset) |
static void XMLCALL | xml_xinclude_end_doctype (void *data_) |
static void XMLCALL | xml_xinclude_xml_decl (void *data_, const XML_Char *version, const XML_Char *encoding, int standalone) |
bool | xml_process_xincludes (std::string &result, const char *name, const char *text, xml_fetch_another fetcher, int depth) |
const char * | fetch_xml_builtin (const char *filename) |
LONGEST | xml_builtin_xfer_partial (const char *filename, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len) |
static void | show_debug_xml (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
gdb::optional< gdb::char_vector > | xml_fetch_content_from_file (const char *filename, const char *dirname) |
void | _initialize_xml_support () |
Variables | |
static bool | debug_xml |
const struct gdb_xml_enum | gdb_xml_enums_boolean [] |
const struct gdb_xml_attribute | xinclude_attributes [] |
const struct gdb_xml_element | xinclude_elements [] |
#define MAX_XINCLUDE_DEPTH 30 |
Definition at line 40 of file xml-support.c.
Referenced by xinclude_start_include().
void _initialize_xml_support | ( | ) |
Definition at line 1006 of file xml-support.c.
Referenced by initialize_all_files().
const char * fetch_xml_builtin | ( | const char * | filename | ) |
Definition at line 914 of file xml-support.c.
References xml_builtin.
Referenced by gdb_xml_fetch_external_entity(), and xml_builtin_xfer_partial().
|
static |
Definition at line 170 of file xml-support.c.
References gdb_xml_parser::body_text().
Referenced by gdb_xml_parser::gdb_xml_parser().
void gdb_xml_debug | ( | struct gdb_xml_parser * | parser, |
const char * | format, | ||
... ) |
Definition at line 194 of file xml-support.c.
References debug_xml, and gdb_xml_parser::vdebug().
Referenced by gdb_xml_parser::end_element(), memory_map_end_property(), gdb_xml_parser::parse(), gdb_xml_parser::start_element(), xinclude_start_include(), and xml_process_xincludes().
|
static |
Definition at line 455 of file xml-support.c.
References gdb_xml_parser::end_element(), name, and gdb_xml_parser::set_error().
Referenced by gdb_xml_parser::gdb_xml_parser().
void gdb_xml_error | ( | struct gdb_xml_parser * | parser, |
const char * | format, | ||
... ) |
Definition at line 218 of file xml-support.c.
References gdb_xml_parser::verror().
Referenced by check_xml_btrace_version(), gdb_xml_parser::end_element(), gdb_xml_parse_attr_enum(), gdb_xml_parse_attr_ulongest(), gdb_xml_parse_ulongest(), library_list_end_library(), library_list_start_list(), library_list_start_list(), library_list_start_section(), library_list_start_segment(), memory_map_end_memory(), osdata_start_osdata(), parse_xml_btrace_block(), parse_xml_raw(), gdb_xml_parser::start_element(), svr4_library_list_start_list(), tdesc_end_arch(), tdesc_start_enum(), tdesc_start_enum_value(), tdesc_start_field(), tdesc_start_flags(), tdesc_start_reg(), tdesc_start_struct(), tdesc_start_target(), tdesc_start_vector(), and xinclude_start_include().
|
static |
Definition at line 507 of file xml-support.c.
References gdb_xml_parser::dtd_name(), gdb_xml_parser::expat_parser(), fetch_xml_builtin(), status, and XML_STATUS_ERROR.
Referenced by gdb_xml_parser::use_dtd().
void * gdb_xml_parse_attr_enum | ( | struct gdb_xml_parser * | parser, |
const struct gdb_xml_attribute * | attribute, | ||
const char * | value ) |
Definition at line 698 of file xml-support.c.
References gdb_xml_error(), attribute::name, gdb_xml_enum::name, gdb_xml_enum::value, and xmalloc().
void * gdb_xml_parse_attr_ulongest | ( | struct gdb_xml_parser * | parser, |
const struct gdb_xml_attribute * | attribute, | ||
const char * | value ) |
Definition at line 668 of file xml-support.c.
References gdb_xml_error(), attribute::name, and xml_parse_unsigned_integer().
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 at line 618 of file xml-support.c.
References gdb_xml_parser::dtd_name(), name, gdb_xml_parser::parse(), gdb_xml_parser::use_dtd(), and gdb_xml_parser::user_data().
Referenced by osdata_parse(), parse_memory_map(), parse_traceframe_info(), parse_xml_btrace(), parse_xml_btrace_conf(), remote_target::remote_get_threads_with_qxfer(), solib_aix_parse_libraries(), solib_target_parse_libraries(), svr4_parse_libraries(), syscall_parse_xml(), and tdesc_parse_xml().
ULONGEST gdb_xml_parse_ulongest | ( | struct gdb_xml_parser * | parser, |
const char * | value ) |
Definition at line 655 of file xml-support.c.
References gdb_xml_error(), and xml_parse_unsigned_integer().
Referenced by memory_map_end_property(), and traceframe_info_start_tvar().
|
static |
Definition at line 382 of file xml-support.c.
References name, gdb_xml_parser::set_error(), and gdb_xml_parser::start_element().
Referenced by gdb_xml_parser::gdb_xml_parser().
|
static |
Definition at line 957 of file xml-support.c.
References gdb_printf().
|
static |
Definition at line 801 of file xml-support.c.
|
static |
Definition at line 773 of file xml-support.c.
References attributes, gdb_xml_debug(), gdb_xml_error(), MAX_XINCLUDE_DEPTH, gdb_xml_parser::name(), gdb_xml_value::value, xml_find_attribute(), and xml_process_xincludes().
LONGEST xml_builtin_xfer_partial | ( | const char * | filename, |
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len ) |
Definition at line 931 of file xml-support.c.
References fetch_xml_builtin().
gdb::optional< gdb::char_vector > xml_fetch_content_from_file | ( | const char * | filename, |
const char * | dirname ) |
Definition at line 964 of file xml-support.c.
Referenced by file_read_description_xml(), and xml_init_syscalls_info().
struct gdb_xml_value * xml_find_attribute | ( | std::vector< gdb_xml_value > & | attributes, |
const char * | name ) |
Definition at line 230 of file xml-support.c.
References attributes, name, and value.
Referenced by check_xml_btrace_version(), library_list_start_library(), library_list_start_library(), library_list_start_library(), library_list_start_list(), library_list_start_list(), library_list_start_section(), library_list_start_segment(), memory_map_start_memory(), memory_map_start_property(), osdata_start_column(), osdata_start_osdata(), parse_xml_btrace_block(), parse_xml_btrace_conf_bts(), parse_xml_btrace_conf_pt(), parse_xml_btrace_pt_config_cpu(), start_thread(), svr4_library_list_start_list(), tdesc_start_enum(), tdesc_start_enum_value(), tdesc_start_feature(), tdesc_start_field(), tdesc_start_flags(), tdesc_start_struct(), tdesc_start_target(), tdesc_start_union(), traceframe_info_start_memory(), traceframe_info_start_tvar(), and xinclude_start_include().
|
static |
Definition at line 635 of file xml-support.c.
Referenced by gdb_xml_parse_attr_ulongest(), and gdb_xml_parse_ulongest().
bool xml_process_xincludes | ( | std::string & | result, |
const char * | name, | ||
const char * | text, | ||
xml_fetch_another | fetcher, | ||
int | depth ) |
Definition at line 873 of file xml-support.c.
References gdb_xml_parser::expat_parser(), gdb_xml_debug(), name, gdb_xml_parser::parse(), gdb_xml_parser::set_is_xinclude(), gdb_xml_parser::use_dtd(), xinclude_elements, xml_xinclude_default(), xml_xinclude_end_doctype(), xml_xinclude_start_doctype(), and xml_xinclude_xml_decl().
Referenced by target_fetch_description_xml(), tdesc_parse_xml(), and xinclude_start_include().
|
static |
Definition at line 812 of file xml-support.c.
References gdb_xml_parser::user_data().
Referenced by xml_process_xincludes().
|
static |
Definition at line 841 of file xml-support.c.
References gdb_xml_parser::user_data().
Referenced by xml_process_xincludes().
|
static |
Definition at line 828 of file xml-support.c.
References gdb_xml_parser::user_data().
Referenced by xml_process_xincludes().
|
static |
Definition at line 850 of file xml-support.c.
Referenced by xml_process_xincludes().
|
static |
Definition at line 30 of file xml-support.c.
Referenced by gdb_xml_debug(), and gdb_xml_parser::start_element().
const struct gdb_xml_enum gdb_xml_enums_boolean[] |
Definition at line 686 of file xml-support.c.
const struct gdb_xml_attribute xinclude_attributes[] |
Definition at line 858 of file xml-support.c.
const struct gdb_xml_element xinclude_elements[] |
Definition at line 863 of file xml-support.c.
Referenced by xml_process_xincludes().