This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: PATCH: GNU C extention in uw-thread.c
Andrew Cagney wrote:
> Robert Lipe wrote:
> >
> > CALL_BASE uses __FUNCTION__ which is a GNU C extension.
> >
> > This might not be the best way to deal with this, but it allows compilation
> > on non-GNU compilers.
>
> FYI, an equivalent patch was applied by Nick Duff.
That is the moral equivalent of the first patch I submitted for this. It
was rejected becuase then CALL_BASE prints ugly messages. Specifically,
it will print:
uw-thread: : no lwp
if GDB is build on a non-gcc compiler.
Whacking the use of __FUNCTION__ completely might therefore be preferable.
See:
http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00074.html
Thanx,
RJL
>
> thanks,
> Andrew
>
> >
> > RJL
> >
> > Index: uw-thread.c
> > ===================================================================
> > RCS file: /cvs/gdb/gdb/gdb/uw-thread.c,v
> > retrieving revision 1.1.1.1
> > diff -u -p -r1.1.1.1 uw-thread.c
> > --- uw-thread.c 2000/01/18 00:54:24 1.1.1.1
> > +++ uw-thread.c 2000/01/23 21:31:57
> > @@ -152,6 +152,10 @@ do { \
> > *
> > * Otherwise, issue an error message and return nonlocally.
> > */
> > +#if !defined (__FUNCTION__)
> > +# define __FUNCTION__
> > +#endif
> > +
> > #define CALL_BASE(call) \
> > do { \
> > if (!lwp_infpid ()) \