* NEWS: Update description of string changes. Mention print/s.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / execd-prog.c
CommitLineData
74cf1395
JM
1#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4
5/* There is a global_i in foll-exec, which exec's us. We
6 should not be able to see that other definition of global_i
7 after we are exec'd.
8 */
9int global_i = 0;
10
11#ifdef PROTOTYPES
12int main (int argc, char **argv)
13#else
14main (argc, argv)
15 int argc;
16 char * argv[];
17#endif
18{
19 /* There is a local_j in foll-exec, which exec's us. We
20 should not be able to see that other definition of local_j
21 after we are exec'd.
22 */
23 int local_j = argc;
24 char * s;
25
26 printf ("Hello from execd-prog...\n");
27 if (argc != 2)
28 {
29 printf ("expected one string argument\n");
30 exit (-1);
31 }
32 s = argv[1];
33 printf ("argument received: %s\n", s);
34}
This page took 0.719821 seconds and 4 git commands to generate.