From 35b0b244401aad5ca3a16c9e4d97a5892ca7592b Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Fri, 9 Jun 2023 16:27:49 -0700 Subject: [lldb] Introduce DynamicRegisterInfo::CreateFromDict I want to add some error handling to DynamicRegisterInfo because there are many operations that can fail and many of these operations do not give meaningful information back to the caller. To begin that process, I want to add a static method that is responsible for creating a DynamicRegisterInfo from a StructuredData::Dictionary (and ArchSpec). This is meant to replace the equivalent constructor because constructors are ill-equipped to perform error handling. Differential Revision: https://reviews.llvm.org/D152594 --- lldb/source/Plugins/Process/scripted/ScriptedThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/Process/scripted/ScriptedThread.cpp') diff --git a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp index ac707ffb2171..fa2ee723e093 100644 --- a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp +++ b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp @@ -341,7 +341,7 @@ std::shared_ptr ScriptedThread::GetDynamicRegisterInfo() { LLVM_PRETTY_FUNCTION, "Failed to get scripted thread registers info.", error, LLDBLog::Thread); - m_register_info_sp = std::make_shared( + m_register_info_sp = DynamicRegisterInfo::Create( *reg_info, m_scripted_process.GetTarget().GetArchitecture()); } -- cgit v1.2.3