forked from OSchip/llvm-project
Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13916 llvm-svn: 250872
This commit is contained in:
parent
9a6940cef4
commit
4c3f2b9446
|
@ -7,8 +7,9 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "DisassemblerLLVMC.h"
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
|
// Project includes
|
||||||
#include "llvm-c/Disassembler.h"
|
#include "llvm-c/Disassembler.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
#include "llvm/MC/MCContext.h"
|
#include "llvm/MC/MCContext.h"
|
||||||
|
@ -25,6 +26,8 @@
|
||||||
#include "llvm/Support/TargetSelect.h"
|
#include "llvm/Support/TargetSelect.h"
|
||||||
#include "llvm/ADT/SmallString.h"
|
#include "llvm/ADT/SmallString.h"
|
||||||
|
|
||||||
|
// Other libraries and framework includes
|
||||||
|
#include "DisassemblerLLVMC.h"
|
||||||
|
|
||||||
#include "lldb/Core/Address.h"
|
#include "lldb/Core/Address.h"
|
||||||
#include "lldb/Core/DataExtractor.h"
|
#include "lldb/Core/DataExtractor.h"
|
||||||
|
@ -58,13 +61,10 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
~InstructionLLVMC() override = default;
|
||||||
~InstructionLLVMC ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
DoesBranch ()
|
DoesBranch() override
|
||||||
{
|
{
|
||||||
if (m_does_branch == eLazyBoolCalculate)
|
if (m_does_branch == eLazyBoolCalculate)
|
||||||
{
|
{
|
||||||
|
@ -100,8 +100,8 @@ public:
|
||||||
return m_does_branch == eLazyBoolYes;
|
return m_does_branch == eLazyBoolYes;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
HasDelaySlot ()
|
HasDelaySlot() override
|
||||||
{
|
{
|
||||||
if (m_has_delay_slot == eLazyBoolCalculate)
|
if (m_has_delay_slot == eLazyBoolCalculate)
|
||||||
{
|
{
|
||||||
|
@ -155,10 +155,10 @@ public:
|
||||||
return llvm_disasm.m_disasm_ap.get();
|
return llvm_disasm.m_disasm_ap.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t
|
size_t
|
||||||
Decode (const lldb_private::Disassembler &disassembler,
|
Decode(const lldb_private::Disassembler &disassembler,
|
||||||
const lldb_private::DataExtractor &data,
|
const lldb_private::DataExtractor &data,
|
||||||
lldb::offset_t data_offset)
|
lldb::offset_t data_offset) override
|
||||||
{
|
{
|
||||||
// All we have to do is read the opcode which can be easy for some
|
// All we have to do is read the opcode which can be easy for some
|
||||||
// architectures
|
// architectures
|
||||||
|
@ -272,8 +272,8 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
CalculateMnemonicOperandsAndComment (const lldb_private::ExecutionContext *exe_ctx)
|
CalculateMnemonicOperandsAndComment(const lldb_private::ExecutionContext *exe_ctx) override
|
||||||
{
|
{
|
||||||
DataExtractor data;
|
DataExtractor data;
|
||||||
const AddressClass address_class = GetAddressClass ();
|
const AddressClass address_class = GetAddressClass ();
|
||||||
|
@ -452,8 +452,6 @@ protected:
|
||||||
bool m_using_file_addr;
|
bool m_using_file_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner):
|
DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner):
|
||||||
m_is_valid(true)
|
m_is_valid(true)
|
||||||
{
|
{
|
||||||
|
@ -521,10 +519,6 @@ DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, con
|
||||||
m_is_valid = false;
|
m_is_valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
DisassemblerLLVMC::LLVMCDisassembler::GetMCInst (const uint8_t *opcode_data,
|
DisassemblerLLVMC::LLVMCDisassembler::GetMCInst (const uint8_t *opcode_data,
|
||||||
size_t opcode_data_len,
|
size_t opcode_data_len,
|
||||||
|
@ -605,7 +599,6 @@ DisassemblerLLVMC::FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, c
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Disassembler *
|
Disassembler *
|
||||||
DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char *flavor)
|
DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char *flavor)
|
||||||
{
|
{
|
||||||
|
@ -782,10 +775,6 @@ DisassemblerLLVMC::DisassemblerLLVMC (const ArchSpec &arch, const char *flavor_s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DisassemblerLLVMC::~DisassemblerLLVMC()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
DisassemblerLLVMC::DecodeInstructions (const Address &base_addr,
|
DisassemblerLLVMC::DecodeInstructions (const Address &base_addr,
|
||||||
const DataExtractor& data,
|
const DataExtractor& data,
|
||||||
|
|
|
@ -10,10 +10,19 @@
|
||||||
#ifndef liblldb_DisassemblerLLVMC_h_
|
#ifndef liblldb_DisassemblerLLVMC_h_
|
||||||
#define liblldb_DisassemblerLLVMC_h_
|
#define liblldb_DisassemblerLLVMC_h_
|
||||||
|
|
||||||
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
// Other libraries and framework includes
|
||||||
#include "llvm-c/Disassembler.h"
|
#include "llvm-c/Disassembler.h"
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "lldb/Core/Address.h"
|
||||||
|
#include "lldb/Core/Disassembler.h"
|
||||||
|
#include "lldb/Core/PluginManager.h"
|
||||||
|
#include "lldb/Host/Mutex.h"
|
||||||
|
|
||||||
// Opaque references to C++ Objects in LLVM's MC.
|
// Opaque references to C++ Objects in LLVM's MC.
|
||||||
namespace llvm
|
namespace llvm
|
||||||
{
|
{
|
||||||
|
@ -25,12 +34,7 @@ namespace llvm
|
||||||
class MCInstPrinter;
|
class MCInstPrinter;
|
||||||
class MCAsmInfo;
|
class MCAsmInfo;
|
||||||
class MCSubtargetInfo;
|
class MCSubtargetInfo;
|
||||||
}
|
} // namespace llvm
|
||||||
|
|
||||||
#include "lldb/Core/Address.h"
|
|
||||||
#include "lldb/Core/Disassembler.h"
|
|
||||||
#include "lldb/Core/PluginManager.h"
|
|
||||||
#include "lldb/Host/Mutex.h"
|
|
||||||
|
|
||||||
class InstructionLLVMC;
|
class InstructionLLVMC;
|
||||||
|
|
||||||
|
@ -43,7 +47,7 @@ class DisassemblerLLVMC : public lldb_private::Disassembler
|
||||||
public:
|
public:
|
||||||
LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner);
|
LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner);
|
||||||
|
|
||||||
~LLVMCDisassembler();
|
~LLVMCDisassembler() = default;
|
||||||
|
|
||||||
uint64_t GetMCInst (const uint8_t *opcode_data, size_t opcode_data_len, lldb::addr_t pc, llvm::MCInst &mc_inst);
|
uint64_t GetMCInst (const uint8_t *opcode_data, size_t opcode_data_len, lldb::addr_t pc, llvm::MCInst &mc_inst);
|
||||||
uint64_t PrintMCInst (llvm::MCInst &mc_inst, char *output_buffer, size_t out_buffer_len);
|
uint64_t PrintMCInst (llvm::MCInst &mc_inst, char *output_buffer, size_t out_buffer_len);
|
||||||
|
@ -67,6 +71,10 @@ class DisassemblerLLVMC : public lldb_private::Disassembler
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
DisassemblerLLVMC(const lldb_private::ArchSpec &arch, const char *flavor /* = NULL */);
|
||||||
|
|
||||||
|
~DisassemblerLLVMC() override = default;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Static Functions
|
// Static Functions
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
@ -82,33 +90,28 @@ public:
|
||||||
static lldb_private::Disassembler *
|
static lldb_private::Disassembler *
|
||||||
CreateInstance(const lldb_private::ArchSpec &arch, const char *flavor);
|
CreateInstance(const lldb_private::ArchSpec &arch, const char *flavor);
|
||||||
|
|
||||||
DisassemblerLLVMC(const lldb_private::ArchSpec &arch, const char *flavor /* = NULL */);
|
size_t
|
||||||
|
DecodeInstructions(const lldb_private::Address &base_addr,
|
||||||
virtual
|
const lldb_private::DataExtractor& data,
|
||||||
~DisassemblerLLVMC();
|
lldb::offset_t data_offset,
|
||||||
|
size_t num_instructions,
|
||||||
virtual size_t
|
bool append,
|
||||||
DecodeInstructions (const lldb_private::Address &base_addr,
|
bool data_from_file) override;
|
||||||
const lldb_private::DataExtractor& data,
|
|
||||||
lldb::offset_t data_offset,
|
|
||||||
size_t num_instructions,
|
|
||||||
bool append,
|
|
||||||
bool data_from_file);
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// PluginInterface protocol
|
// PluginInterface protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName();
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion();
|
GetPluginVersion() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class InstructionLLVMC;
|
friend class InstructionLLVMC;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, const char *flavor);
|
FlavorValidForArchSpec(const lldb_private::ArchSpec &arch, const char *flavor) override;
|
||||||
|
|
||||||
bool
|
bool
|
||||||
IsValid()
|
IsValid()
|
||||||
|
@ -164,4 +167,4 @@ protected:
|
||||||
std::unique_ptr<LLVMCDisassembler> m_alternate_disasm_ap;
|
std::unique_ptr<LLVMCDisassembler> m_alternate_disasm_ap;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // liblldb_DisassemblerLLVM_h_
|
#endif // liblldb_DisassemblerLLVM_h_
|
||||||
|
|
|
@ -12,12 +12,11 @@
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// Other libraries and framework includes
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/Target/DynamicLoader.h"
|
#include "lldb/Target/DynamicLoader.h"
|
||||||
#include "lldb/Host/FileSpec.h"
|
#include "lldb/Host/FileSpec.h"
|
||||||
#include "lldb/Host/TimeValue.h"
|
#include "lldb/Host/TimeValue.h"
|
||||||
|
@ -28,6 +27,10 @@
|
||||||
class DynamicLoaderDarwinKernel : public lldb_private::DynamicLoader
|
class DynamicLoaderDarwinKernel : public lldb_private::DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
DynamicLoaderDarwinKernel(lldb_private::Process *process, lldb::addr_t kernel_addr);
|
||||||
|
|
||||||
|
~DynamicLoaderDarwinKernel() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Static Functions
|
// Static Functions
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
@ -49,38 +52,33 @@ public:
|
||||||
static void
|
static void
|
||||||
DebuggerInitialize (lldb_private::Debugger &debugger);
|
DebuggerInitialize (lldb_private::Debugger &debugger);
|
||||||
|
|
||||||
DynamicLoaderDarwinKernel (lldb_private::Process *process, lldb::addr_t kernel_addr);
|
|
||||||
|
|
||||||
virtual
|
|
||||||
~DynamicLoaderDarwinKernel ();
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Called after attaching a process.
|
/// Called after attaching a process.
|
||||||
///
|
///
|
||||||
/// Allow DynamicLoader plug-ins to execute some code after
|
/// Allow DynamicLoader plug-ins to execute some code after
|
||||||
/// attaching to a process.
|
/// attaching to a process.
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual void
|
void
|
||||||
DidAttach ();
|
DidAttach() override;
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
DidLaunch ();
|
DidLaunch() override;
|
||||||
|
|
||||||
virtual lldb::ThreadPlanSP
|
lldb::ThreadPlanSP
|
||||||
GetStepThroughTrampolinePlan (lldb_private::Thread &thread,
|
GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
||||||
bool stop_others);
|
bool stop_others) override;
|
||||||
|
|
||||||
virtual lldb_private::Error
|
lldb_private::Error
|
||||||
CanLoadImage ();
|
CanLoadImage() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// PluginInterface protocol
|
// PluginInterface protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName();
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion();
|
GetPluginVersion() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void
|
void
|
||||||
|
@ -263,7 +261,6 @@ protected:
|
||||||
lldb::addr_t m_load_address;
|
lldb::addr_t m_load_address;
|
||||||
uint64_t m_size;
|
uint64_t m_size;
|
||||||
bool m_kernel_image; // true if this is the kernel, false if this is a kext
|
bool m_kernel_image; // true if this is the kernel, false if this is a kext
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OSKextLoadedKextSummaryHeader
|
struct OSKextLoadedKextSummaryHeader
|
||||||
|
@ -371,4 +368,4 @@ private:
|
||||||
DISALLOW_COPY_AND_ASSIGN (DynamicLoaderDarwinKernel);
|
DISALLOW_COPY_AND_ASSIGN (DynamicLoaderDarwinKernel);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // liblldb_DynamicLoaderDarwinKernel_h_
|
#endif // liblldb_DynamicLoaderDarwinKernel_h_
|
||||||
|
|
|
@ -7,12 +7,13 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef liblldb_DynamicLoaderHexagon_H_
|
#ifndef liblldb_DynamicLoaderHexagonDYLD_h_
|
||||||
#define liblldb_DynamicLoaderHexagon_H_
|
#define liblldb_DynamicLoaderHexagonDYLD_h_
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
// Other libraries and framework includes
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/Breakpoint/StoppointCallbackContext.h"
|
#include "lldb/Breakpoint/StoppointCallbackContext.h"
|
||||||
#include "lldb/Target/DynamicLoader.h"
|
#include "lldb/Target/DynamicLoader.h"
|
||||||
|
|
||||||
|
@ -21,6 +22,9 @@
|
||||||
class DynamicLoaderHexagonDYLD : public lldb_private::DynamicLoader
|
class DynamicLoaderHexagonDYLD : public lldb_private::DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
DynamicLoaderHexagonDYLD(lldb_private::Process *process);
|
||||||
|
|
||||||
|
~DynamicLoaderHexagonDYLD() override;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Initialize();
|
Initialize();
|
||||||
|
@ -37,38 +41,33 @@ public:
|
||||||
static lldb_private::DynamicLoader *
|
static lldb_private::DynamicLoader *
|
||||||
CreateInstance(lldb_private::Process *process, bool force);
|
CreateInstance(lldb_private::Process *process, bool force);
|
||||||
|
|
||||||
DynamicLoaderHexagonDYLD(lldb_private::Process *process);
|
|
||||||
|
|
||||||
virtual
|
|
||||||
~DynamicLoaderHexagonDYLD();
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// DynamicLoader protocol
|
// DynamicLoader protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
DidAttach() override;
|
DidAttach() override;
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
DidLaunch() override;
|
DidLaunch() override;
|
||||||
|
|
||||||
lldb::ThreadPlanSP
|
lldb::ThreadPlanSP
|
||||||
GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
||||||
bool stop_others) override;
|
bool stop_others) override;
|
||||||
|
|
||||||
virtual lldb_private::Error
|
lldb_private::Error
|
||||||
CanLoadImage() override;
|
CanLoadImage() override;
|
||||||
|
|
||||||
virtual lldb::addr_t
|
lldb::addr_t
|
||||||
GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP thread) override;
|
GetThreadLocalData(const lldb::ModuleSP module, const lldb::ThreadSP thread) override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// PluginInterface protocol
|
// PluginInterface protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName() override;
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion() override;
|
GetPluginVersion() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -168,10 +167,10 @@ protected:
|
||||||
FindRendezvousBreakpointAddress( );
|
FindRendezvousBreakpointAddress( );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(DynamicLoaderHexagonDYLD);
|
|
||||||
|
|
||||||
const lldb_private::SectionList *
|
const lldb_private::SectionList *
|
||||||
GetSectionListFromModule(const lldb::ModuleSP module) const;
|
GetSectionListFromModule(const lldb::ModuleSP module) const;
|
||||||
|
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(DynamicLoaderHexagonDYLD);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // liblldb_DynamicLoaderHexagonDYLD_H_
|
#endif // liblldb_DynamicLoaderHexagonDYLD_h_
|
||||||
|
|
|
@ -12,23 +12,25 @@
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/Target/DynamicLoader.h"
|
#include "lldb/Target/DynamicLoader.h"
|
||||||
#include "lldb/Host/FileSpec.h"
|
#include "lldb/Host/FileSpec.h"
|
||||||
#include "lldb/Core/StructuredData.h"
|
#include "lldb/Core/StructuredData.h"
|
||||||
#include "lldb/Core/UUID.h"
|
#include "lldb/Core/UUID.h"
|
||||||
#include "lldb/Host/Mutex.h"
|
#include "lldb/Host/Mutex.h"
|
||||||
#include "lldb/Target/Process.h"
|
#include "lldb/Target/Process.h"
|
||||||
|
|
||||||
// Other libraries and framework includes
|
|
||||||
#include "lldb/Utility/SafeMachO.h"
|
#include "lldb/Utility/SafeMachO.h"
|
||||||
|
|
||||||
class DynamicLoaderMacOSXDYLD : public lldb_private::DynamicLoader
|
class DynamicLoaderMacOSXDYLD : public lldb_private::DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
DynamicLoaderMacOSXDYLD(lldb_private::Process *process);
|
||||||
|
|
||||||
|
~DynamicLoaderMacOSXDYLD() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Static Functions
|
// Static Functions
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
@ -47,48 +49,44 @@ public:
|
||||||
static lldb_private::DynamicLoader *
|
static lldb_private::DynamicLoader *
|
||||||
CreateInstance (lldb_private::Process *process, bool force);
|
CreateInstance (lldb_private::Process *process, bool force);
|
||||||
|
|
||||||
DynamicLoaderMacOSXDYLD (lldb_private::Process *process);
|
|
||||||
|
|
||||||
virtual
|
|
||||||
~DynamicLoaderMacOSXDYLD ();
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Called after attaching a process.
|
/// Called after attaching a process.
|
||||||
///
|
///
|
||||||
/// Allow DynamicLoader plug-ins to execute some code after
|
/// Allow DynamicLoader plug-ins to execute some code after
|
||||||
/// attaching to a process.
|
/// attaching to a process.
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual void
|
void
|
||||||
DidAttach ();
|
DidAttach() override;
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
DidLaunch ();
|
DidLaunch() override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
ProcessDidExec ();
|
ProcessDidExec() override;
|
||||||
|
|
||||||
virtual lldb::ThreadPlanSP
|
lldb::ThreadPlanSP
|
||||||
GetStepThroughTrampolinePlan (lldb_private::Thread &thread,
|
GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
||||||
bool stop_others);
|
bool stop_others) override;
|
||||||
|
|
||||||
virtual size_t
|
size_t
|
||||||
FindEquivalentSymbols (lldb_private::Symbol *original_symbol,
|
FindEquivalentSymbols(lldb_private::Symbol *original_symbol,
|
||||||
lldb_private::ModuleList &module_list,
|
lldb_private::ModuleList &module_list,
|
||||||
lldb_private::SymbolContextList &equivalent_symbols);
|
lldb_private::SymbolContextList &equivalent_symbols) override;
|
||||||
|
|
||||||
virtual lldb_private::Error
|
lldb_private::Error
|
||||||
CanLoadImage ();
|
CanLoadImage() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// PluginInterface protocol
|
// PluginInterface protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName();
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion();
|
GetPluginVersion() override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
AlwaysRelyOnEHUnwindInfo (lldb_private::SymbolContext &sym_ctx);
|
AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void
|
void
|
||||||
|
@ -97,6 +95,7 @@ protected:
|
||||||
void
|
void
|
||||||
PrivateProcessStateChanged (lldb_private::Process *process,
|
PrivateProcessStateChanged (lldb_private::Process *process,
|
||||||
lldb::StateType state);
|
lldb::StateType state);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
LocateDYLD ();
|
LocateDYLD ();
|
||||||
|
|
||||||
|
@ -128,10 +127,10 @@ protected:
|
||||||
ReadMachHeader (lldb::addr_t addr,
|
ReadMachHeader (lldb::addr_t addr,
|
||||||
llvm::MachO::mach_header *header,
|
llvm::MachO::mach_header *header,
|
||||||
lldb_private::DataExtractor *load_command_data);
|
lldb_private::DataExtractor *load_command_data);
|
||||||
|
|
||||||
class Segment
|
class Segment
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Segment() :
|
Segment() :
|
||||||
name(),
|
name(),
|
||||||
vmaddr(LLDB_INVALID_ADDRESS),
|
vmaddr(LLDB_INVALID_ADDRESS),
|
||||||
|
@ -383,4 +382,4 @@ private:
|
||||||
DISALLOW_COPY_AND_ASSIGN (DynamicLoaderMacOSXDYLD);
|
DISALLOW_COPY_AND_ASSIGN (DynamicLoaderMacOSXDYLD);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // liblldb_DynamicLoaderMacOSXDYLD_h_
|
#endif // liblldb_DynamicLoaderMacOSXDYLD_h_
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//===-- DynamicLoaderPOSIX.h ------------------------------------*- C++ -*-===//
|
//===-- DynamicLoaderPOSIXDYLD.h --------------------------------*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
|
@ -7,12 +7,13 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef liblldb_DynamicLoaderPOSIX_H_
|
#ifndef liblldb_DynamicLoaderPOSIXDYLD_h_
|
||||||
#define liblldb_DynamicLoaderPOSIX_H_
|
#define liblldb_DynamicLoaderPOSIXDYLD_h_
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
// Other libraries and framework includes
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/Breakpoint/StoppointCallbackContext.h"
|
#include "lldb/Breakpoint/StoppointCallbackContext.h"
|
||||||
#include "lldb/Target/DynamicLoader.h"
|
#include "lldb/Target/DynamicLoader.h"
|
||||||
|
|
||||||
|
@ -23,6 +24,9 @@ class AuxVector;
|
||||||
class DynamicLoaderPOSIXDYLD : public lldb_private::DynamicLoader
|
class DynamicLoaderPOSIXDYLD : public lldb_private::DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
DynamicLoaderPOSIXDYLD(lldb_private::Process *process);
|
||||||
|
|
||||||
|
~DynamicLoaderPOSIXDYLD() override;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Initialize();
|
Initialize();
|
||||||
|
@ -39,38 +43,33 @@ public:
|
||||||
static lldb_private::DynamicLoader *
|
static lldb_private::DynamicLoader *
|
||||||
CreateInstance(lldb_private::Process *process, bool force);
|
CreateInstance(lldb_private::Process *process, bool force);
|
||||||
|
|
||||||
DynamicLoaderPOSIXDYLD(lldb_private::Process *process);
|
|
||||||
|
|
||||||
virtual
|
|
||||||
~DynamicLoaderPOSIXDYLD();
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// DynamicLoader protocol
|
// DynamicLoader protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
DidAttach() override;
|
DidAttach() override;
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
DidLaunch() override;
|
DidLaunch() override;
|
||||||
|
|
||||||
lldb::ThreadPlanSP
|
lldb::ThreadPlanSP
|
||||||
GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
||||||
bool stop_others) override;
|
bool stop_others) override;
|
||||||
|
|
||||||
virtual lldb_private::Error
|
lldb_private::Error
|
||||||
CanLoadImage() override;
|
CanLoadImage() override;
|
||||||
|
|
||||||
virtual lldb::addr_t
|
lldb::addr_t
|
||||||
GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP thread) override;
|
GetThreadLocalData(const lldb::ModuleSP module, const lldb::ThreadSP thread) override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// PluginInterface protocol
|
// PluginInterface protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName() override;
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion() override;
|
GetPluginVersion() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -168,4 +167,4 @@ private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD);
|
DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // liblldb_DynamicLoaderPOSIXDYLD_H_
|
#endif // liblldb_DynamicLoaderPOSIXDYLD_h_
|
||||||
|
|
|
@ -12,12 +12,8 @@
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
// Other libraries and framework includes
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/Target/DynamicLoader.h"
|
#include "lldb/Target/DynamicLoader.h"
|
||||||
#include "lldb/Host/FileSpec.h"
|
#include "lldb/Host/FileSpec.h"
|
||||||
#include "lldb/Core/UUID.h"
|
#include "lldb/Core/UUID.h"
|
||||||
|
@ -27,6 +23,10 @@
|
||||||
class DynamicLoaderStatic : public lldb_private::DynamicLoader
|
class DynamicLoaderStatic : public lldb_private::DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
DynamicLoaderStatic(lldb_private::Process *process);
|
||||||
|
|
||||||
|
~DynamicLoaderStatic() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Static Functions
|
// Static Functions
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
@ -45,37 +45,33 @@ public:
|
||||||
static lldb_private::DynamicLoader *
|
static lldb_private::DynamicLoader *
|
||||||
CreateInstance (lldb_private::Process *process, bool force);
|
CreateInstance (lldb_private::Process *process, bool force);
|
||||||
|
|
||||||
DynamicLoaderStatic (lldb_private::Process *process);
|
|
||||||
|
|
||||||
virtual
|
|
||||||
~DynamicLoaderStatic ();
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Called after attaching a process.
|
/// Called after attaching a process.
|
||||||
///
|
///
|
||||||
/// Allow DynamicLoader plug-ins to execute some code after
|
/// Allow DynamicLoader plug-ins to execute some code after
|
||||||
/// attaching to a process.
|
/// attaching to a process.
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual void
|
void
|
||||||
DidAttach ();
|
DidAttach() override;
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
DidLaunch ();
|
DidLaunch() override;
|
||||||
|
|
||||||
virtual lldb::ThreadPlanSP
|
lldb::ThreadPlanSP
|
||||||
GetStepThroughTrampolinePlan (lldb_private::Thread &thread,
|
GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
|
||||||
bool stop_others);
|
bool stop_others) override;
|
||||||
|
|
||||||
virtual lldb_private::Error
|
lldb_private::Error
|
||||||
CanLoadImage ();
|
CanLoadImage() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// PluginInterface protocol
|
// PluginInterface protocol
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName();
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion();
|
GetPluginVersion() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void
|
void
|
||||||
|
@ -84,4 +80,4 @@ private:
|
||||||
DISALLOW_COPY_AND_ASSIGN (DynamicLoaderStatic);
|
DISALLOW_COPY_AND_ASSIGN (DynamicLoaderStatic);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // liblldb_DynamicLoaderStatic_h_
|
#endif // liblldb_DynamicLoaderStatic_h_
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//===-- DynamicLoaderWindowsDYLDh ----------------------------------*- C++ -*-===//
|
//===-- DynamicLoaderWindowsDYLD.h ------------------------------*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
|
@ -7,9 +7,13 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_H_
|
#ifndef liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_h_
|
||||||
#define liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_H_
|
#define liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_h_
|
||||||
|
|
||||||
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/lldb-forward.h"
|
#include "lldb/lldb-forward.h"
|
||||||
#include "lldb/Target/DynamicLoader.h"
|
#include "lldb/Target/DynamicLoader.h"
|
||||||
|
|
||||||
|
@ -18,15 +22,16 @@ namespace lldb_private
|
||||||
|
|
||||||
class DynamicLoaderWindowsDYLD : public DynamicLoader
|
class DynamicLoaderWindowsDYLD : public DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
DynamicLoaderWindowsDYLD(Process *process);
|
||||||
|
|
||||||
|
~DynamicLoaderWindowsDYLD() override;
|
||||||
|
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static void Terminate();
|
static void Terminate();
|
||||||
static ConstString GetPluginNameStatic();
|
static ConstString GetPluginNameStatic();
|
||||||
static const char *GetPluginDescriptionStatic();
|
static const char *GetPluginDescriptionStatic();
|
||||||
|
|
||||||
DynamicLoaderWindowsDYLD(Process *process);
|
|
||||||
virtual ~DynamicLoaderWindowsDYLD();
|
|
||||||
|
|
||||||
static DynamicLoader *CreateInstance(Process *process, bool force);
|
static DynamicLoader *CreateInstance(Process *process, bool force);
|
||||||
|
|
||||||
void DidAttach() override;
|
void DidAttach() override;
|
||||||
|
@ -37,6 +42,7 @@ class DynamicLoaderWindowsDYLD : public DynamicLoader
|
||||||
ConstString GetPluginName() override;
|
ConstString GetPluginName() override;
|
||||||
uint32_t GetPluginVersion() override;
|
uint32_t GetPluginVersion() override;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
} // namespace lldb_private
|
||||||
|
|
||||||
|
#endif // liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_h_
|
||||||
|
|
|
@ -7,36 +7,9 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "ClangExpressionParser.h"
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
#include "ClangASTSource.h"
|
// Other libraries and framework includes
|
||||||
#include "ClangExpressionHelper.h"
|
|
||||||
#include "ClangExpressionDeclMap.h"
|
|
||||||
#include "ClangModulesDeclVendor.h"
|
|
||||||
#include "ClangPersistentVariables.h"
|
|
||||||
#include "IRForTarget.h"
|
|
||||||
|
|
||||||
#include "lldb/Core/ArchSpec.h"
|
|
||||||
#include "lldb/Core/DataBufferHeap.h"
|
|
||||||
#include "lldb/Core/Debugger.h"
|
|
||||||
#include "lldb/Core/Disassembler.h"
|
|
||||||
#include "lldb/Core/Log.h"
|
|
||||||
#include "lldb/Core/Module.h"
|
|
||||||
#include "lldb/Core/Stream.h"
|
|
||||||
#include "lldb/Core/StreamFile.h"
|
|
||||||
#include "lldb/Core/StreamString.h"
|
|
||||||
#include "lldb/Expression/IRExecutionUnit.h"
|
|
||||||
#include "lldb/Expression/IRDynamicChecks.h"
|
|
||||||
#include "lldb/Expression/IRInterpreter.h"
|
|
||||||
#include "lldb/Host/File.h"
|
|
||||||
#include "lldb/Host/HostInfo.h"
|
|
||||||
#include "lldb/Symbol/ClangASTContext.h"
|
|
||||||
#include "lldb/Symbol/SymbolVendor.h"
|
|
||||||
#include "lldb/Target/ExecutionContext.h"
|
|
||||||
#include "lldb/Target/ObjCLanguageRuntime.h"
|
|
||||||
#include "lldb/Target/Process.h"
|
|
||||||
#include "lldb/Target/Target.h"
|
|
||||||
|
|
||||||
#include "clang/AST/ASTContext.h"
|
#include "clang/AST/ASTContext.h"
|
||||||
#include "clang/AST/ExternalASTSource.h"
|
#include "clang/AST/ExternalASTSource.h"
|
||||||
#include "clang/Basic/FileManager.h"
|
#include "clang/Basic/FileManager.h"
|
||||||
|
@ -73,6 +46,37 @@
|
||||||
#include "llvm/Support/Host.h"
|
#include "llvm/Support/Host.h"
|
||||||
#include "llvm/Support/Signals.h"
|
#include "llvm/Support/Signals.h"
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "ClangExpressionParser.h"
|
||||||
|
|
||||||
|
#include "ClangASTSource.h"
|
||||||
|
#include "ClangExpressionHelper.h"
|
||||||
|
#include "ClangExpressionDeclMap.h"
|
||||||
|
#include "ClangModulesDeclVendor.h"
|
||||||
|
#include "ClangPersistentVariables.h"
|
||||||
|
#include "IRForTarget.h"
|
||||||
|
|
||||||
|
#include "lldb/Core/ArchSpec.h"
|
||||||
|
#include "lldb/Core/DataBufferHeap.h"
|
||||||
|
#include "lldb/Core/Debugger.h"
|
||||||
|
#include "lldb/Core/Disassembler.h"
|
||||||
|
#include "lldb/Core/Log.h"
|
||||||
|
#include "lldb/Core/Module.h"
|
||||||
|
#include "lldb/Core/Stream.h"
|
||||||
|
#include "lldb/Core/StreamFile.h"
|
||||||
|
#include "lldb/Core/StreamString.h"
|
||||||
|
#include "lldb/Expression/IRExecutionUnit.h"
|
||||||
|
#include "lldb/Expression/IRDynamicChecks.h"
|
||||||
|
#include "lldb/Expression/IRInterpreter.h"
|
||||||
|
#include "lldb/Host/File.h"
|
||||||
|
#include "lldb/Host/HostInfo.h"
|
||||||
|
#include "lldb/Symbol/ClangASTContext.h"
|
||||||
|
#include "lldb/Symbol/SymbolVendor.h"
|
||||||
|
#include "lldb/Target/ExecutionContext.h"
|
||||||
|
#include "lldb/Target/ObjCLanguageRuntime.h"
|
||||||
|
#include "lldb/Target/Process.h"
|
||||||
|
#include "lldb/Target/Target.h"
|
||||||
|
|
||||||
using namespace clang;
|
using namespace clang;
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
using namespace lldb_private;
|
using namespace lldb_private;
|
||||||
|
@ -103,6 +107,7 @@ class ClangExpressionParser::LLDBPreprocessorCallbacks : public PPCallbacks
|
||||||
ClangPersistentVariables &m_persistent_vars;
|
ClangPersistentVariables &m_persistent_vars;
|
||||||
StreamString m_error_stream;
|
StreamString m_error_stream;
|
||||||
bool m_has_errors = false;
|
bool m_has_errors = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LLDBPreprocessorCallbacks(ClangModulesDeclVendor &decl_vendor,
|
LLDBPreprocessorCallbacks(ClangModulesDeclVendor &decl_vendor,
|
||||||
ClangPersistentVariables &persistent_vars) :
|
ClangPersistentVariables &persistent_vars) :
|
||||||
|
@ -111,9 +116,10 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void moduleImport(SourceLocation import_location,
|
void
|
||||||
clang::ModuleIdPath path,
|
moduleImport(SourceLocation import_location,
|
||||||
const clang::Module * /*null*/)
|
clang::ModuleIdPath path,
|
||||||
|
const clang::Module * /*null*/) override
|
||||||
{
|
{
|
||||||
std::vector<ConstString> string_path;
|
std::vector<ConstString> string_path;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//===-- ClangFunctionCaller.h -----------------------------------------*- C++ -*-===//
|
//===-- ClangFunctionCaller.h -----------------------------------*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
|
@ -12,8 +12,6 @@
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
#include <vector>
|
|
||||||
#include <list>
|
|
||||||
// Other libraries and framework includes
|
// Other libraries and framework includes
|
||||||
// Project includes
|
// Project includes
|
||||||
#include "ClangExpressionHelper.h"
|
#include "ClangExpressionHelper.h"
|
||||||
|
@ -78,7 +76,7 @@ class ClangFunctionCaller : public FunctionCaller
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~ClangFunctionCallerHelper() {}
|
~ClangFunctionCallerHelper() override = default;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Return the object that the parser should use when resolving external
|
/// Return the object that the parser should use when resolving external
|
||||||
|
@ -100,6 +98,7 @@ class ClangFunctionCaller : public FunctionCaller
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
clang::ASTConsumer *
|
clang::ASTConsumer *
|
||||||
ASTTransformer(clang::ASTConsumer *passthrough) override;
|
ASTTransformer(clang::ASTConsumer *passthrough) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ClangFunctionCaller &m_owner;
|
ClangFunctionCaller &m_owner;
|
||||||
std::unique_ptr<ASTStructExtractor> m_struct_extractor; ///< The class that generates the argument struct layout.
|
std::unique_ptr<ASTStructExtractor> m_struct_extractor; ///< The class that generates the argument struct layout.
|
||||||
|
@ -133,9 +132,6 @@ public:
|
||||||
const ValueList &arg_value_list,
|
const ValueList &arg_value_list,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
/// Destructor
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
~ClangFunctionCaller() override;
|
~ClangFunctionCaller() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
@ -155,11 +151,13 @@ public:
|
||||||
{
|
{
|
||||||
return &m_type_system_helper;
|
return &m_type_system_helper;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const char *GetWrapperStructName()
|
const char *GetWrapperStructName()
|
||||||
{
|
{
|
||||||
return m_wrapper_struct_name.c_str();
|
return m_wrapper_struct_name.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// For ClangFunctionCaller only
|
// For ClangFunctionCaller only
|
||||||
|
@ -168,9 +166,8 @@ private:
|
||||||
// Note: the parser needs to be destructed before the execution unit, so
|
// Note: the parser needs to be destructed before the execution unit, so
|
||||||
// declare the execution unit first.
|
// declare the execution unit first.
|
||||||
ClangFunctionCallerHelper m_type_system_helper;
|
ClangFunctionCallerHelper m_type_system_helper;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Namespace lldb_private
|
} // namespace lldb_private
|
||||||
|
|
||||||
#endif // liblldb_ClangFunctionCaller_h_
|
#endif // liblldb_ClangFunctionCaller_h_
|
||||||
|
|
|
@ -7,8 +7,20 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include <mutex> // std::once
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
|
// Other libraries and framework includes
|
||||||
|
#include "clang/Basic/TargetInfo.h"
|
||||||
|
#include "clang/Frontend/CompilerInstance.h"
|
||||||
|
#include "clang/Frontend/FrontendActions.h"
|
||||||
|
#include "clang/Lex/Preprocessor.h"
|
||||||
|
#include "clang/Parse/Parser.h"
|
||||||
|
#include "clang/Sema/Lookup.h"
|
||||||
|
#include "clang/Serialization/ASTReader.h"
|
||||||
|
|
||||||
|
// Project includes
|
||||||
#include "ClangModulesDeclVendor.h"
|
#include "ClangModulesDeclVendor.h"
|
||||||
|
|
||||||
#include "lldb/Core/Log.h"
|
#include "lldb/Core/Log.h"
|
||||||
|
@ -20,15 +32,6 @@
|
||||||
#include "lldb/Target/Target.h"
|
#include "lldb/Target/Target.h"
|
||||||
#include "lldb/Utility/LLDBAssert.h"
|
#include "lldb/Utility/LLDBAssert.h"
|
||||||
|
|
||||||
#include "clang/Basic/TargetInfo.h"
|
|
||||||
#include "clang/Frontend/CompilerInstance.h"
|
|
||||||
#include "clang/Frontend/FrontendActions.h"
|
|
||||||
#include "clang/Lex/Preprocessor.h"
|
|
||||||
#include "clang/Parse/Parser.h"
|
|
||||||
#include "clang/Sema/Lookup.h"
|
|
||||||
#include "clang/Serialization/ASTReader.h"
|
|
||||||
|
|
||||||
|
|
||||||
using namespace lldb_private;
|
using namespace lldb_private;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -38,14 +41,17 @@ namespace {
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StoringDiagnosticConsumer ();
|
StoringDiagnosticConsumer ();
|
||||||
|
|
||||||
void
|
void
|
||||||
HandleDiagnostic (clang::DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &info);
|
HandleDiagnostic(clang::DiagnosticsEngine::Level DiagLevel,
|
||||||
|
const clang::Diagnostic &info) override;
|
||||||
|
|
||||||
void
|
void
|
||||||
ClearDiagnostics ();
|
ClearDiagnostics ();
|
||||||
|
|
||||||
void
|
void
|
||||||
DumpDiagnostics (Stream &error_stream);
|
DumpDiagnostics (Stream &error_stream);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::pair<clang::DiagnosticsEngine::Level, std::string> IDAndDiagnostic;
|
typedef std::pair<clang::DiagnosticsEngine::Level, std::string> IDAndDiagnostic;
|
||||||
std::vector<IDAndDiagnostic> m_diagnostics;
|
std::vector<IDAndDiagnostic> m_diagnostics;
|
||||||
|
@ -62,28 +68,28 @@ namespace {
|
||||||
std::unique_ptr<clang::CompilerInstance> &&compiler_instance,
|
std::unique_ptr<clang::CompilerInstance> &&compiler_instance,
|
||||||
std::unique_ptr<clang::Parser> &&parser);
|
std::unique_ptr<clang::Parser> &&parser);
|
||||||
|
|
||||||
virtual bool
|
~ClangModulesDeclVendorImpl() override = default;
|
||||||
|
|
||||||
|
bool
|
||||||
AddModule(ModulePath &path,
|
AddModule(ModulePath &path,
|
||||||
ModuleVector *exported_modules,
|
ModuleVector *exported_modules,
|
||||||
Stream &error_stream) override;
|
Stream &error_stream) override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
AddModulesForCompileUnit(CompileUnit &cu,
|
AddModulesForCompileUnit(CompileUnit &cu,
|
||||||
ModuleVector &exported_modules,
|
ModuleVector &exported_modules,
|
||||||
Stream &error_stream) override;
|
Stream &error_stream) override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
FindDecls (const ConstString &name,
|
FindDecls(const ConstString &name,
|
||||||
bool append,
|
bool append,
|
||||||
uint32_t max_matches,
|
uint32_t max_matches,
|
||||||
std::vector <clang::NamedDecl*> &decls) override;
|
std::vector <clang::NamedDecl*> &decls) override;
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
ForEachMacro(const ModuleVector &modules,
|
ForEachMacro(const ModuleVector &modules,
|
||||||
std::function<bool (const std::string &)> handler) override;
|
std::function<bool (const std::string &)> handler) override;
|
||||||
|
|
||||||
~ClangModulesDeclVendorImpl();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void
|
void
|
||||||
ReportModuleExportsHelper (std::set<ClangModulesDeclVendor::ModuleID> &exports,
|
ReportModuleExportsHelper (std::set<ClangModulesDeclVendor::ModuleID> &exports,
|
||||||
|
@ -110,7 +116,7 @@ namespace {
|
||||||
ImportedModuleMap m_imported_modules;
|
ImportedModuleMap m_imported_modules;
|
||||||
ImportedModuleSet m_user_imported_modules;
|
ImportedModuleSet m_user_imported_modules;
|
||||||
};
|
};
|
||||||
}
|
} // anonymous namespace
|
||||||
|
|
||||||
StoringDiagnosticConsumer::StoringDiagnosticConsumer ()
|
StoringDiagnosticConsumer::StoringDiagnosticConsumer ()
|
||||||
{
|
{
|
||||||
|
@ -164,7 +170,6 @@ GetResourceDir ()
|
||||||
return g_cached_resource_dir;
|
return g_cached_resource_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ClangModulesDeclVendor::ClangModulesDeclVendor()
|
ClangModulesDeclVendor::ClangModulesDeclVendor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -318,7 +323,6 @@ ClangModulesDeclVendorImpl::AddModule(ModulePath &path,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ClangModulesDeclVendor::LanguageSupportsClangModules (lldb::LanguageType language)
|
ClangModulesDeclVendor::LanguageSupportsClangModules (lldb::LanguageType language)
|
||||||
{
|
{
|
||||||
|
@ -597,10 +601,6 @@ ClangModulesDeclVendorImpl::ForEachMacro(const ClangModulesDeclVendor::ModuleVec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ClangModulesDeclVendorImpl::~ClangModulesDeclVendorImpl()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
clang::ModuleLoadResult
|
clang::ModuleLoadResult
|
||||||
ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath path,
|
ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath path,
|
||||||
bool make_visible)
|
bool make_visible)
|
||||||
|
|
|
@ -10,13 +10,17 @@
|
||||||
#ifndef liblldb_ClangPersistentVariables_h_
|
#ifndef liblldb_ClangPersistentVariables_h_
|
||||||
#define liblldb_ClangPersistentVariables_h_
|
#define liblldb_ClangPersistentVariables_h_
|
||||||
|
|
||||||
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
|
// Other libraries and framework includes
|
||||||
|
#include "llvm/ADT/DenseMap.h"
|
||||||
|
|
||||||
|
// Project includes
|
||||||
#include "ClangExpressionVariable.h"
|
#include "ClangExpressionVariable.h"
|
||||||
#include "ClangModulesDeclVendor.h"
|
#include "ClangModulesDeclVendor.h"
|
||||||
|
|
||||||
#include "lldb/Expression/ExpressionVariable.h"
|
#include "lldb/Expression/ExpressionVariable.h"
|
||||||
|
|
||||||
#include "llvm/ADT/DenseMap.h"
|
|
||||||
|
|
||||||
namespace lldb_private
|
namespace lldb_private
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -31,13 +35,9 @@ namespace lldb_private
|
||||||
class ClangPersistentVariables : public PersistentExpressionState
|
class ClangPersistentVariables : public PersistentExpressionState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
ClangPersistentVariables();
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
~ClangPersistentVariables() override = default;
|
||||||
/// Constructor
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
ClangPersistentVariables ();
|
|
||||||
|
|
||||||
~ClangPersistentVariables () { }
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// llvm casting support
|
// llvm casting support
|
||||||
|
@ -101,6 +101,6 @@ private:
|
||||||
///< priority source for macros.
|
///< priority source for macros.
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace lldb_private
|
||||||
|
|
||||||
#endif
|
#endif // liblldb_ClangPersistentVariables_h_
|
||||||
|
|
|
@ -12,13 +12,10 @@
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
// Other libraries and framework includes
|
// Other libraries and framework includes
|
||||||
// Project includes
|
// Project includes
|
||||||
|
|
||||||
#include "ASTStructExtractor.h"
|
#include "ASTStructExtractor.h"
|
||||||
#include "ASTResultSynthesizer.h"
|
#include "ASTResultSynthesizer.h"
|
||||||
#include "ClangExpressionDeclMap.h"
|
#include "ClangExpressionDeclMap.h"
|
||||||
|
@ -49,10 +46,8 @@ namespace lldb_private
|
||||||
class ClangUserExpression : public UserExpression
|
class ClangUserExpression : public UserExpression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum { kDefaultTimeout = 500000u };
|
enum { kDefaultTimeout = 500000u };
|
||||||
|
|
||||||
|
|
||||||
class ClangUserExpressionHelper : public ClangExpressionHelper
|
class ClangUserExpressionHelper : public ClangExpressionHelper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -61,7 +56,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
~ClangUserExpressionHelper() {}
|
~ClangUserExpressionHelper() override = default;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Return the object that the parser should use when resolving external
|
/// Return the object that the parser should use when resolving external
|
||||||
|
@ -92,6 +87,7 @@ public:
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
clang::ASTConsumer *
|
clang::ASTConsumer *
|
||||||
ASTTransformer(clang::ASTConsumer *passthrough) override;
|
ASTTransformer(clang::ASTConsumer *passthrough) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Target &m_target;
|
Target &m_target;
|
||||||
std::unique_ptr<ClangExpressionDeclMap> m_expr_decl_map_up;
|
std::unique_ptr<ClangExpressionDeclMap> m_expr_decl_map_up;
|
||||||
|
@ -124,9 +120,6 @@ public:
|
||||||
lldb::LanguageType language,
|
lldb::LanguageType language,
|
||||||
ResultType desired_type);
|
ResultType desired_type);
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
/// Destructor
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
~ClangUserExpression() override;
|
~ClangUserExpression() override;
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
@ -209,6 +202,7 @@ private:
|
||||||
|
|
||||||
void RegisterPersistentState(PersistentExpressionState *persistent_state);
|
void RegisterPersistentState(PersistentExpressionState *persistent_state);
|
||||||
lldb::ExpressionVariableSP &GetVariable();
|
lldb::ExpressionVariableSP &GetVariable();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PersistentExpressionState *m_persistent_state;
|
PersistentExpressionState *m_persistent_state;
|
||||||
lldb::ExpressionVariableSP m_variable;
|
lldb::ExpressionVariableSP m_variable;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//===-- EmulateInstructionARM64.h ------------------------------------*- C++ -*-===//
|
//===-- EmulateInstructionARM64.h -------------------------------*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
|
@ -10,6 +10,10 @@
|
||||||
#ifndef EmulateInstructionARM64_h_
|
#ifndef EmulateInstructionARM64_h_
|
||||||
#define EmulateInstructionARM64_h_
|
#define EmulateInstructionARM64_h_
|
||||||
|
|
||||||
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/Core/EmulateInstruction.h"
|
#include "lldb/Core/EmulateInstruction.h"
|
||||||
#include "lldb/Core/Error.h"
|
#include "lldb/Core/Error.h"
|
||||||
#include "lldb/Interpreter/OptionValue.h"
|
#include "lldb/Interpreter/OptionValue.h"
|
||||||
|
@ -18,6 +22,14 @@
|
||||||
class EmulateInstructionARM64 : public lldb_private::EmulateInstruction
|
class EmulateInstructionARM64 : public lldb_private::EmulateInstruction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
EmulateInstructionARM64 (const lldb_private::ArchSpec &arch) :
|
||||||
|
EmulateInstruction (arch),
|
||||||
|
m_opcode_pstate (),
|
||||||
|
m_emulated_pstate (),
|
||||||
|
m_ignore_conditions (false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Initialize ();
|
Initialize ();
|
||||||
|
|
||||||
|
@ -50,54 +62,45 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName();
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion()
|
GetPluginVersion() override
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SetTargetTriple (const lldb_private::ArchSpec &arch);
|
SetTargetTriple(const lldb_private::ArchSpec &arch) override;
|
||||||
|
|
||||||
EmulateInstructionARM64 (const lldb_private::ArchSpec &arch) :
|
bool
|
||||||
EmulateInstruction (arch),
|
SupportsEmulatingInstructionsOfType(lldb_private::InstructionType inst_type) override
|
||||||
m_opcode_pstate (),
|
|
||||||
m_emulated_pstate (),
|
|
||||||
m_ignore_conditions (false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool
|
|
||||||
SupportsEmulatingInstructionsOfType (lldb_private::InstructionType inst_type)
|
|
||||||
{
|
{
|
||||||
return SupportsEmulatingInstructionsOfTypeStatic (inst_type);
|
return SupportsEmulatingInstructionsOfTypeStatic (inst_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
ReadInstruction ();
|
ReadInstruction() override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
EvaluateInstruction (uint32_t evaluate_options);
|
EvaluateInstruction(uint32_t evaluate_options) override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
TestEmulation (lldb_private::Stream *out_stream,
|
TestEmulation(lldb_private::Stream *out_stream,
|
||||||
lldb_private::ArchSpec &arch,
|
lldb_private::ArchSpec &arch,
|
||||||
lldb_private::OptionValueDictionary *test_data)
|
lldb_private::OptionValueDictionary *test_data) override
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
GetRegisterInfo (lldb::RegisterKind reg_kind,
|
GetRegisterInfo(lldb::RegisterKind reg_kind,
|
||||||
uint32_t reg_num,
|
uint32_t reg_num,
|
||||||
lldb_private::RegisterInfo ®_info);
|
lldb_private::RegisterInfo ®_info) override;
|
||||||
|
|
||||||
virtual bool
|
|
||||||
CreateFunctionEntryUnwind (lldb_private::UnwindPlan &unwind_plan);
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
CreateFunctionEntryUnwind(lldb_private::UnwindPlan &unwind_plan) override;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
@ -136,7 +139,6 @@ public:
|
||||||
BitwiseOp_RBIT
|
BitwiseOp_RBIT
|
||||||
} BitwiseOp;
|
} BitwiseOp;
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
EL0 = 0,
|
EL0 = 0,
|
||||||
|
@ -246,7 +248,6 @@ public:
|
||||||
} ProcState;
|
} ProcState;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t mask;
|
uint32_t mask;
|
||||||
|
@ -297,4 +298,4 @@ protected:
|
||||||
bool m_ignore_conditions;
|
bool m_ignore_conditions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EmulateInstructionARM64_h_
|
#endif // EmulateInstructionARM64_h_
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//===-- EmulateInstructionMIPS64.h ------------------------------------*- C++ -*-===//
|
//===-- EmulateInstructionMIPS64.h ------------------------------*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
|
@ -10,6 +10,14 @@
|
||||||
#ifndef EmulateInstructionMIPS64_h_
|
#ifndef EmulateInstructionMIPS64_h_
|
||||||
#define EmulateInstructionMIPS64_h_
|
#define EmulateInstructionMIPS64_h_
|
||||||
|
|
||||||
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
|
#include "lldb/Core/EmulateInstruction.h"
|
||||||
|
#include "lldb/Core/Error.h"
|
||||||
|
#include "lldb/Interpreter/OptionValue.h"
|
||||||
|
|
||||||
namespace llvm
|
namespace llvm
|
||||||
{
|
{
|
||||||
class MCDisassembler;
|
class MCDisassembler;
|
||||||
|
@ -19,15 +27,13 @@ namespace llvm
|
||||||
class MCContext;
|
class MCContext;
|
||||||
class MCInstrInfo;
|
class MCInstrInfo;
|
||||||
class MCInst;
|
class MCInst;
|
||||||
}
|
} // namespace llvm
|
||||||
|
|
||||||
#include "lldb/Core/EmulateInstruction.h"
|
|
||||||
#include "lldb/Core/Error.h"
|
|
||||||
#include "lldb/Interpreter/OptionValue.h"
|
|
||||||
|
|
||||||
class EmulateInstructionMIPS64 : public lldb_private::EmulateInstruction
|
class EmulateInstructionMIPS64 : public lldb_private::EmulateInstruction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
EmulateInstructionMIPS64(const lldb_private::ArchSpec &arch);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Initialize ();
|
Initialize ();
|
||||||
|
|
||||||
|
@ -60,51 +66,47 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual lldb_private::ConstString
|
lldb_private::ConstString
|
||||||
GetPluginName();
|
GetPluginName() override;
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion()
|
GetPluginVersion() override
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SetTargetTriple (const lldb_private::ArchSpec &arch);
|
SetTargetTriple(const lldb_private::ArchSpec &arch) override;
|
||||||
|
|
||||||
EmulateInstructionMIPS64 (const lldb_private::ArchSpec &arch);
|
bool
|
||||||
|
SupportsEmulatingInstructionsOfType(lldb_private::InstructionType inst_type) override
|
||||||
virtual bool
|
|
||||||
SupportsEmulatingInstructionsOfType (lldb_private::InstructionType inst_type)
|
|
||||||
{
|
{
|
||||||
return SupportsEmulatingInstructionsOfTypeStatic (inst_type);
|
return SupportsEmulatingInstructionsOfTypeStatic (inst_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
ReadInstruction ();
|
ReadInstruction() override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
EvaluateInstruction (uint32_t evaluate_options);
|
EvaluateInstruction(uint32_t evaluate_options) override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
TestEmulation (lldb_private::Stream *out_stream,
|
TestEmulation(lldb_private::Stream *out_stream,
|
||||||
lldb_private::ArchSpec &arch,
|
lldb_private::ArchSpec &arch,
|
||||||
lldb_private::OptionValueDictionary *test_data)
|
lldb_private::OptionValueDictionary *test_data) override
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
GetRegisterInfo (lldb::RegisterKind reg_kind,
|
GetRegisterInfo(lldb::RegisterKind reg_kind,
|
||||||
uint32_t reg_num,
|
uint32_t reg_num,
|
||||||
lldb_private::RegisterInfo ®_info);
|
lldb_private::RegisterInfo ®_info) override;
|
||||||
|
|
||||||
virtual bool
|
|
||||||
CreateFunctionEntryUnwind (lldb_private::UnwindPlan &unwind_plan);
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
CreateFunctionEntryUnwind(lldb_private::UnwindPlan &unwind_plan) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const char *op_name;
|
const char *op_name;
|
||||||
|
@ -346,4 +348,4 @@ private:
|
||||||
std::unique_ptr<llvm::MCInstrInfo> m_insn_info;
|
std::unique_ptr<llvm::MCInstrInfo> m_insn_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EmulateInstructionMIPS64_h_
|
#endif // EmulateInstructionMIPS64_h_
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
#ifndef liblldb_AddressSanitizerRuntime_h_
|
#ifndef liblldb_AddressSanitizerRuntime_h_
|
||||||
#define liblldb_AddressSanitizerRuntime_h_
|
#define liblldb_AddressSanitizerRuntime_h_
|
||||||
|
|
||||||
|
// C Includes
|
||||||
|
// C++ Includes
|
||||||
|
// Other libraries and framework includes
|
||||||
|
// Project includes
|
||||||
#include "lldb/lldb-private.h"
|
#include "lldb/lldb-private.h"
|
||||||
#include "lldb/Target/ABI.h"
|
#include "lldb/Target/ABI.h"
|
||||||
#include "lldb/Target/InstrumentationRuntime.h"
|
#include "lldb/Target/InstrumentationRuntime.h"
|
||||||
|
@ -21,6 +25,7 @@ namespace lldb_private {
|
||||||
class AddressSanitizerRuntime : public lldb_private::InstrumentationRuntime
|
class AddressSanitizerRuntime : public lldb_private::InstrumentationRuntime
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
~AddressSanitizerRuntime() override;
|
||||||
|
|
||||||
static lldb::InstrumentationRuntimeSP
|
static lldb::InstrumentationRuntimeSP
|
||||||
CreateInstance (const lldb::ProcessSP &process_sp);
|
CreateInstance (const lldb::ProcessSP &process_sp);
|
||||||
|
@ -37,25 +42,29 @@ public:
|
||||||
static lldb::InstrumentationRuntimeType
|
static lldb::InstrumentationRuntimeType
|
||||||
GetTypeStatic();
|
GetTypeStatic();
|
||||||
|
|
||||||
virtual
|
lldb_private::ConstString
|
||||||
~AddressSanitizerRuntime();
|
GetPluginName() override
|
||||||
|
{
|
||||||
virtual lldb_private::ConstString
|
return GetPluginNameStatic();
|
||||||
GetPluginName() { return GetPluginNameStatic(); }
|
}
|
||||||
|
|
||||||
virtual lldb::InstrumentationRuntimeType
|
virtual lldb::InstrumentationRuntimeType
|
||||||
GetType() { return GetTypeStatic(); }
|
GetType() { return GetTypeStatic(); }
|
||||||
|
|
||||||
virtual uint32_t
|
uint32_t
|
||||||
GetPluginVersion() { return 1; }
|
GetPluginVersion() override
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
ModulesDidLoad(lldb_private::ModuleList &module_list);
|
ModulesDidLoad(lldb_private::ModuleList &module_list) override;
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
IsActive();
|
IsActive() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
AddressSanitizerRuntime(const lldb::ProcessSP &process_sp);
|
||||||
|
|
||||||
lldb::ProcessSP
|
lldb::ProcessSP
|
||||||
GetProcessSP ()
|
GetProcessSP ()
|
||||||
|
@ -63,8 +72,6 @@ private:
|
||||||
return m_process_wp.lock();
|
return m_process_wp.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
AddressSanitizerRuntime(const lldb::ProcessSP &process_sp);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Activate();
|
Activate();
|
||||||
|
|
||||||
|
@ -84,9 +91,8 @@ private:
|
||||||
lldb::ModuleSP m_runtime_module;
|
lldb::ModuleSP m_runtime_module;
|
||||||
lldb::ProcessWP m_process_wp;
|
lldb::ProcessWP m_process_wp;
|
||||||
lldb::user_id_t m_breakpoint_id;
|
lldb::user_id_t m_breakpoint_id;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace lldb_private
|
} // namespace lldb_private
|
||||||
|
|
||||||
#endif // liblldb_InstrumentationRuntime_h_
|
#endif // liblldb_AddressSanitizerRuntime_h_
|
||||||
|
|
Loading…
Reference in New Issue