From 8fc8cbdaf698ed042d859d5749cff66937bbb57c Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Thu, 3 Mar 2016 09:17:45 +0000 Subject: Rename disp-step-syscall.exp to step-over-syscall.exp disp-step-syscall.exp is extended for stepping over syscall instruction in different cases, with or without displaced stepping, and stepping over by GDBserver. This patch rename disp-step-syscall.exp to step-over-syscall.exp to reflect this. gdb/testsuite: 2016-03-03 Yao Qi * gdb.base/disp-step-fork.c: Rename to ... * gdb.base/step-over-fork.c: ... it. New file. * gdb.base/disp-step-vfork.c: Rename to ... * gdb.base/step-over-vfork.c: ... it. New file. * gdb.base/disp-step-syscall.exp: Rename to ... * gdb.base/step-over-syscall.exp: ... it. New file. (disp_step_cross_syscall): Rename to ... (step_over_syscall): ... it. --- gdb/testsuite/gdb.base/step-over-fork.c | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 gdb/testsuite/gdb.base/step-over-fork.c (limited to 'gdb/testsuite/gdb.base/step-over-fork.c') diff --git a/gdb/testsuite/gdb.base/step-over-fork.c b/gdb/testsuite/gdb.base/step-over-fork.c new file mode 100644 index 0000000..dd84f57 --- /dev/null +++ b/gdb/testsuite/gdb.base/step-over-fork.c @@ -0,0 +1,58 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2011-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include + +static void +marker () {} + +int +main (void) +{ + int pid; + + pid = fork (); + if (pid == 0) /* child */ + { + exit (0); /* at exit */ + } + else + { + } + + pid = fork (); + if (pid == 0) /* child */ + { + exit (0); /* at exit */ + } + else + { + } + + pid = fork (); + if (pid == 0) /* child */ + { + exit (0); /* at exit */ + } + else + { + } + + marker (); + +} -- cgit v1.1