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

Unified Diff: tests/gdb/gdb_test_guest.c

Issue 10826183: GDB: Test that we can step inside function. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/gdb/nacl.scons » ('j') | tests/gdb/nacl.scons » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | tests/gdb/nacl.scons » ('j') | tests/gdb/nacl.scons » ('J')

Powered by Google App Engine
This is Rietveld 408576698