diff options
author | Marcin KoĆcielnicki <koriakin@0x04.net> | 2016-02-11 23:52:44 +0100 |
---|---|---|
committer | Marcin KoĆcielnicki <koriakin@0x04.net> | 2016-02-12 11:21:00 +0100 |
commit | d21b5f15d92bc1902b9e57198f67550326c887d7 (patch) | |
tree | 654be6f28107c5b1b9c7d6f8fe87f2ec8533a4da /gdb/xml-tdesc.c | |
parent | 33b4777ca1b7b456af8201b98eda27d1b272cbab (diff) | |
download | binutils-gdb-d21b5f15d92bc1902b9e57198f67550326c887d7.tar.gz |
gdb: Fix build failure in xml-tdesc.c without expat.
Introduced by 18d3cec54e1b4fce278dba436484846f8048d7d6.
gdb/ChangeLog:
* xml-tdesc.c (target_fetch_description_xml) [!HAVE_LIBEXPAT]: Warn
and return NULL.
Diffstat (limited to 'gdb/xml-tdesc.c')
-rw-r--r-- | gdb/xml-tdesc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c index 4625b60311b..b5439e567bb 100644 --- a/gdb/xml-tdesc.c +++ b/gdb/xml-tdesc.c @@ -638,6 +638,18 @@ target_read_description_xml (struct target_ops *ops) char * target_fetch_description_xml (struct target_ops *ops) { +#if !defined(HAVE_LIBEXPAT) + static int have_warned; + + if (!have_warned) + { + have_warned = 1; + warning (_("Can not fetch XML target description; XML support was " + "disabled at compile time")); + } + + return NULL; +#else struct target_desc *tdesc; char *tdesc_str; char *expanded_text; @@ -659,4 +671,5 @@ target_fetch_description_xml (struct target_ops *ops) } return expanded_text; +#endif } |