From ca4ca11edda678ddafee7314829cc14c11a570ca Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 9 Jan 2007 14:58:57 +0000 Subject: * configure.ac: Check for XML_StopParser. * xml-support.c (gdb_xml_body_text): Check for an error. (gdb_xml_start_element_wrapper): Conditionalize call to XML_StopParser. (gdb_xml_end_element_wrapper): Likewise. * config.in, configure: Regenerated. --- gdb/xml-support.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/xml-support.c') diff --git a/gdb/xml-support.c b/gdb/xml-support.c index 18416c8..bebe732 100644 --- a/gdb/xml-support.c +++ b/gdb/xml-support.c @@ -81,6 +81,9 @@ gdb_xml_body_text (void *data, const XML_Char *text, int length) struct gdb_xml_parser *parser = data; struct scope_level *scope = VEC_last (scope_level_s, parser->scopes); + if (parser->error.reason < 0) + return; + if (scope->body == NULL) { scope->body = XZALLOC (struct obstack); @@ -286,7 +289,9 @@ gdb_xml_start_element_wrapper (void *data, const XML_Char *name, if (ex.reason < 0) { parser->error = ex; +#ifdef HAVE_XML_STOPPARSER XML_StopParser (parser->expat_parser, XML_FALSE); +#endif } } @@ -362,7 +367,9 @@ gdb_xml_end_element_wrapper (void *data, const XML_Char *name) if (ex.reason < 0) { parser->error = ex; +#ifdef HAVE_XML_STOPPARSER XML_StopParser (parser->expat_parser, XML_FALSE); +#endif } } -- cgit v1.1