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

Side by Side Diff: tests/thread_capture/nacl_thread_capture_test_injection_test.c

Issue 1536713003: [MIPS] Make $t8 point to the address of TLS pointers (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Move EditMipsCode() below EditArmCode(). Created 4 years, 11 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
« no previous file with comments | « tests/thread_capture/arch/mips/thread_capture_test_injection.c ('k') | no next file » | 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 <signal.h> 7 #include <signal.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <string.h> 9 #include <string.h>
10 #include <sys/ucontext.h> 10 #include <sys/ucontext.h>
11 11
12 #include "native_client/src/include/build_config.h" 12 #include "native_client/src/include/build_config.h"
13 #include "native_client/src/include/nacl_macros.h" 13 #include "native_client/src/include/nacl_macros.h"
14 #include "native_client/src/shared/platform/nacl_check.h" 14 #include "native_client/src/shared/platform/nacl_check.h"
15 #include "native_client/src/trusted/service_runtime/nacl_config.h" 15 #include "native_client/src/trusted/service_runtime/nacl_config.h"
16 #include "native_client/src/trusted/service_runtime/sel_main.h" 16 #include "native_client/src/trusted/service_runtime/sel_main.h"
17 #include "native_client/src/trusted/fault_injection/test_injection.h" 17 #include "native_client/src/trusted/fault_injection/test_injection.h"
18 #include "native_client/tests/thread_capture/thread_capture_test_injection.h" 18 #include "native_client/tests/thread_capture/thread_capture_test_injection.h"
19 19
20 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm 20 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm
21 static const int kExpectedSignal = SIGILL; 21 static const int kExpectedSignal = SIGILL;
22 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips
23 static const int kExpectedSignal = SIGTRAP;
22 #else 24 #else
23 static const int kExpectedSignal = SIGSEGV; 25 static const int kExpectedSignal = SIGSEGV;
24 #endif 26 #endif
25 27
26 uintptr_t g_nacl_syscall_thread_capture_fault_addr; 28 uintptr_t g_nacl_syscall_thread_capture_fault_addr;
27 29
28 void NaClSignalHandler(int signum, siginfo_t *info, void *other) { 30 void NaClSignalHandler(int signum, siginfo_t *info, void *other) {
29 uintptr_t faulting_pc; 31 uintptr_t faulting_pc;
30 ucontext_t *ucp; 32 ucontext_t *ucp;
31 33
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 static struct NaClTestInjectionTable const g_test_injection_functions = { 101 static struct NaClTestInjectionTable const g_test_injection_functions = {
100 NaClInjectThreadCaptureSyscall, /* ChangeTrampolines */ 102 NaClInjectThreadCaptureSyscall, /* ChangeTrampolines */
101 NaClSetSignalHandler, /* BeforeMainThreadLaunches */ 103 NaClSetSignalHandler, /* BeforeMainThreadLaunches */
102 }; 104 };
103 105
104 int main(int argc, char **argv) { 106 int main(int argc, char **argv) {
105 NaClTestInjectionSetInjectionTable(&g_test_injection_functions); 107 NaClTestInjectionSetInjectionTable(&g_test_injection_functions);
106 (void) NaClSelLdrMain(argc, argv); 108 (void) NaClSelLdrMain(argc, argv);
107 return 1; /* fail! */ 109 return 1; /* fail! */
108 } 110 }
OLDNEW
« no previous file with comments | « tests/thread_capture/arch/mips/thread_capture_test_injection.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698