Fix crash when exiting TUI with gdb -tui
[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
74cf1395 11int main (int argc, char **argv)
74cf1395
JM
12{
13 /* There is a local_j in foll-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 */
58fa2af0 17 int local_j = argc; /* after-exec */
74cf1395
JM
18 char * s;
19
20 printf ("Hello from execd-prog...\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}
This page took 2.182065 seconds and 4 git commands to generate.