OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.base/] [execd-prog.c] - Blame information for rev 227

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
#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
   */
9
int  global_i = 0;
10
 
11
#ifdef PROTOTYPES
12
int main (int argc, char **argv)
13
#else
14
main (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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.