xref: /aosp_15_r20/external/cronet/components/nacl/common/nacl_switches.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2013 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "components/nacl/common/nacl_switches.h"
6 
7 namespace switches {
8 
9 // Disables crash throttling for Portable Native Client.
10 const char kDisablePnaclCrashThrottling[]   = "disable-pnacl-crash-throttling";
11 
12 // Enables debugging via RSP over a socket.
13 const char kEnableNaClDebug[]               = "enable-nacl-debug";
14 
15 // Force use of the Subzero as the PNaCl translator instead of LLC.
16 const char kForcePNaClSubzero[] = "force-pnacl-subzero";
17 
18 // Uses NaCl manifest URL to choose whether NaCl program will be debugged by
19 // debug stub.
20 // Switch value format: [!]pattern1,pattern2,...,patternN. Each pattern uses
21 // the same syntax as patterns in Chrome extension manifest. The only difference
22 // is that * scheme matches all schemes instead of matching only http and https.
23 // If the value doesn't start with !, a program will be debugged if manifest URL
24 // matches any pattern. If the value starts with !, a program will be debugged
25 // if manifest URL does not match any pattern.
26 const char kNaClDebugMask[]                 = "nacl-debug-mask";
27 
28 // GDB script to pass to the nacl-gdb debugger at startup.
29 const char kNaClGdbScript[]                 = "nacl-gdb-script";
30 
31 // Native Client GDB debugger that will be launched automatically when needed.
32 const char kNaClGdb[]                       = "nacl-gdb";
33 
34 // Value for --type that causes the process to run as a NativeClient loader
35 // for SFI mode.
36 const char kNaClLoaderProcess[]             = "nacl-loader";
37 
38 // Sets NACLVERBOSITY to enable verbose logging.
39 // This should match the string used in chrome/browser/about_flags.cc
40 const char kVerboseLoggingInNacl[] = "verbose-logging-in-nacl";
41 
42 const char kVerboseLoggingInNaclChoiceLow[] = "1";
43 const char kVerboseLoggingInNaclChoiceMedium[] = "2";
44 const char kVerboseLoggingInNaclChoiceHigh[] = "4";
45 const char kVerboseLoggingInNaclChoiceHighest[] = "7";
46 const char kVerboseLoggingInNaclChoiceDisabled[] = "0";
47 }  // namespace switches
48