dumpcpp-driver.mjs 888 Bytes
Newer Older
1 2 3 4
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
import {
6 7
    CppProcessor, ArgumentsProcessor, LinuxCppEntriesProvider,
    WindowsCppEntriesProvider, MacOSCppEntriesProvider
8 9
  } from  "./dumpcpp.mjs";

10 11
// Dump C++ symbols of shared library if possible

12
const entriesProviders = {
13
  'linux': LinuxCppEntriesProvider,
14
  'windows': WindowsCppEntriesProvider,
15
  'macos': MacOSCppEntriesProvider
16 17
};

18
const params = ArgumentsProcessor.process(arguments);
19
const cppProcessor = new CppProcessor(
20 21
  new (entriesProviders[params.platform])(params.nm, params.targetRootFS,
                                          params.apkEmbeddedLibrary),
22
  params.timedRange, params.pairwiseTimedRange);
23
await cppProcessor.processLogFile(params.logFileName);
24
cppProcessor.dumpCppSymbols();