[PATCH] Allow gdb to find debug symbols file by build-id for PE file format also

Jon TURNEY jon.turney@dronecode.org.uk
Mon Jun 15 18:25:00 GMT 2015


On 15/06/2015 19:13, Andreas Schwab wrote:
> Mike Frysinger <vapier@gentoo.org> writes:
>
>> don't know what the policy is here in this header
>
> It should use bfd_size_type.

Patch attached.



-------------- next part --------------
From 9c96da937babaedd5b23ae352359c3caaf8524ad Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Mon, 15 Jun 2015 19:20:02 +0100
Subject: [PATCH] Fix build when size_t is not available in bfd-in2.h

bfd/ChangeLog:

2015-06-15  Jon Turney  <jon.turney@dronecode.org.uk>

	* bfd.c: Change struct bfd_build_id to use bfd_size_type.
	* bfd-in2.h : Regenerate.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
 bfd/ChangeLog | 5 +++++
 bfd/bfd-in2.h | 2 +-
 bfd/bfd.c     | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 886da5b..265cc41f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-15  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* bfd.c: Change struct bfd_build_id to use bfd_size_type.
+	* bfd-in2.h : Regenerate.
+
 2015-06-10  Jon Turney  <jon.turney@dronecode.org.uk>
 
 	* elf-bfd.h : Remove struct elf_build_id.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index dfffe3c..2d32c74 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -6328,7 +6328,7 @@ enum bfd_plugin_format
 
 struct bfd_build_id
   {
-    size_t size;
+    bfd_size_type size;
     bfd_byte data[1];
   };
 
diff --git a/bfd/bfd.c b/bfd/bfd.c
index e60f358..8d85de5 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -53,7 +53,7 @@ CODE_FRAGMENT
 .
 .struct bfd_build_id
 .  {
-.    size_t size;
+.    bfd_size_type size;
 .    bfd_byte data[1];
 .  };
 .
-- 
2.1.4



More information about the Binutils mailing list