mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
[lldb] Move DynamicRegisterInfo to public Target library
Move DynamicRegisterInfo from the internal lldbPluginProcessUtility library to the public lldbTarget library. This is a prerequisite towards ABI plugin changes that are going to pass DynamicRegisterInfo parameters. Differential Revision: https://reviews.llvm.org/D110942
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_DYNAMICREGISTERINFO_H
|
||||
#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_DYNAMICREGISTERINFO_H
|
||||
#ifndef LLDB_TARGET_DYNAMICREGISTERINFO_H
|
||||
#define LLDB_TARGET_DYNAMICREGISTERINFO_H
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "lldb/Utility/StructuredData.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
class DynamicRegisterInfo {
|
||||
protected:
|
||||
DynamicRegisterInfo(DynamicRegisterInfo &) = default;
|
||||
@@ -113,4 +115,6 @@ protected:
|
||||
bool m_is_reconfigurable = false;
|
||||
};
|
||||
|
||||
#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_DYNAMICREGISTERINFO_H
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // LLDB_TARGET_DYNAMICREGISTERINFO_H
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "OperatingSystemPython.h"
|
||||
|
||||
#include "Plugins/Process/Utility/DynamicRegisterInfo.h"
|
||||
#include "Plugins/Process/Utility/RegisterContextDummy.h"
|
||||
#include "Plugins/Process/Utility/RegisterContextMemory.h"
|
||||
#include "Plugins/Process/Utility/ThreadMemory.h"
|
||||
|
||||
@@ -13,11 +13,10 @@
|
||||
|
||||
#if LLDB_ENABLE_PYTHON
|
||||
|
||||
#include "lldb/Target/DynamicRegisterInfo.h"
|
||||
#include "lldb/Target/OperatingSystem.h"
|
||||
#include "lldb/Utility/StructuredData.h"
|
||||
|
||||
class DynamicRegisterInfo;
|
||||
|
||||
namespace lldb_private {
|
||||
class ScriptInterpreter;
|
||||
}
|
||||
@@ -72,14 +71,14 @@ protected:
|
||||
lldb_private::ThreadList &old_thread_list,
|
||||
std::vector<bool> &core_used_map, bool *did_create_ptr);
|
||||
|
||||
DynamicRegisterInfo *GetDynamicRegisterInfo();
|
||||
lldb_private::DynamicRegisterInfo *GetDynamicRegisterInfo();
|
||||
|
||||
lldb::ValueObjectSP m_thread_list_valobj_sp;
|
||||
std::unique_ptr<DynamicRegisterInfo> m_register_info_up;
|
||||
std::unique_ptr<lldb_private::DynamicRegisterInfo> m_register_info_up;
|
||||
lldb_private::ScriptInterpreter *m_interpreter;
|
||||
lldb_private::StructuredData::ObjectSP m_python_object_sp;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // LLDB_ENABLE_PYTHON
|
||||
|
||||
#endif // liblldb_OperatingSystemPython_h_
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
add_lldb_library(lldbPluginProcessUtility
|
||||
AuxVector.cpp
|
||||
DynamicRegisterInfo.cpp
|
||||
FreeBSDSignals.cpp
|
||||
GDBRemoteSignals.cpp
|
||||
HistoryThread.cpp
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#include "RegisterContextMemory.h"
|
||||
|
||||
#include "DynamicRegisterInfo.h"
|
||||
#include "lldb/Target/Process.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Utility/DataBufferHeap.h"
|
||||
|
||||
@@ -11,17 +11,16 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "lldb/Target/DynamicRegisterInfo.h"
|
||||
#include "lldb/Target/RegisterContext.h"
|
||||
#include "lldb/Utility/DataExtractor.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
class DynamicRegisterInfo;
|
||||
|
||||
class RegisterContextMemory : public lldb_private::RegisterContext {
|
||||
public:
|
||||
RegisterContextMemory(lldb_private::Thread &thread,
|
||||
uint32_t concrete_frame_idx,
|
||||
DynamicRegisterInfo ®_info,
|
||||
lldb_private::DynamicRegisterInfo ®_info,
|
||||
lldb::addr_t reg_data_addr);
|
||||
|
||||
~RegisterContextMemory() override;
|
||||
@@ -60,7 +59,7 @@ public:
|
||||
protected:
|
||||
void SetAllRegisterValid(bool b);
|
||||
|
||||
DynamicRegisterInfo &m_reg_infos;
|
||||
lldb_private::DynamicRegisterInfo &m_reg_infos;
|
||||
std::vector<bool> m_reg_valid;
|
||||
lldb_private::DataExtractor m_reg_data;
|
||||
lldb::addr_t m_reg_data_addr; // If this is valid, then we have a register
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Plugins/Process/Utility/DynamicRegisterInfo.h"
|
||||
#include "lldb/Target/DynamicRegisterInfo.h"
|
||||
#include "lldb/Target/RegisterContext.h"
|
||||
#include "lldb/Utility/ConstString.h"
|
||||
#include "lldb/Utility/DataExtractor.h"
|
||||
|
||||
@@ -9,6 +9,7 @@ lldb_tablegen(TargetPropertiesEnum.inc -gen-lldb-property-enum-defs
|
||||
add_lldb_library(lldbTarget
|
||||
ABI.cpp
|
||||
AssertFrameRecognizer.cpp
|
||||
DynamicRegisterInfo.cpp
|
||||
ExecutionContext.cpp
|
||||
InstrumentationRuntime.cpp
|
||||
InstrumentationRuntimeStopInfo.cpp
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "DynamicRegisterInfo.h"
|
||||
|
||||
#include "lldb/Target/DynamicRegisterInfo.h"
|
||||
#include "lldb/Core/StreamFile.h"
|
||||
#include "lldb/DataFormatters/FormatManager.h"
|
||||
#include "lldb/Interpreter/OptionArgParser.h"
|
||||
@@ -15,7 +15,6 @@ set(LLVM_OPTIONAL_SOURCES
|
||||
${NETBSD_SOURCES})
|
||||
|
||||
add_lldb_unittest(ProcessUtilityTests
|
||||
DynamicRegisterInfoTest.cpp
|
||||
LinuxProcMapsTest.cpp
|
||||
MemoryTagManagerAArch64MTETest.cpp
|
||||
RegisterContextTest.cpp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
add_lldb_unittest(TargetTests
|
||||
ABITest.cpp
|
||||
DynamicRegisterInfoTest.cpp
|
||||
ExecutionContextTest.cpp
|
||||
MemoryRegionInfoTest.cpp
|
||||
ModuleCacheTest.cpp
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Plugins/Process/Utility/DynamicRegisterInfo.h"
|
||||
|
||||
#include "lldb/Target/DynamicRegisterInfo.h"
|
||||
#include "lldb/Utility/ArchSpec.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
Reference in New Issue
Block a user