aboutsummaryrefslogtreecommitdiff
path: root/gdb/xml-support.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-01-09 14:58:57 +0000
committerDaniel Jacobowitz <drow@false.org>2007-01-09 14:58:57 +0000
commitca4ca11edda678ddafee7314829cc14c11a570ca (patch)
treee015f69dc34d4a370dacb95d4230098af790ddf1 /gdb/xml-support.c
parent10a2343ede2c3b8c9123e275d7f2c42dbfc78981 (diff)
downloadgdb-ca4ca11edda678ddafee7314829cc14c11a570ca.zip
gdb-ca4ca11edda678ddafee7314829cc14c11a570ca.tar.gz
gdb-ca4ca11edda678ddafee7314829cc14c11a570ca.tar.bz2
* 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 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
}
}