diff options
| author | Pavel Labath <pavel@labath.sk> | 2019-09-25 13:03:04 +0000 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2019-09-25 13:03:04 +0000 |
| commit | d0b44dbefd140949fed7916dc33e19f7c86b2cfd (patch) | |
| tree | 318a6e9e16ef40497b6e766535ecde4bfa6fc796 /lldb/source/Plugins | |
| parent | 7f9ac3372ccb85fbe652276d4081c9c64dfb3836 (diff) | |
| download | bcm5719-llvm-d0b44dbefd140949fed7916dc33e19f7c86b2cfd.tar.gz bcm5719-llvm-d0b44dbefd140949fed7916dc33e19f7c86b2cfd.zip | |
Have ABI plugins vend llvm MCRegisterInfo data
Summary:
I was recently surprised to learn that there is a total of 2 (two) users
of the register info definitions contained in the ABI plugins. Yet, the
defitions themselves span nearly 10kLOC.
The two users are:
- dwarf expression pretty printer
- the mechanism for augmenting the register info definitions obtained
over gdb-remote protocol (AugmentRegisterInfoViaABI)
Both of these uses need the DWARF an EH register numbers, which is
information that is already available in LLVM. This patch makes it
possible to do so.
It adds a GetMCRegisterInfo method to the ABI class, which every class
is expected to implement. Normally, it should be sufficient to obtain
the definitions from the appropriate llvm::Target object (for which I
provide a utility function), but the subclasses are free to construct it
in any way they deem fit.
We should be able to always get the MCRegisterInfo object from llvm,
with one important exception: if the relevant llvm target was disabled
at compile time. To handle this, I add a mechanism to disable the
compilation of ABI plugins based on the value of LLVM_TARGETS_TO_BUILD
cmake setting. This ensures all our existing are able to create their
MCRegisterInfo objects.
The new MCRegisterInfo api is not used yet, but the intention is to make
use of it in follow-up patches.
Reviewers: jasonmolenda, aprantl, JDevlieghere, tatyana-krasnukha
Subscribers: wuzish, nemanjai, mgorny, kbarton, atanasyan, lldb-commits
Differential Revision: https://reviews.llvm.org/D67965
llvm-svn: 372862
Diffstat (limited to 'lldb/source/Plugins')
29 files changed, 99 insertions, 43 deletions
diff --git a/lldb/source/Plugins/ABI/CMakeLists.txt b/lldb/source/Plugins/ABI/CMakeLists.txt index c88affd8063..3d10f96114b 100644 --- a/lldb/source/Plugins/ABI/CMakeLists.txt +++ b/lldb/source/Plugins/ABI/CMakeLists.txt @@ -1,14 +1,28 @@ -add_subdirectory(SysV-arm) -add_subdirectory(SysV-arm64) -add_subdirectory(SysV-hexagon) -add_subdirectory(SysV-ppc) -add_subdirectory(SysV-ppc64) -add_subdirectory(SysV-mips) -add_subdirectory(SysV-mips64) -add_subdirectory(SysV-s390x) -add_subdirectory(SysV-i386) -add_subdirectory(SysV-x86_64) -add_subdirectory(MacOSX-i386) -add_subdirectory(MacOSX-arm) -add_subdirectory(MacOSX-arm64) -add_subdirectory(Windows-x86_64) +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(MacOSX-arm64) + add_subdirectory(SysV-arm64) +endif() +if ("ARM" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(MacOSX-arm) + add_subdirectory(SysV-arm) +endif() +if ("Hexagon" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(SysV-hexagon) +endif() +if ("Mips" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(SysV-mips) + add_subdirectory(SysV-mips64) +endif() +if ("PowerPC" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(SysV-ppc) + add_subdirectory(SysV-ppc64) +endif() +if ("SystemZ" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(SysV-s390x) +endif() +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(SysV-i386) + add_subdirectory(SysV-x86_64) + add_subdirectory(MacOSX-i386) + add_subdirectory(Windows-x86_64) +endif() diff --git a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp index f2d01dba69d..9dff12bcc74 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp @@ -1326,7 +1326,8 @@ ABIMacOSX_arm::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) { if (vendor_type == llvm::Triple::Apple) { if ((arch_type == llvm::Triple::arm) || (arch_type == llvm::Triple::thumb)) { - return ABISP(new ABIMacOSX_arm(process_sp)); + return ABISP( + new ABIMacOSX_arm(std::move(process_sp), MakeMCRegisterInfo(arch))); } } diff --git a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h index ac9ba00b9d9..e512651f86e 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h +++ b/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h @@ -85,7 +85,9 @@ protected: lldb_private::CompilerType &ast_type) const override; private: - ABIMacOSX_arm(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABIMacOSX_arm(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp index e5c72bd549b..a9c57dfdb24 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp @@ -1666,7 +1666,8 @@ ABIMacOSX_arm64::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) { if (vendor_type == llvm::Triple::Apple) { if (arch_type == llvm::Triple::aarch64) { - return ABISP(new ABIMacOSX_arm64(process_sp)); + return ABISP( + new ABIMacOSX_arm64(std::move(process_sp), MakeMCRegisterInfo(arch))); } } diff --git a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h index bfacbcd54a9..c7a91ba9c46 100644 --- a/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h +++ b/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h @@ -93,7 +93,9 @@ protected: lldb_private::CompilerType &ast_type) const override; private: - ABIMacOSX_arm64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABIMacOSX_arm64(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp index adb40cf1e7e..76ebd6476ff 100644 --- a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp +++ b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp @@ -710,7 +710,8 @@ ABIMacOSX_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) if ((arch.GetTriple().getArch() == llvm::Triple::x86) && (arch.GetTriple().isMacOSX() || arch.GetTriple().isiOS() || arch.GetTriple().isWatchOS())) { - return ABISP(new ABIMacOSX_i386(process_sp)); + return ABISP( + new ABIMacOSX_i386(std::move(process_sp), MakeMCRegisterInfo(arch))); } return ABISP(); } diff --git a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h index 57def683283..50062b84d87 100644 --- a/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h +++ b/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h @@ -92,7 +92,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABIMacOSX_i386(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABIMacOSX_i386(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp b/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp index b0747147bfa..b6e8f880682 100644 --- a/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp +++ b/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp @@ -1327,7 +1327,8 @@ ABISysV_arm::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (vendor_type != llvm::Triple::Apple) { if ((arch_type == llvm::Triple::arm) || (arch_type == llvm::Triple::thumb)) { - return ABISP(new ABISysV_arm(process_sp)); + return ABISP( + new ABISysV_arm(std::move(process_sp), MakeMCRegisterInfo(arch))); } } diff --git a/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h b/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h index a0f00c8f227..60fb14be5f7 100644 --- a/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h +++ b/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h @@ -85,7 +85,9 @@ protected: lldb_private::CompilerType &ast_type) const override; private: - ABISysV_arm(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_arm(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp index beb54031c64..781d71c6c05 100644 --- a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp +++ b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp @@ -1669,7 +1669,8 @@ ABISysV_arm64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) if (vendor_type != llvm::Triple::Apple) { if (arch_type == llvm::Triple::aarch64) { - return ABISP(new ABISysV_arm64(process_sp)); + return ABISP( + new ABISysV_arm64(std::move(process_sp), MakeMCRegisterInfo(arch))); } } diff --git a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h index 1fbdc793ed6..1bf5773e2db 100644 --- a/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h +++ b/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h @@ -92,7 +92,9 @@ protected: lldb_private::CompilerType &ast_type) const override; private: - ABISysV_arm64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_arm64(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp b/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp index ae836851162..34d9258ccb9 100644 --- a/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp +++ b/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp @@ -1014,7 +1014,8 @@ size_t ABISysV_hexagon::GetRedZoneSize() const { return 0; } ABISP ABISysV_hexagon::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (arch.GetTriple().getArch() == llvm::Triple::hexagon) { - return ABISP(new ABISysV_hexagon(process_sp)); + return ABISP( + new ABISysV_hexagon(std::move(process_sp), MakeMCRegisterInfo(arch))); } return ABISP(); } diff --git a/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h b/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h index 459b6315dba..bef64a22d95 100644 --- a/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h +++ b/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h @@ -97,7 +97,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_hexagon(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_hexagon(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp b/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp index 41148b7f426..69e4cff90eb 100644 --- a/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp +++ b/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp @@ -198,7 +198,8 @@ ABISP ABISysV_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (arch.GetTriple().getVendor() != llvm::Triple::Apple) { if (arch.GetTriple().getArch() == llvm::Triple::x86) { - return ABISP(new ABISysV_i386(process_sp)); + return ABISP( + new ABISysV_i386(std::move(process_sp), MakeMCRegisterInfo(arch))); } } return ABISP(); diff --git a/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h b/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h index 982bdd676b7..2362e9adda9 100644 --- a/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h +++ b/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h @@ -100,7 +100,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_i386(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_i386(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp b/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp index df63a31d198..416db9f5ae8 100644 --- a/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp +++ b/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp @@ -556,7 +556,8 @@ ABISysV_mips::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch(); if ((arch_type == llvm::Triple::mips) || (arch_type == llvm::Triple::mipsel)) { - return ABISP(new ABISysV_mips(process_sp)); + return ABISP( + new ABISysV_mips(std::move(process_sp), MakeMCRegisterInfo(arch))); } return ABISP(); } diff --git a/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h b/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h index 6cd9c19c22a..8143f552fc4 100644 --- a/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h +++ b/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h @@ -87,7 +87,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_mips(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_mips(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp b/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp index 7fb1ea243ea..72ec0715b6c 100644 --- a/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp +++ b/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp @@ -554,7 +554,8 @@ size_t ABISysV_mips64::GetRedZoneSize() const { return 0; } ABISP ABISysV_mips64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (arch.GetTriple().isMIPS64()) - return ABISP(new ABISysV_mips64(process_sp)); + return ABISP( + new ABISysV_mips64(std::move(process_sp), MakeMCRegisterInfo(arch))); return ABISP(); } diff --git a/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h b/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h index 7da71b36b4b..76c3c5413b9 100644 --- a/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h +++ b/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h @@ -100,7 +100,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_mips64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_mips64(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp index e37a6ae046a..857b7fee10e 100644 --- a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp +++ b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp @@ -218,7 +218,8 @@ size_t ABISysV_ppc::GetRedZoneSize() const { return 224; } ABISP ABISysV_ppc::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (arch.GetTriple().getArch() == llvm::Triple::ppc) { - return ABISP(new ABISysV_ppc(process_sp)); + return ABISP( + new ABISysV_ppc(std::move(process_sp), MakeMCRegisterInfo(arch))); } return ABISP(); } diff --git a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h index 3b199852c30..59907c4648b 100644 --- a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h +++ b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h @@ -96,7 +96,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_ppc(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_ppc(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp b/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp index 92d5f9ce08d..935353c38ca 100644 --- a/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp +++ b/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp @@ -70,7 +70,8 @@ ABISP ABISysV_ppc64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (arch.GetTriple().isPPC64()) - return ABISP(new ABISysV_ppc64(process_sp)); + return ABISP( + new ABISysV_ppc64(std::move(process_sp), MakeMCRegisterInfo(arch))); return ABISP(); } diff --git a/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h b/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h index d5fb09eec0d..1b58975dd9d 100644 --- a/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h +++ b/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h @@ -96,7 +96,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_ppc64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_ppc64(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } diff --git a/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp b/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp index 227925fd903..f4f803a8277 100644 --- a/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp +++ b/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp @@ -200,7 +200,7 @@ size_t ABISysV_s390x::GetRedZoneSize() const { return 0; } ABISP ABISysV_s390x::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (arch.GetTriple().getArch() == llvm::Triple::systemz) { - return ABISP(new ABISysV_s390x(process_sp)); + return ABISP(new ABISysV_s390x(std::move(process_sp), MakeMCRegisterInfo(arch))); } return ABISP(); } diff --git a/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h b/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h index 13df477e84b..671d6a18260 100644 --- a/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h +++ b/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h @@ -88,7 +88,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_s390x(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_s390x(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp index 7370e110722..bf1c48f778e 100644 --- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp +++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp @@ -235,7 +235,8 @@ ABISysV_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) case llvm::Triple::EnvironmentType::UnknownEnvironment: // UnknownEnvironment is needed for older compilers that don't // support the simulator environment. - return ABISP(new ABISysV_x86_64(process_sp)); + return ABISP(new ABISysV_x86_64(std::move(process_sp), + MakeMCRegisterInfo(arch))); default: return ABISP(); } @@ -246,7 +247,8 @@ ABISysV_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) case llvm::Triple::OSType::NetBSD: case llvm::Triple::OSType::Solaris: case llvm::Triple::OSType::UnknownOS: - return ABISP(new ABISysV_x86_64(process_sp)); + return ABISP( + new ABISysV_x86_64(std::move(process_sp), MakeMCRegisterInfo(arch))); default: return ABISP(); } diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h index f6704aff348..d445d8f4142 100644 --- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h +++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h @@ -98,7 +98,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABISysV_x86_64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABISysV_x86_64(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; diff --git a/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp b/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp index fdd10a60209..ac24426914e 100644 --- a/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp +++ b/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp @@ -1092,7 +1092,8 @@ ABISP ABIWindows_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) { if (arch.GetTriple().getArch() == llvm::Triple::x86_64 && arch.GetTriple().isOSWindows()) { - return ABISP(new ABIWindows_x86_64(process_sp)); + return ABISP( + new ABIWindows_x86_64(std::move(process_sp), MakeMCRegisterInfo(arch))); } return ABISP(); } diff --git a/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h b/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h index 9f6b2ceef29..2366566d780 100644 --- a/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h +++ b/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h @@ -91,7 +91,9 @@ protected: bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info); private: - ABIWindows_x86_64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) { + ABIWindows_x86_64(lldb::ProcessSP process_sp, + std::unique_ptr<llvm::MCRegisterInfo> info_up) + : lldb_private::ABI(std::move(process_sp), std::move(info_up)) { // Call CreateInstance instead. } }; |

