This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA] work around sigsetjmp/siglongjmp macro problems


Keith Seitz writes:
 > On Mon, 13 Aug 2001, Christopher Faylor wrote:
 > 
 > > My proposed patch is below.  It may even be an obvious fix.
 > >
 > > Keith, could you try this out and verify that it fixes the problem?
 > 
 > Yep, works just fine.
 > 
 > Keith


Ok, check it in.  I don't think there is need for comments. Maybe in
the gdb coding style section of the gdb internal manual, we should make
this point about macro's arguments. Eli?

Elena


 > 
 > > 2001-08-13  Christopher Faylor  <cgf@cygnus.com>
 > >
 > > 	* top.c (SIGSETJMP): Protect macro argument with parentheses.
 > > 	(SIGLONGJMP): Protect macro argument with parentheses.
 > >
 > > Index: top.c
 > > ===================================================================
 > > RCS file: /cvs/uberbaum/gdb/top.c,v
 > > retrieving revision 1.42
 > > diff -p -r1.42 top.c
 > > *** top.c	2001/08/01 18:39:23	1.42
 > > --- top.c	2001/08/14 03:05:50
 > > *************** NORETURN void (*error_hook) (void) ATTR_
 > > *** 299,310 ****
 > >      directly.  */
 > >   #if defined(HAVE_SIGSETJMP)
 > >   #define SIGJMP_BUF		sigjmp_buf
 > > ! #define SIGSETJMP(buf)		sigsetjmp(buf, 1)
 > > ! #define SIGLONGJMP(buf,val)	siglongjmp(buf,val)
 > >   #else
 > >   #define SIGJMP_BUF		jmp_buf
 > >   #define SIGSETJMP(buf)		setjmp(buf)
 > > ! #define SIGLONGJMP(buf,val)	longjmp(buf,val)
 > >   #endif
 > >
 > >   /* Where to go for return_to_top_level.  */
 > > --- 299,310 ----
 > >      directly.  */
 > >   #if defined(HAVE_SIGSETJMP)
 > >   #define SIGJMP_BUF		sigjmp_buf
 > > ! #define SIGSETJMP(buf)		sigsetjmp((buf), 1)
 > > ! #define SIGLONGJMP(buf,val)	siglongjmp((buf), (val))
 > >   #else
 > >   #define SIGJMP_BUF		jmp_buf
 > >   #define SIGSETJMP(buf)		setjmp(buf)
 > > ! #define SIGLONGJMP(buf,val)	longjmp((buf), (val))
 > >   #endif
 > >
 > >   /* Where to go for return_to_top_level.  */
 > >


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