1fc7117aeSGreg Clayton //===-- DynamicLoaderStatic.h -----------------------------------*- C++ -*-===//
2fc7117aeSGreg Clayton //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6fc7117aeSGreg Clayton //
7fc7117aeSGreg Clayton //===----------------------------------------------------------------------===//
8fc7117aeSGreg Clayton 
9cdc514e4SJonas Devlieghere #ifndef LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H
10cdc514e4SJonas Devlieghere #define LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H
11fc7117aeSGreg Clayton 
12b9c1b51eSKate Stone #include "lldb/Target/DynamicLoader.h"
13fc7117aeSGreg Clayton #include "lldb/Target/Process.h"
145713a05bSZachary Turner #include "lldb/Utility/FileSpec.h"
155713a05bSZachary Turner #include "lldb/Utility/UUID.h"
16fc7117aeSGreg Clayton 
17b9c1b51eSKate Stone class DynamicLoaderStatic : public lldb_private::DynamicLoader {
18fc7117aeSGreg Clayton public:
194c3f2b94SEugene Zelenko   DynamicLoaderStatic(lldb_private::Process *process);
204c3f2b94SEugene Zelenko 
21fc7117aeSGreg Clayton   // Static Functions
22b9c1b51eSKate Stone   static void Initialize();
23fc7117aeSGreg Clayton 
24b9c1b51eSKate Stone   static void Terminate();
25fc7117aeSGreg Clayton 
GetPluginNameStatic()26*6fa1b4ffSPavel Labath   static llvm::StringRef GetPluginNameStatic() { return "static"; }
27fc7117aeSGreg Clayton 
28*6fa1b4ffSPavel Labath   static llvm::StringRef GetPluginDescriptionStatic();
29fc7117aeSGreg Clayton 
30fc7117aeSGreg Clayton   static lldb_private::DynamicLoader *
31fc7117aeSGreg Clayton   CreateInstance(lldb_private::Process *process, bool force);
32fc7117aeSGreg Clayton 
33fc7117aeSGreg Clayton   /// Called after attaching a process.
34fc7117aeSGreg Clayton   ///
35fc7117aeSGreg Clayton   /// Allow DynamicLoader plug-ins to execute some code after
36fc7117aeSGreg Clayton   /// attaching to a process.
37b9c1b51eSKate Stone   void DidAttach() override;
38fc7117aeSGreg Clayton 
39b9c1b51eSKate Stone   void DidLaunch() override;
40fc7117aeSGreg Clayton 
41b9c1b51eSKate Stone   lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
424c3f2b94SEugene Zelenko                                                   bool stop_others) override;
43fc7117aeSGreg Clayton 
4497206d57SZachary Turner   lldb_private::Status CanLoadImage() override;
45fc7117aeSGreg Clayton 
46fc7117aeSGreg Clayton   // PluginInterface protocol
GetPluginName()47*6fa1b4ffSPavel Labath   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
48fc7117aeSGreg Clayton 
49fc7117aeSGreg Clayton private:
50b9c1b51eSKate Stone   void LoadAllImagesAtFileAddresses();
51fc7117aeSGreg Clayton };
52fc7117aeSGreg Clayton 
53cdc514e4SJonas Devlieghere #endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H
54