The -Wbounded warning is caused by somewhat strange and conflicting
definitions for FILNMLEN/E_FILNMLEN in coff/*.h.  Unless anyone cares
about long NT filenames, I think we should just remove support for those
until the gdb/bfd people sort this out and make the defines consistent.  
It probably wouldn't work anyway due to memcpy overflows.

Unfortunately, loading core files still doesn't work (at least on
amd64), but iirc that has never been the case with the new gdb.


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/gdb/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile    27 Sep 2011 20:26:45 -0000      1.10
+++ Makefile    15 Oct 2011 13:34:17 -0000
@@ -4,7 +4,7 @@ COMMENT=        GNU debugger
 CATEGORIES=    devel
 
 DISTNAME=      gdb-7.2
-REVISION=      1
+REVISION=      2
 
 MASTER_SITES=  ${MASTER_SITE_GNU:=gdb/} \
                http://distfiles.nl/
Index: patches/patch-include_coff_pe_h
===================================================================
RCS file: patches/patch-include_coff_pe_h
diff -N patches/patch-include_coff_pe_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-include_coff_pe_h     15 Oct 2011 13:34:17 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+avoid an overflow in memcpy at peigen.c:252, where this definition of
+FILNMLEN is picked up instead of the correct 14 from coff/internal.h
+(where the buffer was declared).
+--- include/coff/pe.h.orig     Sat Oct 15 14:57:05 2011
++++ include/coff/pe.h  Sat Oct 15 14:57:16 2011
+@@ -171,8 +171,6 @@
+ 
+ /* NT allows long filenames, we want to accommodate this.
+    This may break some of the bfd functions.  */
+-#undef  FILNMLEN
+-#define FILNMLEN      18      /* # characters in a file name.  */
+ 
+ struct external_PEI_DOS_hdr
+ {

Reply via email to