Index: tests/gdb/gdb_test_guest.c |
=================================================================== |
--- tests/gdb/gdb_test_guest.c (revision 9612) |
+++ tests/gdb/gdb_test_guest.c (working copy) |
@@ -54,6 +54,11 @@ |
global_ptr = alloca(arg); |
} |
+int test_call_from_gdb(int arg) { |
+ global_var = 2 * arg; |
+ return 3 * arg; |
+} |
+ |
int main(int argc, char **argv) { |
assert(argc >= 2); |
@@ -77,5 +82,9 @@ |
test_step_from_function_start(2); |
return 0; |
} |
+ if (strcmp(argv[1], "call_from_gdb") == 0) { |
+ /* Call function so that it doesn't optimized away. */ |
Mark Seaborn
2012/08/31 16:40:13
"doesn't get optimized". However, this shouldn't
halyavin
2012/09/03 10:33:50
Done.
|
+ return test_call_from_gdb(0); |
+ } |
return 1; |
} |