[lldb] Introduce DynamicRegisterInfo::CreateFromDict
authorAlex Langford <alangford@apple.com>
Fri, 9 Jun 2023 23:27:49 +0000 (16:27 -0700)
committerAlex Langford <alangford@apple.com>
Thu, 15 Jun 2023 17:51:17 +0000 (10:51 -0700)
commit35b0b244401aad5ca3a16c9e4d97a5892ca7592b
tree63ba9ba63b06bcf36d4e89445b5abc6bb03eafab
parentc8ac14d754088b19c659ca0915229f1f28776831
[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/include/lldb/Target/DynamicRegisterInfo.h
lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
lldb/source/Target/DynamicRegisterInfo.cpp