diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-03-03 09:17:45 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-03-03 09:17:45 +0000 |
commit | 8fc8cbdaf698ed042d859d5749cff66937bbb57c (patch) | |
tree | b4024b4e869a8649ca7be9d319628d6fa8275668 /gdb/testsuite/gdb.base/step-over-fork.c | |
parent | 92fa70b0bd8690d979357ebcdb501a9e4aa42ea6 (diff) | |
download | binutils-8fc8cbdaf698ed042d859d5749cff66937bbb57c.zip binutils-8fc8cbdaf698ed042d859d5749cff66937bbb57c.tar.gz binutils-8fc8cbdaf698ed042d859d5749cff66937bbb57c.tar.bz2 |
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 <yao.qi@linaro.org>
* 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.
Diffstat (limited to 'gdb/testsuite/gdb.base/step-over-fork.c')
-rw-r--r-- | gdb/testsuite/gdb.base/step-over-fork.c | 58 |
1 files changed, 58 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>. */ + +#include <stdlib.h> +#include <unistd.h> + +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 (); + +} |