diff options
author | David Taylor <taylor@redhat.com> | 1999-01-04 15:37:21 +0000 |
---|---|---|
committer | David Taylor <taylor@redhat.com> | 1999-01-04 15:37:21 +0000 |
commit | 8e260d5270d6b2228b710ba2dc0b24ad6eb98222 (patch) | |
tree | 2ee753aef4d6179db32b4dffc378a9b6cb7c114e /gdb/testsuite/gdb.hp/execd-program.c | |
parent | 7cada34aec73e03dbbbb95fbfb07c6fc5c5ed4bb (diff) | |
download | gdb-8e260d5270d6b2228b710ba2dc0b24ad6eb98222.zip gdb-8e260d5270d6b2228b710ba2dc0b24ad6eb98222.tar.gz gdb-8e260d5270d6b2228b710ba2dc0b24ad6eb98222.tar.bz2 |
new files -- part of HP merge.
Diffstat (limited to 'gdb/testsuite/gdb.hp/execd-program.c')
-rw-r--r-- | gdb/testsuite/gdb.hp/execd-program.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.hp/execd-program.c b/gdb/testsuite/gdb.hp/execd-program.c new file mode 100644 index 0000000..0320991 --- /dev/null +++ b/gdb/testsuite/gdb.hp/execd-program.c @@ -0,0 +1,28 @@ +#include <stdio.h> + +/* There is a global_i in follow_exec, which exec's us. We + should not be able to see that other definition of global_i + after we are exec'd. + */ +int global_i = 0; + +main (argc, argv) + int argc; + char * argv[]; +{ + /* There is a local_j in follow_exec, which exec's us. We + should not be able to see that other definition of local_j + after we are exec'd. + */ + int local_j = argc; + char * s; + + printf ("Hello from execd_program...\n"); + if (argc != 2) + { + printf ("expected one string argument\n"); + exit (-1); + } + s = argv[1]; + printf ("argument received: %s\n", s); +} |