Author: Emmmer Date: 2022-08-11T21:42:44+08:00 New Revision: 55e511f9f61992ff57741148a92cd2f6b6a21337
URL: https://github.com/llvm/llvm-project/commit/55e511f9f61992ff57741148a92cd2f6b6a21337 DIFF: https://github.com/llvm/llvm-project/commit/55e511f9f61992ff57741148a92cd2f6b6a21337.diff LOG: [LLDB][RISCV] Fix risc-v target build Fixed an inconsistency between D130985 and D130342 This should be a follow-up of D130985 Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131667 Added: Modified: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp lldb/source/Utility/RISCV_DWARF_Registers.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp index 135254962af05..342fc1aa1a416 100644 --- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp @@ -10,6 +10,7 @@ #include "NativeRegisterContextLinux_riscv64.h" +#include "lldb/Host/HostInfo.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/RegisterValue.h" @@ -48,6 +49,11 @@ NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux( } } +llvm::Expected<ArchSpec> +NativeRegisterContextLinux::DetermineArchitecture(lldb::tid_t tid) { + return HostInfo::GetArchitecture(); +} + NativeRegisterContextLinux_riscv64::NativeRegisterContextLinux_riscv64( const ArchSpec &target_arch, NativeThreadProtocol &native_thread, std::unique_ptr<RegisterInfoPOSIX_riscv64> register_info_up) diff --git a/lldb/source/Utility/RISCV_DWARF_Registers.h b/lldb/source/Utility/RISCV_DWARF_Registers.h index d543bf0a6b5b1..88a0b7300ff29 100644 --- a/lldb/source/Utility/RISCV_DWARF_Registers.h +++ b/lldb/source/Utility/RISCV_DWARF_Registers.h @@ -124,7 +124,7 @@ enum { dwarf_gpr_fp = dwarf_gpr_x8, // mock pc regnum - dwarf_gpr_pc = UINT32_MAX, + dwarf_gpr_pc = 11451, }; } // namespace riscv_dwarf _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits