GDB (xrefs)

Public Member Functions | Private Attributes | List of all members
gdb_xml_parser Struct Reference

## Public Member Functions
| gdb_xml_parser (const char *name, const gdb_xml_element *elements, void *user_data)
| ~gdb_xml_parser ()
void | use_dtd (const char *dtd_name)
const char * | dtd_name ()
int | parse (const char *buffer)
void | vdebug (const char *format, va_list ap) ATTRIBUTE_PRINTF(2
void void | verror (const char *format, va_list ap) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(2
void void void | body_text (const XML_Char *text, int length)
void | start_element (const XML_Char *name, const XML_Char **attrs)
void | end_element (const XML_Char *name)
const char * | name ()
void * | user_data ()
void | set_is_xinclude (bool is_xinclude)
void | set_error (gdb_exception error)
XML_Parser | expat_parser ()

## Private Attributes
XML_Parser | m_expat_parser
const char * | m_name
void * | m_user_data
std::vector< scope_level > | m_scopes
struct gdb_exception | m_error
int | m_last_line
const char * | m_dtd_name
bool | m_is_xinclude

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ gdb_xml_parser()

gdb_xml_parser::gdb_xml_parser | ( | const char * | name,
|  | const gdb_xml_element * | elements,
|  | void * | user_data
| ) |  |

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

References gdb_xml_body_text(), gdb_xml_end_element_wrapper(), gdb_xml_start_element_wrapper(), m_expat_parser, m_scopes, and malloc_failure().

## ◆ ~gdb_xml_parser()

gdb_xml_parser::~gdb_xml_parser | ( |  | ) |

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

References m_expat_parser.

## Member Function Documentation

## ◆ body_text()

void gdb_xml_parser::body_text | ( | const XML_Char * | text,
|  | int | length
| ) |  |

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

References scope_level::body, m_error, m_scopes, and gdb_exception::reason.

Referenced by gdb_xml_body_text().

## ◆ dtd_name()

const char* gdb_xml_parser::dtd_name | ( |  | ) |
| inline

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

References m_dtd_name.

Referenced by gdb_xml_fetch_external_entity(), gdb_xml_parse_quick(), and use_dtd().

## ◆ end_element()

void gdb_xml_parser::end_element | ( | const XML_Char * | name | ) |

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

References _, scope_level::body, scope_level::element, scope_level::elements, gdb_xml_element::end_handler, gdb_xml_element::flags, gdb_xml_debug(), GDB_XML_EF_OPTIONAL, gdb_xml_error(), m_error, m_expat_parser, m_scopes, m_user_data, name(), gdb_xml_element::name, gdb_exception::reason, and scope_level::seen.

Referenced by gdb_xml_end_element_wrapper().

## ◆ expat_parser()

XML_Parser gdb_xml_parser::expat_parser | ( |  | ) |
| inline

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

References m_expat_parser.

Referenced by gdb_xml_fetch_external_entity(), and xml_process_xincludes().

## ◆ name()

const char* gdb_xml_parser::name | ( |  | ) |
| inline

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

References m_name.

Referenced by end_element(), start_element(), and xinclude_start_include().

## ◆ parse()

int gdb_xml_parser::parse | ( | const char * | buffer | ) |

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

References _, err, gdb_exception::error, gdb_assert, gdb_xml_debug(), m_error, m_expat_parser, m_last_line, m_name, gdb_exception::message, gdb_exception::reason, RETURN_ERROR, status, throw_exception(), warning(), XML_PARSE_ERROR, XML_STATUS_ERROR, and XML_STATUS_OK.

Referenced by gdb_xml_parse_quick(), and xml_process_xincludes().

## ◆ set_error()

void gdb_xml_parser::set_error | ( | gdb_exception | error | ) |
| inline

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

References error(), m_error, and m_expat_parser.

Referenced by gdb_xml_end_element_wrapper(), and gdb_xml_start_element_wrapper().

## ◆ set_is_xinclude()

void gdb_xml_parser::set_is_xinclude | ( | bool | is_xinclude | ) |
| inline

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

References m_is_xinclude.

Referenced by xml_process_xincludes().

## ◆ start_element()

void gdb_xml_parser::start_element | ( | const XML_Char * | name,
|  | const XML_Char ** | attrs
| ) |  |

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

References _, gdb_xml_element::attributes, gdb_xml_element::children, debug_xml, do_cleanups(), scope_level::element, scope_level::elements, gdb_xml_element::flags, GDB_XML_AF_OPTIONAL, gdb_xml_debug(), GDB_XML_EF_REPEATABLE, gdb_xml_error(), gdb_xml_values_cleanup(), m_error, m_expat_parser, m_is_xinclude, m_scopes, m_user_data, make_cleanup(), gdb_xml_value::name, name(), gdb_xml_element::name, attribute::name, gdb_exception::reason, scope_level::seen, gdb_xml_element::start_handler, gdb_xml_value::value, VEC, and VEC_safe_push.

Referenced by gdb_xml_start_element_wrapper().

## ◆ use_dtd()

void gdb_xml_parser::use_dtd | ( | const char * | dtd_name | ) |

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

References _, dtd_name(), err, gdb_xml_fetch_external_entity(), internal_error(), m_dtd_name, and m_expat_parser.

Referenced by gdb_xml_parse_quick(), and xml_process_xincludes().

## ◆ user_data()

void* gdb_xml_parser::user_data | ( |  | ) |
| inline

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

References m_user_data.

Referenced by gdb_xml_parse_quick(), xml_xinclude_default(), xml_xinclude_end_doctype(), and xml_xinclude_start_doctype().

## ◆ vdebug()

void gdb_xml_parser::vdebug | ( | const char * | format,
|  | va_list | ap
| ) |  |

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

References fprintf_unfiltered(), gdb_stderr, m_expat_parser, m_name, xfree(), and xstrvprintf().

Referenced by gdb_xml_debug().

## ◆ verror()

void gdb_xml_parser::verror | ( | const char * | format,
|  | va_list | ap
| ) |  |

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

References m_expat_parser, m_last_line, throw_verror(), and XML_PARSE_ERROR.

Referenced by gdb_xml_error().

## Member Data Documentation

## ◆ m_dtd_name

const char* gdb_xml_parser::m_dtd_name
| private

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

Referenced by dtd_name(), and use_dtd().

## ◆ m_error

struct gdb_exception gdb_xml_parser::m_error
| private

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

Referenced by body_text(), end_element(), parse(), set_error(), and start_element().

## ◆ m_expat_parser

XML_Parser gdb_xml_parser::m_expat_parser
| private

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

Referenced by end_element(), expat_parser(), gdb_xml_parser(), parse(), set_error(), start_element(), use_dtd(), vdebug(), verror(), and ~gdb_xml_parser().

## ◆ m_is_xinclude

bool gdb_xml_parser::m_is_xinclude
| private

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

Referenced by set_is_xinclude(), and start_element().

## ◆ m_last_line

int gdb_xml_parser::m_last_line
| private

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

Referenced by parse(), and verror().

## ◆ m_name

const char* gdb_xml_parser::m_name
| private

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

Referenced by name(), parse(), and vdebug().

## ◆ m_scopes

std::vector<scope_level> gdb_xml_parser::m_scopes
| private

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

Referenced by body_text(), end_element(), gdb_xml_parser(), and start_element().

## ◆ m_user_data

void* gdb_xml_parser::m_user_data
| private

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

Referenced by end_element(), start_element(), and user_data().

The documentation for this struct was generated from the following file:

- /tmp/gdb-8.1/gdb/xml-support.c