Index: tests/gdb/gdb_test_guest.c |
=================================================================== |
--- tests/gdb/gdb_test_guest.c (revision 9391) |
+++ tests/gdb/gdb_test_guest.c (working copy) |
@@ -6,6 +6,7 @@ |
#include <assert.h> |
#include <string.h> |
+#include <alloca.h> |
int global_var; |
@@ -40,6 +41,12 @@ |
return global_var; |
} |
+void function_with_prolog(int arg) { |
+ int local_var = arg - 1; |
+ global_var = local_var; |
+ alloca(1); |
Mark Seaborn
2012/08/09 00:00:02
Please add a comment to explain what calling alloc
halyavin
2012/08/09 12:29:20
Done.
|
+} |
+ |
int main(int argc, char **argv) { |
assert(argc >= 2); |
@@ -58,5 +65,10 @@ |
nested_calls(1); |
return 0; |
} |
+ if (strcmp(argv[1], "step_from_func_start") == 0) { |
Mark Seaborn
2012/08/09 00:00:02
Would it be easier to follow if the entry point na
halyavin
2012/08/09 12:29:20
Done.
|
+ global_var = 0; |
+ function_with_prolog(2); |
+ return 0; |
+ } |
return 1; |
} |