Ignore:
Timestamp:
Sep 11, 2017, 2:24:48 PM (8 years ago)
Author:
[email protected]
Message:

Make jsc dump the command line if JSC_dumpOption environment variable is set with a non-zero value.
https://bugs.webkit.org/show_bug.cgi?id=176722

Reviewed by Saam Barati.

For PLATFORM(COCOA), I also dumped the JSC_* environmental variables that are
in effect when jsc is invoked.

  • jsc.cpp:

(CommandLine::parseArguments):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r221849 r221878  
    104104#endif
    105105
     106#if PLATFORM(COCOA)
     107#include <crt_externs.h>
     108#endif
     109
    106110#if HAVE(READLINE)
    107111// readline/history.h has a Function typedef which conflicts with the WTF::Function template from WTF/Forward.h
     
    35963600    Options::initialize();
    35973601   
     3602    if (Options::dumpOptions()) {
     3603        printf("Command line:");
     3604#if PLATFORM(COCOA)
     3605        for (char** envp = *_NSGetEnviron(); *envp; envp++) {
     3606            const char* env = *envp;
     3607            if (!strncmp("JSC_", env, 4))
     3608                printf(" %s", env);
     3609        }
     3610#endif // PLATFORM(COCOA)
     3611        for (int i = 0; i < argc; ++i)
     3612            printf(" %s", argv[i]);
     3613        printf("\n");
     3614    }
     3615
    35983616    int i = 1;
    35993617    JSC::Options::DumpLevel dumpOptionsLevel = JSC::Options::DumpLevel::None;
Note: See TracChangeset for help on using the changeset viewer.