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

Side by Side Diff: tests/gdb/gdb_test_guest.c

Issue 639113003: Add nacl-clang testing to SCons (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: ncbray comment Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/fixedfeaturecpu/nacl.scons ('k') | tests/signal_handler_single_step/nacl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include <alloca.h> 7 #include <alloca.h>
8 #include <assert.h> 8 #include <assert.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 int local_var = 2 * arg; 99 int local_var = 2 * arg;
100 global_var += local_var + arg; 100 global_var += local_var + arg;
101 } 101 }
102 102
103 void mmap_breakpoint(void) { 103 void mmap_breakpoint(void) {
104 global_var = 0; 104 global_var = 0;
105 } 105 }
106 106
107 void ret_sequence(void) { 107 void ret_sequence(void) {
108 #if defined(__i386__) 108 #if defined(__i386__)
109 asm( 109 __asm__(
110 ".globl ret_start\n" 110 ".globl ret_start\n"
111 ".globl ret_end\n" 111 ".globl ret_end\n"
112 ".align 32\n" 112 ".align 32\n"
113 "ret_start:\n" 113 "ret_start:\n"
114 "naclret\n" 114 "naclret\n"
115 "ret_end:\n"); 115 "ret_end:\n");
116 #elif defined(__x86_64__) 116 #elif defined(__x86_64__)
117 asm( 117 __asm__(
118 ".globl ret_start\n" 118 ".globl ret_start\n"
119 ".globl ret_end\n" 119 ".globl ret_end\n"
120 ".align 32\n" 120 ".align 32\n"
121 "ret_start:\n" 121 "ret_start:\n"
122 "naclret\n" 122 "naclret\n"
123 "ret_end:\n"); 123 "ret_end:\n");
124 #endif 124 #endif
125 } 125 }
126 126
127 typedef void (*func_t)(void); 127 typedef void (*func_t)(void);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 if (strcmp(test_command, "invalid_memory") == 0) { 293 if (strcmp(test_command, "invalid_memory") == 0) {
294 return 0; 294 return 0;
295 } 295 }
296 if (strcmp(test_command, "mmap") == 0) { 296 if (strcmp(test_command, "mmap") == 0) {
297 test_mmap(); 297 test_mmap();
298 return 0; 298 return 0;
299 } 299 }
300 return 1; 300 return 1;
301 } 301 }
OLDNEW
« no previous file with comments | « tests/fixedfeaturecpu/nacl.scons ('k') | tests/signal_handler_single_step/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698