llvm-project
aa702f46 - [lldb] Remove ConstString from DynamicRegisterInfo (#243644)

Commit
7 hours ago
[lldb] Remove ConstString from DynamicRegisterInfo (#243644) RegisterInfo and RegisterSet both have `const char *` values. In many cases, they are backed by static data and so their lifetime is guaranteed. The one case where this is not true is DynamicRegisterInfo. DynamicRegisterInfo produces RegisterInfo and RegisterSet objects for register information that lldb is not aware of ahead of time. Currently it stores strings in the ConstString pool to guarantee their lifetimes for the remainder of lldb's run time. As a part of removing ConstString from LLDB in general, this change ties those strings to the lifetime of the DynamicRegisterInfo itself. There are a few cases where RegisterInfo objects are pulled out of DynamicRegisterInfo or a DynamicRegisterInfo object is copied. Those cases are handled carefully, sometimes with ConstString, to make sure we are not producing dangling pointers. Future changes will fix them.
Author
Parents
Loading