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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [testsuite/] [gdb.base/] [foll-exec.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
#include <stdio.h>
2
#include <stdlib.h>
3
#include <unistd.h>
4
#include <string.h>
5
 
6
 
7
int  global_i = 100;
8
 
9
#ifdef PROTOTYPES
10
int main (void)
11
#else
12
main ()
13
#endif
14
{
15
  int  local_j = global_i+1;
16
  int  local_k = local_j+1;
17
 
18
  printf ("foll-exec is about to execlp(execd-prog)...\n");
19
 
20
  execlp ("gdb.base/execd-prog",
21
          "gdb.base/execd-prog",
22
          "execlp arg1 from foll-exec",
23
          (char *)0);
24
 
25
  printf ("foll-exec is about to execl(execd-prog)...\n");
26
 
27
  execl ("gdb.base/execd-prog",
28
         "gdb.base/execd-prog",
29
         "execl arg1 from foll-exec",
30
         "execl arg2 from foll-exec",
31
         (char *)0);
32
 
33
  {
34
    static char * argv[] = {
35
      (char *)"gdb.base/execd-prog",
36
      (char *)"execv arg1 from foll-exec",
37
      (char *)0};
38
 
39
    printf ("foll-exec is about to execv(execd-prog)...\n");
40
 
41
    execv ("gdb.base/execd-prog", argv);
42
  }
43
}

powered by: WebSVN 2.1.0

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