This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Read PE exported symbols on ARM WinCE too.


The coff-pe-read.c reader (builds minsyms from dll exports, if no
other symbols for the image are found) is currently skipped on
archs != x86*; I've confirmed this also works with ARM PE images too.

I checked in the patch below.

-- 
Pedro Alves

2009-07-05  Pedro Alves  <pedro@codesourcery.com>

	* coff-pe-read.c (read_pe_exported_syms): Recognize
	"pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
	targets.

---
 gdb/coff-pe-read.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Index: src/gdb/coff-pe-read.c
===================================================================
--- src.orig/gdb/coff-pe-read.c	2009-07-05 21:57:21.000000000 +0100
+++ src/gdb/coff-pe-read.c	2009-07-05 22:44:46.000000000 +0100
@@ -207,15 +207,18 @@ read_pe_exported_syms (struct objfile *o
 
   char const *target = bfd_get_target (objfile->obfd);
 
-  is_pe64 = ((strcmp (target, "pe-x86-64") == 0)
-             || (strcmp (target, "pei-x86-64") == 0));
-  is_pe32 = ((strcmp (target, "pe-i386") == 0)
-             || (strcmp (target, "pei-i386") == 0));
+  is_pe64 = (strcmp (target, "pe-x86-64") == 0
+	     || strcmp (target, "pei-x86-64") == 0);
+  is_pe32 = (strcmp (target, "pe-i386") == 0
+	     || strcmp (target, "pei-i386") == 0
+	     || strcmp (target, "pe-arm-wince-little") == 0
+	     || strcmp (target, "pei-arm-wince-little") == 0);
+
   if (!is_pe32 && !is_pe64)
     {
-      /* This is not an i386 format file. Abort now, because the code
-         is untested on anything else. *FIXME* test on further
-         architectures and loosen or remove this test. */
+      /* This is not a recognized PE format file.  Abort now, because
+	 the code is untested on anything else.  *FIXME* test on
+	 further architectures and loosen or remove this test. */
       return;
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]