]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.hp/execd-program.c
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.hp / execd-program.c
1 #include <stdio.h>
2
3 /* There is a global_i in follow_exec, which exec's us. We
4 should not be able to see that other definition of global_i
5 after we are exec'd.
6 */
7 int global_i = 0;
8
9 main (argc, argv)
10 int argc;
11 char * argv[];
12 {
13 /* There is a local_j in follow_exec, which exec's us. We
14 should not be able to see that other definition of local_j
15 after we are exec'd.
16 */
17 int local_j = argc;
18 char * s;
19
20 printf ("Hello from execd_program...\n");
21 if (argc != 2)
22 {
23 printf ("expected one string argument\n");
24 exit (-1);
25 }
26 s = argv[1];
27 printf ("argument received: %s\n", s);
28 }