[fpc-devel] New Windows gdb-binary

Pierre Free Pascal pierre at freepascal.org
Mon Oct 3 16:40:05 CEST 2011



> -----Message d'origine-----
> De : fpc-devel-bounces at lists.freepascal.org [mailto:fpc-devel-
> bounces at lists.freepascal.org] De la part de Joost van der Sluis
> Envoyé : lundi 3 octobre 2011 16:29
> À : FPC developers' list
> Objet : RE: [fpc-devel] New Windows gdb-binary
> 
> On Sat, 2011-10-01 at 11:00 +0200, Pierre Free Pascal wrote:
> >  Did you use the mingw 7.3 patch that handles
> > the windows style path containing ':'?
> 
> No.
> 
> >   I recreated the patch below by doing a diff
> > from official GDB 7.3 release
> > and mingw7.3.2 sources.
> >
> >   Without this, debug information containing drive letters
> > are wrongly cut into parts at the ':' position...
> 
> Thanks. That was one of the issues I still had, without a clue how to
> fix it.
> 
> Can you also think about this problem:
> http://www.cygwin.com/ml/gdb/2011-10/msg00003.html
> 
> Because I've got this problem now at two places (two different warnings)
> already. The second warning is also in stock-fsf-gdb. I can't imagine
> that the official GDB 7.3 also has this problem with nul-parameters and
> fprintf.

Use this new macro:

$ cvs diff -u -p  gdbtypes.h
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.153
diff -u -p -r1.153 gdbtypes.h
--- gdbtypes.h  5 Jul 2011 13:36:41 -0000       1.153
+++ gdbtypes.h  3 Oct 2011 14:39:08 -0000
@@ -1115,6 +1115,11 @@ extern void allocate_gnat_aux_type (stru
        || TYPE_NFN_FIELDS (thistype) == 0) \
    && (TYPE_STUB (thistype) || !TYPE_STUB_SUPPORTED (thistype)))

+/* A helper macro that returns the name of a type or "unnamed type" if the
type
+   has no name.  */
+#define TYPE_SAFE_NAME(type) \
+  (TYPE_NAME (type) ? TYPE_NAME (type) : _("<unnamed type>"))
+
 /* A helper macro that returns the name of an error type.  If the type
    has a name, it is used; otherwise, a default is used.  */
 #define TYPE_ERROR_NAME(type) \


Just replace TYPE_NAME by TYPE_SAFE_NAME
at each occurrence within printf calls.
> Joost
> 
> --
> My Lazarus blog: http://www.lazarussupport.com/lazarus/weblog
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list