diff options
author | Stan Shebs <shebs@apple.com> | 1999-04-16 01:35:26 +0000 |
---|---|---|
committer | Stan Shebs <shebs@apple.com> | 1999-04-16 01:35:26 +0000 |
commit | 14cd51f7793a9ce07bc435069f57269450141363 (patch) | |
tree | 280a2da48f771d61be5b451ddbacdf9ef8e9ad13 /gdb/testsuite/gdb.hp/foll-exec.c | |
download | gdb-14cd51f7793a9ce07bc435069f57269450141363.tar.gz |
Initial revision
Diffstat (limited to 'gdb/testsuite/gdb.hp/foll-exec.c')
-rw-r--r-- | gdb/testsuite/gdb.hp/foll-exec.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.hp/foll-exec.c b/gdb/testsuite/gdb.hp/foll-exec.c new file mode 100644 index 00000000000..c51fa52dcfd --- /dev/null +++ b/gdb/testsuite/gdb.hp/foll-exec.c @@ -0,0 +1,35 @@ +#include <stdio.h> + +int global_i = 100; + +main () +{ + int local_j = global_i+1; + int local_k = local_j+1; + + printf ("follow-exec is about to execlp(execd-program)...\n"); + + execlp ("gdb.hp/execd-program", + "gdb.hp/execd-program", + "execlp arg1 from follow-exec", + (char *)0); + + printf ("follow-exec is about to execl(execd-program)...\n"); + + execl ("gdb.hp/execd-program", + "gdb.hp/execd-program", + "execl arg1 from follow-exec", + "execl arg2 from follow-exec", + (char *)0); + + { + static char * argv[] = { + "gdb.hp/execd-program", + "execv arg1 from follow-exec", + 0}; + + printf ("follow-exec is about to execv(execd-program)...\n"); + + execv ("gdb.hp/execd-program", argv); + } +} |