diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/break-interp-lib.c')
-rw-r--r-- | gdb/testsuite/gdb.base/break-interp-lib.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/break-interp-lib.c b/gdb/testsuite/gdb.base/break-interp-lib.c index c103da3..9ca943e 100644 --- a/gdb/testsuite/gdb.base/break-interp-lib.c +++ b/gdb/testsuite/gdb.base/break-interp-lib.c @@ -16,9 +16,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> +#include <unistd.h> +#include <assert.h> +#include <stdio.h> void -libfunc (void) +libfunc (const char *action) { - raise (SIGSEGV); + assert (action != NULL); + + if (strcmp (action, "segv") == 0) + raise (SIGSEGV); + + if (strcmp (action, "sleep") == 0) + { + puts ("sleeping"); + fflush (stdout); + + sleep (60); + } + + assert (0); } |