Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: gdb/testsuite/gdb.base/foll-exec.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/float.exp ('k') | gdb/testsuite/gdb.base/foll-exec.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <stdio.h> 1 #include <stdio.h>
2 #include <stdlib.h> 2 #include <stdlib.h>
3 #include <unistd.h> 3 #include <unistd.h>
4 #include <string.h> 4 #include <string.h>
5 5
6 6
7 int global_i = 100; 7 int global_i = 100;
8 8
9 #ifdef PROTOTYPES 9 #ifdef PROTOTYPES
10 int main (void) 10 int main (void)
11 #else 11 #else
12 main () 12 main ()
13 #endif 13 #endif
14 { 14 {
15 int local_j = global_i+1; 15 int local_j = global_i+1;
16 int local_k = local_j+1; 16 int local_k = local_j+1;
17 17
18 printf ("foll-exec is about to execlp(execd-prog)...\n"); 18 printf ("foll-exec is about to execlp(execd-prog)...\n");
19 19
20 execlp ("gdb.base/execd-prog", 20 execlp (BASEDIR "/execd-prog",
21 "gdb.base/execd-prog", 21 BASEDIR "/execd-prog",
22 "execlp arg1 from foll-exec", 22 "execlp arg1 from foll-exec",
23 (char *)0); 23 (char *)0);
24 24
25 printf ("foll-exec is about to execl(execd-prog)...\n"); 25 printf ("foll-exec is about to execl(execd-prog)...\n");
26 26
27 execl ("gdb.base/execd-prog", 27 execl (BASEDIR "/execd-prog",
28 "gdb.base/execd-prog", 28 BASEDIR "/execd-prog",
29 "execl arg1 from foll-exec", 29 "execl arg1 from foll-exec",
30 "execl arg2 from foll-exec", 30 "execl arg2 from foll-exec",
31 (char *)0); 31 (char *)0);
32 32
33 { 33 {
34 static char * argv[] = { 34 static char * argv[] = {
35 (char *)"gdb.base/execd-prog", 35 (char *)BASEDIR "/execd-prog",
36 (char *)"execv arg1 from foll-exec", 36 (char *)"execv arg1 from foll-exec",
37 (char *)0}; 37 (char *)0};
38 38
39 printf ("foll-exec is about to execv(execd-prog)...\n"); 39 printf ("foll-exec is about to execv(execd-prog)...\n");
40 40
41 execv ("gdb.base/execd-prog", argv); 41 execv (BASEDIR "/execd-prog", argv);
42 } 42 }
43 } 43 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/float.exp ('k') | gdb/testsuite/gdb.base/foll-exec.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698