GDB (xrefs)

Classes | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/xml-support.h File Reference
`#include "gdb_obstack.h"`
`#include "vec.h"`
`#include "xml-utils.h"`

Go to the source code of this file.

## Classes
struct | gdb_xml_value
struct | gdb_xml_attribute
struct | gdb_xml_element
struct | gdb_xml_enum

## Typedefs
typedef gdb::unique_xmalloc_ptr< char >(* | xml_fetch_another) (const char *href, void *baton)
typedef struct gdb_xml_value | gdb_xml_value_s
typedef void *() | gdb_xml_attribute_handler(struct gdb_xml_parser *parser, const struct gdb_xml_attribute *, const char *value)
typedef void() | gdb_xml_element_start_handler(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
typedef void() | gdb_xml_element_end_handler(struct gdb_xml_parser *, const struct gdb_xml_element *, void *user_data, const char *body_text)

## Enumerations
enum | gdb_xml_attribute_flag { GDB_XML_AF_NONE, GDB_XML_AF_OPTIONAL = 1 << 0 }
enum | gdb_xml_element_flag { GDB_XML_EF_NONE, GDB_XML_EF_OPTIONAL = 1 << 0, GDB_XML_EF_REPEATABLE = 1 << 1 }

## Functions
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)
bool | xml_process_xincludes (std::string &result, const char *name, const char *text, xml_fetch_another fetcher, void *fetcher_baton, int depth)
| DEF_VEC_O (gdb_xml_value_s)
int | gdb_xml_parse_quick (const char *name, const char *dtd_name, const struct gdb_xml_element *elements, const char *document, void *user_data)
void | gdb_xml_debug (struct gdb_xml_parser *parser, const char *format,...) ATTRIBUTE_PRINTF(2
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 (VEC(gdb_xml_value_s) *attributes, const char *name)
ULONGEST | gdb_xml_parse_ulongest (struct gdb_xml_parser *parser, const char *value)
gdb::unique_xmalloc_ptr< char > | xml_fetch_content_from_file (const char *filename, void *baton)

## Variables
const char * | xml_builtin [][2]
gdb_xml_attribute_handler | gdb_xml_parse_attr_ulongest
const struct gdb_xml_enum | gdb_xml_enums_boolean []
gdb_xml_attribute_handler | gdb_xml_parse_attr_enum

## Typedef Documentation

## ◆ gdb_xml_attribute_handler

typedef void*() gdb_xml_attribute_handler(struct gdb_xml_parser *parser, const struct gdb_xml_attribute *, const char *value)

Definition at line 97 of file xml-support.h.

## ◆ gdb_xml_element_end_handler

typedef void() gdb_xml_element_end_handler(struct gdb_xml_parser *, const struct gdb_xml_element *, void *user_data, const char *body_text)

Definition at line 158 of file xml-support.h.

## ◆ gdb_xml_element_start_handler

typedef void() gdb_xml_element_start_handler(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)

Definition at line 148 of file xml-support.h.

## ◆ gdb_xml_value_s

typedef struct gdb_xml_value gdb_xml_value_s

Definition at line 80 of file xml-support.h.

## ◆ xml_fetch_another

typedef gdb::unique_xmalloc_ptr<char>(* xml_fetch_another) (const char *href, void *baton)

Definition at line 55 of file xml-support.h.

## Enumeration Type Documentation

## ◆ gdb_xml_attribute_flag

enum gdb_xml_attribute_flag

Enumerator
GDB_XML_AF_NONE |
GDB_XML_AF_OPTIONAL |

Definition at line 104 of file xml-support.h.

## ◆ gdb_xml_element_flag

enum gdb_xml_element_flag

Enumerator
GDB_XML_EF_NONE |
GDB_XML_EF_OPTIONAL |
GDB_XML_EF_REPEATABLE |

Definition at line 125 of file xml-support.h.

## Function Documentation

## ◆ DEF_VEC_O()

DEF_VEC_O | ( | gdb_xml_value_s |  | ) |

## ◆ fetch_xml_builtin()

const char* fetch_xml_builtin | ( | const char * | filename | ) |

Definition at line 947 of file xml-support.c.

References xml_builtin.

Referenced by gdb_xml_fetch_external_entity(), and xml_builtin_xfer_partial().

## ◆ gdb_xml_debug()

void gdb_xml_debug | ( | struct gdb_xml_parser * | parser,
|  | const char * | format,
|  |  | ...
| ) |  |

## ◆ gdb_xml_error()

void void gdb_xml_error | ( | struct gdb_xml_parser * | parser,
|  | const char * | format,
|  |  | ...
| ) |  |

## ◆ 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 at line 647 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_get_threads_with_qxfer(), svr4_parse_libraries(), syscall_parse_xml(), tdesc_parse_xml(), and VEC().

## ◆ gdb_xml_parse_ulongest()

ULONGEST gdb_xml_parse_ulongest | ( | struct gdb_xml_parser * | parser,
|  | const char * | value
| ) |  |

Definition at line 684 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().

## ◆ xml_builtin_xfer_partial()

LONGEST xml_builtin_xfer_partial | ( | const char * | filename,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf,
|  | ULONGEST | offset,
|  | LONGEST | len
| ) |  |

Definition at line 964 of file xml-support.c.

References fetch_xml_builtin(), gdb_assert, and offset.

## ◆ xml_fetch_content_from_file()

gdb::unique_xmalloc_ptr<char> xml_fetch_content_from_file | ( | const char * | filename,
|  | void * | baton
| ) |  |

Definition at line 997 of file xml-support.c.

References _, gdb_fopen_cloexec(), malloc_failure(), perror_with_name(), warning(), xfree(), and xmalloc().

Referenced by file_read_description_xml(), and xml_init_syscalls_info().

## ◆ xml_find_attribute()

void void struct gdb_xml_value* xml_find_attribute | ( | VEC(gdb_xml_value_s) * | attributes,
|  | const char * | name
| ) |  |

Definition at line 231 of file xml-support.c.

References name, gdb_xml_value::value, and VEC_iterate.

Referenced by check_xml_btrace_version(), library_list_start_library(), 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().

## ◆ xml_process_xincludes()

bool xml_process_xincludes | ( | std::string & | result,
|  | const char * | name,
|  | const char * | text,
|  | xml_fetch_another | fetcher,
|  | void * | fetcher_baton,
|  | int | depth
| ) |  |

Definition at line 905 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().

## Variable Documentation

## ◆ gdb_xml_enums_boolean

const struct gdb_xml_enum gdb_xml_enums_boolean[]

Definition at line 715 of file xml-support.c.

## ◆ gdb_xml_parse_attr_enum

gdb_xml_attribute_handler gdb_xml_parse_attr_enum

## ◆ gdb_xml_parse_attr_ulongest

gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest

## ◆ xml_builtin

const char* xml_builtin[][2]