OLD | NEW |
1 /* This testcase is part of GDB, the GNU debugger. | 1 /* This testcase is part of GDB, the GNU debugger. |
2 | 2 |
3 Copyright 2008-2012 Free Software Foundation, Inc. | 3 Copyright 2008-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This program is free software; you can redistribute it and/or modify | 5 This program is free software; you can redistribute it and/or modify |
6 it under the terms of the GNU General Public License as published by | 6 it under the terms of the GNU General Public License as published by |
7 the Free Software Foundation; either version 3 of the License, or | 7 the Free Software Foundation; either version 3 of the License, or |
8 (at your option) any later version. | 8 (at your option) any later version. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, | 10 This program is distributed in the hope that it will be useful, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 int | 72 int |
73 main (int argc, char **argv, char **envp) | 73 main (int argc, char **argv, char **envp) |
74 #else | 74 #else |
75 int | 75 int |
76 main (argc, argv, envp) | 76 main (argc, argv, envp) |
77 int argc; | 77 int argc; |
78 char *argv[], **envp; | 78 char *argv[], **envp; |
79 #endif | 79 #endif |
80 { | 80 { |
81 #ifdef usestubs | |
82 set_debug_traps(); /* set breakpoint 5 here */ | |
83 breakpoint(); | |
84 #endif | |
85 if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* se
t breakpoint 6 here */ | 81 if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* se
t breakpoint 6 here */ |
86 fprintf (stderr, "usage: factorial <number>\n"); | 82 fprintf (stderr, "usage: factorial <number>\n"); |
87 return 1; | 83 return 1; |
88 } | 84 } |
89 printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */ | 85 printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */ |
90 /* set breakpoint 12 here */ | 86 /* set breakpoint 12 here */ |
91 marker1 (); /* set breakpoint 11 here */ | 87 marker1 (); /* set breakpoint 11 here */ |
92 marker2 (43); /* set breakpoint 20 here */ | 88 marker2 (43); /* set breakpoint 20 here */ |
93 marker3 ("stack", "trace"); /* set breakpoint 21 here */ | 89 marker3 ("stack", "trace"); /* set breakpoint 21 here */ |
94 marker4 (177601976L); | 90 marker4 (177601976L); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 #endif | 132 #endif |
137 { | 133 { |
138 while (a /* set breakpoint 4 here */ | 134 while (a /* set breakpoint 4 here */ |
139 && b | 135 && b |
140 && c) | 136 && c) |
141 { | 137 { |
142 a--, b--, c--; | 138 a--, b--, c--; |
143 } | 139 } |
144 return 0; | 140 return 0; |
145 } | 141 } |
OLD | NEW |