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

Side by Side Diff: src/trusted/service_runtime/sel_ldr.h

Issue 8825007: Native Client side changes for debugging support: stdout/err -> postmessage. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 9 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 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 /* 7 /*
8 * NaCl Simple/secure ELF loader (NaCl SEL). 8 * NaCl Simple/secure ELF loader (NaCl SEL).
9 * 9 *
10 * This loader can only process NaCl object files as produced using 10 * This loader can only process NaCl object files as produced using
(...skipping 24 matching lines...) Expand all
35 #include "native_client/src/shared/platform/nacl_host_desc.h" 35 #include "native_client/src/shared/platform/nacl_host_desc.h"
36 #include "native_client/src/shared/platform/nacl_log.h" 36 #include "native_client/src/shared/platform/nacl_log.h"
37 #include "native_client/src/shared/platform/nacl_threads.h" 37 #include "native_client/src/shared/platform/nacl_threads.h"
38 38
39 #include "native_client/src/shared/srpc/nacl_srpc.h" 39 #include "native_client/src/shared/srpc/nacl_srpc.h"
40 40
41 #include "native_client/src/trusted/service_runtime/dyn_array.h" 41 #include "native_client/src/trusted/service_runtime/dyn_array.h"
42 #include "native_client/src/trusted/service_runtime/nacl_config_dangerous.h" 42 #include "native_client/src/trusted/service_runtime/nacl_config_dangerous.h"
43 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" 43 #include "native_client/src/trusted/service_runtime/nacl_error_code.h"
44 #include "native_client/src/trusted/service_runtime/nacl_kern_services.h" 44 #include "native_client/src/trusted/service_runtime/nacl_kern_services.h"
45 #include "native_client/src/trusted/service_runtime/nacl_resource.h"
45 46
46 #include "native_client/src/trusted/service_runtime/sel_mem.h" 47 #include "native_client/src/trusted/service_runtime/sel_mem.h"
47 #include "native_client/src/trusted/service_runtime/sel_util.h" 48 #include "native_client/src/trusted/service_runtime/sel_util.h"
48 #include "native_client/src/trusted/service_runtime/sel_rt.h" 49 #include "native_client/src/trusted/service_runtime/sel_rt.h"
49 50
50 #include "native_client/src/trusted/service_runtime/name_service/name_service.h" 51 #include "native_client/src/trusted/service_runtime/name_service/name_service.h"
51 52
52 EXTERN_C_BEGIN 53 EXTERN_C_BEGIN
53 54
54 #define NACL_SERVICE_PORT_DESCRIPTOR 3 55 #define NACL_SERVICE_PORT_DESCRIPTOR 3
(...skipping 10 matching lines...) Expand all
65 struct NaClSecureService; 66 struct NaClSecureService;
66 struct NaClSecureReverseService; 67 struct NaClSecureReverseService;
67 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */ 68 struct NaClThreadInterface; /* see sel_ldr_thread_interface.h */
68 69
69 struct NaClDebugCallbacks { 70 struct NaClDebugCallbacks {
70 void (*thread_create_hook)(struct NaClAppThread *natp); 71 void (*thread_create_hook)(struct NaClAppThread *natp);
71 void (*thread_exit_hook)(struct NaClAppThread *natp); 72 void (*thread_exit_hook)(struct NaClAppThread *natp);
72 void (*process_exit_hook)(int exit_status); 73 void (*process_exit_hook)(int exit_status);
73 }; 74 };
74 75
76 enum NaClResourcePhase {
77 NACL_RESOURCE_PHASE_START,
78 NACL_RESOURCE_PHASE_REV_CHAN
79 };
80
75 struct NaClApp { 81 struct NaClApp {
76 /* 82 /*
77 * public, user settable prior to app start. 83 * public, user settable prior to app start.
78 */ 84 */
79 uint8_t addr_bits; 85 uint8_t addr_bits;
80 uintptr_t stack_size; 86 uintptr_t stack_size;
81 /* 87 /*
82 * stack_size is the maximum size of the (main) stack. The stack 88 * stack_size is the maximum size of the (main) stack. The stack
83 * memory is eager allocated (mapped in w/o MAP_NORESERVE) so 89 * memory is eager allocated (mapped in w/o MAP_NORESERVE) so
84 * there must be enough swap space; page table entries are not 90 * there must be enough swap space; page table entries are not
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 * Name service must launch after mu, cv, vm_hole_may_exit, 207 * Name service must launch after mu, cv, vm_hole_may_exit,
202 * threads_launching are initialized. 208 * threads_launching are initialized.
203 */ 209 */
204 struct NaClNameService *name_service; /* default name server */ 210 struct NaClNameService *name_service; /* default name server */
205 struct NaClDesc *name_service_conn_cap; 211 struct NaClDesc *name_service_conn_cap;
206 212
207 struct NaClSecureService *secure_service; 213 struct NaClSecureService *secure_service;
208 struct NaClManifestProxy *manifest_proxy; 214 struct NaClManifestProxy *manifest_proxy;
209 struct NaClKernService *kern_service; 215 struct NaClKernService *kern_service;
210 216
217 struct NaClResourceNaClApp resources;
218 enum NaClResourcePhase resource_phase;
219
211 struct NaClSecureReverseClient *reverse_client; 220 struct NaClSecureReverseClient *reverse_client;
212 enum NaClReverseChannelInitializationState { 221 enum NaClReverseChannelInitializationState {
213 NACL_REVERSE_CHANNEL_UNINITIALIZED, 222 NACL_REVERSE_CHANNEL_UNINITIALIZED,
214 NACL_REVERSE_CHANNEL_INITIALIZATION_STARTED, 223 NACL_REVERSE_CHANNEL_INITIALIZATION_STARTED,
215 NACL_REVERSE_CHANNEL_INITIALIZED 224 NACL_REVERSE_CHANNEL_INITIALIZED
216 } reverse_channel_initialization_state; 225 } reverse_channel_initialization_state;
217 struct NaClSrpcChannel reverse_channel; 226 struct NaClSrpcChannel reverse_channel;
218 227
219 228
220 NaClErrorCode module_load_status; 229 NaClErrorCode module_load_status;
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 692
684 #endif 693 #endif
685 694
686 #if NACL_LINUX 695 #if NACL_LINUX
687 void handle_r_debug(const char *switch_value, char *argv0); 696 void handle_r_debug(const char *switch_value, char *argv0);
688 #endif 697 #endif
689 698
690 EXTERN_C_END 699 EXTERN_C_END
691 700
692 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */ 701 #endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_SEL_LDR_H_ */
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_common.c ('k') | src/trusted/service_runtime/sel_ldr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698