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

Unified Diff: tests/gdb/gdb_test_guest.c

Issue 10896004: Don't modify memory access right when changing data in debug stub. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: rebase Created 8 years, 3 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 | « tests/gdb/call_from_gdb.py ('k') | tests/gdb/nacl.scons » ('j') | no next file with comments »
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 9621)
+++ 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 get optimized away. */
+ return test_call_from_gdb(0);
+ }
return 1;
}
« no previous file with comments | « tests/gdb/call_from_gdb.py ('k') | tests/gdb/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698