OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Native Client Authors. All rights reserved. | 2 * Copyright 2008 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 /* | 9 /* |
10 * NaCl Simple/secure ELF loader (NaCl SEL). | 10 * NaCl Simple/secure ELF loader (NaCl SEL). |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 int rval; | 855 int rval; |
856 NaClErrorCode suberr = LOAD_INTERNAL; | 856 NaClErrorCode suberr = LOAD_INTERNAL; |
857 size_t rounded_size; | 857 size_t rounded_size; |
858 | 858 |
859 UNREFERENCED_PARAMETER(out_args); | 859 UNREFERENCED_PARAMETER(out_args); |
860 | 860 |
861 NaClLog(4, "NaClLoadModuleRpc: entered\n"); | 861 NaClLog(4, "NaClLoadModuleRpc: entered\n"); |
862 | 862 |
863 rpc->result = NACL_SRPC_RESULT_INTERNAL; | 863 rpc->result = NACL_SRPC_RESULT_INTERNAL; |
864 | 864 |
865 aux = strdup(in_args[1]->u.sval.str); | 865 aux = strdup(in_args[1]->arrays.str); |
866 if (NULL == aux) { | 866 if (NULL == aux) { |
867 rpc->result = NACL_SRPC_RESULT_NO_MEMORY; | 867 rpc->result = NACL_SRPC_RESULT_NO_MEMORY; |
868 goto cleanup; | 868 goto cleanup; |
869 } | 869 } |
870 NaClLog(4, "Received aux_info: %s\n", aux); | 870 NaClLog(4, "Received aux_info: %s\n", aux); |
871 | 871 |
872 switch (NACL_VTBL(NaClDesc, nexe_binary)->typeTag) { | 872 switch (NACL_VTBL(NaClDesc, nexe_binary)->typeTag) { |
873 case NACL_DESC_SHM: | 873 case NACL_DESC_SHM: |
874 /* | 874 /* |
875 * We don't know the actual size of the nexe, but it should not | 875 * We don't know the actual size of the nexe, but it should not |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 NaClLog(4, "NaClSecureChannelStartModuleRpc finished\n"); | 1056 NaClLog(4, "NaClSecureChannelStartModuleRpc finished\n"); |
1057 rpc->result = NACL_SRPC_RESULT_OK; | 1057 rpc->result = NACL_SRPC_RESULT_OK; |
1058 done->Run(done); | 1058 done->Run(done); |
1059 } | 1059 } |
1060 | 1060 |
1061 static void NaClSecureChannelLog(struct NaClSrpcRpc *rpc, | 1061 static void NaClSecureChannelLog(struct NaClSrpcRpc *rpc, |
1062 struct NaClSrpcArg **in_args, | 1062 struct NaClSrpcArg **in_args, |
1063 struct NaClSrpcArg **out_args, | 1063 struct NaClSrpcArg **out_args, |
1064 struct NaClSrpcClosure *done) { | 1064 struct NaClSrpcClosure *done) { |
1065 int severity = in_args[0]->u.ival; | 1065 int severity = in_args[0]->u.ival; |
1066 char *msg = in_args[1]->u.sval.str; | 1066 char *msg = in_args[1]->arrays.str; |
1067 | 1067 |
1068 UNREFERENCED_PARAMETER(out_args); | 1068 UNREFERENCED_PARAMETER(out_args); |
1069 | 1069 |
1070 NaClLog(5, "NaClSecureChannelLog started\n"); | 1070 NaClLog(5, "NaClSecureChannelLog started\n"); |
1071 NaClLog(severity, "%s\n", msg); | 1071 NaClLog(severity, "%s\n", msg); |
1072 NaClLog(5, "NaClSecureChannelLog finished\n"); | 1072 NaClLog(5, "NaClSecureChannelLog finished\n"); |
1073 rpc->result = NACL_SRPC_RESULT_OK; | 1073 rpc->result = NACL_SRPC_RESULT_OK; |
1074 done->Run(done); | 1074 done->Run(done); |
1075 } | 1075 } |
1076 | 1076 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 nacl_global_xlate_base = mem_start; | 1161 nacl_global_xlate_base = mem_start; |
1162 | 1162 |
1163 #ifdef __GNUC__ | 1163 #ifdef __GNUC__ |
1164 _ovly_debug_event (); | 1164 _ovly_debug_event (); |
1165 #endif | 1165 #endif |
1166 } | 1166 } |
1167 | 1167 |
1168 void NaClGdbHook(struct NaClApp const *nap) { | 1168 void NaClGdbHook(struct NaClApp const *nap) { |
1169 StopForDebuggerInit(nap->mem_start); | 1169 StopForDebuggerInit(nap->mem_start); |
1170 } | 1170 } |
OLD | NEW |