[fpc-devel] New Windows gdb-binary

Pierre Free Pascal pierre at freepascal.org
Tue Oct 4 09:23:19 CEST 2011


> > 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) \
> 
> roflol. Take a good look at this patch. Especially the last few
> lines...

  Of course I saw the TYPE_ERROR_NAME macro
and I adapted it because I believed that you
were using this in a case where the type itself was not
an error type.
 
> I'll use TYPE_ERROR_NAME. Thanks for the hint. ;)

  Again, it all depends if you only need it for
types that are already flagged as error type
(which has a precise meaning inside GDB).

  Pierre





More information about the fpc-devel mailing list