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

Side by Side Diff: gdb/testsuite/gdb.base/nodebug.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 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/nextoverexit.exp ('k') | gdb/testsuite/gdb.base/nodebug.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 <stdlib.h> 1 #include <stdlib.h>
2 /* Test that things still (sort of) work when compiled without -g. */ 2 /* Test that things still (sort of) work when compiled without -g. */
3 3
4 int dataglobal = 3; /* Should go in global data */ 4 int dataglobal = 3; /* Should go in global data */
5 static int datalocal = 4; /* Should go in local data */ 5 static int datalocal = 4; /* Should go in local data */
6 int bssglobal; /* Should go in global bss */ 6 int bssglobal; /* Should go in global bss */
7 static int bsslocal; /* Should go in local bss */ 7 static int bsslocal; /* Should go in local bss */
8 8
9 #ifdef PROTOTYPES 9 #ifdef PROTOTYPES
10 int 10 int
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #ifdef PROTOTYPES 45 #ifdef PROTOTYPES
46 int 46 int
47 main (int argc, char **argv) 47 main (int argc, char **argv)
48 #else 48 #else
49 int 49 int
50 main (argc, argv) 50 main (argc, argv)
51 int argc; 51 int argc;
52 char **argv; 52 char **argv;
53 #endif 53 #endif
54 { 54 {
55 #ifdef usestubs
56 set_debug_traps();
57 breakpoint();
58 #endif
59 return top (argc); 55 return top (argc);
60 } 56 }
61 57
62 int *x; 58 int *x;
63 59
64 #ifdef PROTOTYPES 60 #ifdef PROTOTYPES
65 int array_index (char *arr, int i) 61 int array_index (char *arr, int i)
66 #else 62 #else
67 int 63 int
68 array_index (arr, i) 64 array_index (arr, i)
69 char *arr; 65 char *arr;
70 int i; 66 int i;
71 #endif 67 #endif
72 { 68 {
73 /* The basic concept is just "return arr[i];". But call malloc so that gdb 69 /* The basic concept is just "return arr[i];". But call malloc so that gdb
74 will be able to call functions. */ 70 will be able to call functions. */
75 char retval; 71 char retval;
76 x = (int *) malloc (sizeof (int)); 72 x = (int *) malloc (sizeof (int));
77 *x = i; 73 *x = i;
78 retval = arr[*x]; 74 retval = arr[*x];
79 free (x); 75 free (x);
80 return retval; 76 return retval;
81 } 77 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/nextoverexit.exp ('k') | gdb/testsuite/gdb.base/nodebug.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698