Recently moved from gdb 4.17 on solaris 2.[56]
to gdb 4.18 on solaris 7, and have noticed that gdb no longer steps over
a longjmp call as it used to do.
That is, if you are single stepping (nexting actually), and you come to a
longjmp call, when you say "n" the program just continues and runs to
completion or the next breakpoint, if one is set.
Previously, it would stop correctly at the first statement after in the "if
setjmp" clause.
Is this a know bug/limitation, or is it supposed to work?
Thanks for any tips...
Here is the gdb banner:
$ gdb a.out
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.7"...
FYI, I'm using gcc version 2.95.2, don't know if that matters or not.
Following is a simple test program that illustrates the problem:
#include <stdio.h>
#include <stddef.h>
#include <setjmp.h>
int main (int ac, char **av)
{
jmp_buf env;
if (setjmp(env))
{
printf ("after longjmp\n"); /* (3) should step to here, if
correct */
}
else
{
printf ("before longjmp\n"); /* (1) set breakpoint here */
longjmp(env, 1); /* (2) next from here... */
printf ("should not be reached!\n");
}
return 0;
}
============================================================
Roger S. Reynolds
email: [EMAIL PROTECTED] [EMAIL PROTECTED]
Web: http://www.rogerware.com