11cb0ef41Sopenharmony_ci// Copyright 2016 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be
31cb0ef41Sopenharmony_ci// found in the LICENSE file.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciimport {
61cb0ef41Sopenharmony_ci    CppProcessor, ArgumentsProcessor, LinuxCppEntriesProvider,
71cb0ef41Sopenharmony_ci    WindowsCppEntriesProvider, MacOSCppEntriesProvider
81cb0ef41Sopenharmony_ci  } from  "./dumpcpp.mjs";
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci// Dump C++ symbols of shared library if possible
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ciconst entriesProviders = {
131cb0ef41Sopenharmony_ci  'linux': LinuxCppEntriesProvider,
141cb0ef41Sopenharmony_ci  'windows': WindowsCppEntriesProvider,
151cb0ef41Sopenharmony_ci  'macos': MacOSCppEntriesProvider
161cb0ef41Sopenharmony_ci};
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ciconst params = ArgumentsProcessor.process(arguments);
191cb0ef41Sopenharmony_ciconst cppProcessor = new CppProcessor(
201cb0ef41Sopenharmony_ci  new (entriesProviders[params.platform])(params.nm, params.targetRootFS,
211cb0ef41Sopenharmony_ci                                          params.apkEmbeddedLibrary),
221cb0ef41Sopenharmony_ci  params.timedRange, params.pairwiseTimedRange);
231cb0ef41Sopenharmony_ciawait cppProcessor.processLogFile(params.logFileName);
241cb0ef41Sopenharmony_cicppProcessor.dumpCppSymbols();
25