Chromium Code Reviews| Index: tests/gdb/gdb_test_guest.c |
| =================================================================== |
| --- tests/gdb/gdb_test_guest.c (revision 9590) |
| +++ tests/gdb/gdb_test_guest.c (working copy) |
| @@ -54,6 +54,11 @@ |
| global_ptr = alloca(arg); |
| } |
| +int test_call(int arg) { |
| + global_var += arg; |
|
Mark Seaborn
2012/08/30 16:55:57
This doesn't really need global_var to be involved
|
| + return global_var; |
| +} |
| + |
| int main(int argc, char **argv) { |
| assert(argc >= 2); |
| @@ -77,5 +82,10 @@ |
| test_step_from_function_start(2); |
| return 0; |
| } |
| + if (strcmp(argv[1], "call") == 0) { |
|
Mark Seaborn
2012/08/30 16:55:57
If you set a breakpoint on main(), you don't need
halyavin
2012/08/31 08:01:24
I left function call to prevent gcc to optimize it
|
| + global_var = 0; |
| + test_call(1); |
| + return 0; |
| + } |
| return 1; |
| } |