summaryrefslogtreecommitdiff
path: root/gdb/xml-support.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-01-09 14:58:57 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-01-09 14:58:57 +0000
commit6d45f1ea3c7e482feeaabcd43cb03099873d2f9d (patch)
tree2e68f6afdf9d71ec0e4998a9cf5a5ecad9b518e5 /gdb/xml-support.c
parent1c7033a53c52393de14fce6d2edd353b69702342 (diff)
downloadgdb-6d45f1ea3c7e482feeaabcd43cb03099873d2f9d.tar.gz
* 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.
Diffstat (limited to 'gdb/xml-support.c')
-rw-r--r--gdb/xml-support.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/xml-support.c b/gdb/xml-support.c
index 18416c8019e..bebe73201fe 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
}
}