public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Compile Break for !defined(HAVE_LIBEXPAT): Patch included
@ 2020-09-14 21:31 Michael Mullin
  2020-09-15  0:43 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Mullin @ 2020-09-14 21:31 UTC (permalink / raw)
  To: gdb-patches, binutils

[-- Attachment #1: Type: text/plain, Size: 71 bytes --]

Hello.  I believe you need a patch similar to the one I have attached.

[-- Attachment #2: 0001-fix-compile-break-when-HAVE_LIBEXPAT-is-not-defined.patch --]
[-- Type: text/x-patch, Size: 702 bytes --]

From 089d6a02d0c10b3cbb55ad587046241f5f4236ca Mon Sep 17 00:00:00 2001
From: Michael Mullin <masmullin@gmail.com>
Date: Mon, 14 Sep 2020 17:20:01 -0400
Subject: [PATCH] fix compile break when HAVE_LIBEXPAT is not defined

---
 gdb/xml-tdesc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index 6e21ff42da..234a08cd65 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -41,8 +41,7 @@
    an XML parser.  */
 
 static struct target_desc *
-tdesc_parse_xml (const char *document, xml_fetch_another fetcher,
-		 void *fetcher_baton)
+tdesc_parse_xml (const char *document, xml_fetch_another fetcher)
 {
   static int have_warned;
 
-- 
2.26.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compile Break for !defined(HAVE_LIBEXPAT): Patch included
  2020-09-14 21:31 Compile Break for !defined(HAVE_LIBEXPAT): Patch included Michael Mullin
@ 2020-09-15  0:43 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2020-09-15  0:43 UTC (permalink / raw)
  To: Michael Mullin, gdb-patches, binutils

On 2020-09-14 5:31 p.m., Michael Mullin via Gdb-patches wrote:
> Hello.  I believe you need a patch similar to the one I have attached.
> 

Ohh, thanks.  My patch broke this.  I wrote a commit message and ChangeLog entry for
your patch and pushed it as below:

From e1044e6adca7d48674d70a860b3a5939fe44323f Mon Sep 17 00:00:00 2001
From: Michael Mullin <masmullin@gmail.com>
Date: Mon, 14 Sep 2020 20:39:54 -0400
Subject: [PATCH] gdb: fix compile break when HAVE_LIBEXPAT is not defined

Fixes:

      CXX    xml-tdesc.o
    /home/smarchi/src/binutils-gdb/gdb/xml-tdesc.c: In function const target_desc* file_read_description_xml(const char*):
    /home/smarchi/src/binutils-gdb/gdb/xml-tdesc.c:681:60: error: too few arguments to function target_desc* tdesc_parse_xml(const char*, xml_fetch_another, void*)
      681 |   return tdesc_parse_xml (tdesc_str->data (), fetch_another);
          |                                                            ^
    /home/smarchi/src/binutils-gdb/gdb/xml-tdesc.c:44:1: note: declared here
       44 | tdesc_parse_xml (const char *document, xml_fetch_another fetcher,
          | ^~~~~~~~~~~~~~~

Commit 8400a90d19c5 ("gdb: change xml_fetch_another a function_view")
removed the `baton` parameter of `tdesc_parse_xml`, but didn't update
the version of the function used when GDB is built with no libexpat
support.  Remove the parameter in that definition too.

gdb/ChangeLog:

	* xml-tdesc.c [!defined(HAVE_LIBEXPAT)] (tdesc_parse_xml):
	Remove baton parameter.

Change-Id: I4ad29fbb7c3323f30ce5204c2976eaea16151a2e
---
 gdb/ChangeLog   | 5 +++++
 gdb/xml-tdesc.c | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 45c712522674..0e6dec38b2ae 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-14  Michael Mullin  <masmullin@gmail.com>
+
+	* xml-tdesc.c [!defined(HAVE_LIBEXPAT)] (tdesc_parse_xml):
+	Remove baton parameter.
+
 2020-09-14  Pedro Alves  <pedro@palves.net>

 	* Makefile.in (SELFTESTS_SRCS): Add
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index 6e21ff42dafd..234a08cd654a 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -41,8 +41,7 @@
    an XML parser.  */

 static struct target_desc *
-tdesc_parse_xml (const char *document, xml_fetch_another fetcher,
-		 void *fetcher_baton)
+tdesc_parse_xml (const char *document, xml_fetch_another fetcher)
 {
   static int have_warned;

-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-15  0:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 21:31 Compile Break for !defined(HAVE_LIBEXPAT): Patch included Michael Mullin
2020-09-15  0:43 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).