2013-08-23 13:46:38 -04:00
|
|
|
//===-- DynamicLoaderStatic.h -----------------------------------*- C++ -*-===//
|
|
|
|
|
//
|
2019-08-20 16:51:52 -04:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2013-08-23 13:46:38 -04:00
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
#ifndef LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H
|
|
|
|
|
#define LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
#include "lldb/Target/DynamicLoader.h"
|
2013-08-23 13:46:38 -04:00
|
|
|
#include "lldb/Target/Process.h"
|
2017-04-16 12:04:10 -04:00
|
|
|
#include "lldb/Utility/FileSpec.h"
|
|
|
|
|
#include "lldb/Utility/UUID.h"
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
class DynamicLoaderStatic : public lldb_private::DynamicLoader {
|
2013-08-23 13:46:38 -04:00
|
|
|
public:
|
2017-01-02 14:26:05 -05:00
|
|
|
DynamicLoaderStatic(lldb_private::Process *process);
|
2015-12-30 06:55:28 -05:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
~DynamicLoaderStatic() override;
|
2015-12-30 06:55:28 -05:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
// Static Functions
|
|
|
|
|
static void Initialize();
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
static void Terminate();
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
static lldb_private::ConstString GetPluginNameStatic();
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
static const char *GetPluginDescriptionStatic();
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
static lldb_private::DynamicLoader *
|
|
|
|
|
CreateInstance(lldb_private::Process *process, bool force);
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
/// Called after attaching a process.
|
|
|
|
|
///
|
|
|
|
|
/// Allow DynamicLoader plug-ins to execute some code after
|
|
|
|
|
/// attaching to a process.
|
|
|
|
|
void DidAttach() override;
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
void DidLaunch() override;
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
|
|
|
|
bool stop_others) override;
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-05-16 15:47:58 -04:00
|
|
|
lldb_private::Status CanLoadImage() override;
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
// PluginInterface protocol
|
|
|
|
|
lldb_private::ConstString GetPluginName() override;
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
uint32_t GetPluginVersion() override;
|
2013-08-23 13:46:38 -04:00
|
|
|
|
|
|
|
|
private:
|
2017-01-02 14:26:05 -05:00
|
|
|
void LoadAllImagesAtFileAddresses();
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
DynamicLoaderStatic(const DynamicLoaderStatic &) = delete;
|
|
|
|
|
const DynamicLoaderStatic &operator=(const DynamicLoaderStatic &) = delete;
|
2013-08-23 13:46:38 -04:00
|
|
|
};
|
|
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
#endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_STATIC_DYNAMICLOADERSTATIC_H
|