1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5import {
6    CppProcessor, ArgumentsProcessor, LinuxCppEntriesProvider,
7    WindowsCppEntriesProvider, MacOSCppEntriesProvider
8  } from  "./dumpcpp.mjs";
9
10// Dump C++ symbols of shared library if possible
11
12const entriesProviders = {
13  'linux': LinuxCppEntriesProvider,
14  'windows': WindowsCppEntriesProvider,
15  'macos': MacOSCppEntriesProvider
16};
17
18const params = ArgumentsProcessor.process(arguments);
19const cppProcessor = new CppProcessor(
20  new (entriesProviders[params.platform])(params.nm, params.targetRootFS,
21                                          params.apkEmbeddedLibrary),
22  params.timedRange, params.pairwiseTimedRange);
23await cppProcessor.processLogFile(params.logFileName);
24cppProcessor.dumpCppSymbols();
25