diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:03:47 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:04:23 +0000 |
| commit | 7fa27ce4a07f19b07799a767fc29416f3b625afb (patch) | |
| tree | 27825c83636c4de341eb09a74f49f5d38a15d165 /lldb/source/Core/Value.cpp | |
| parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
Diffstat (limited to 'lldb/source/Core/Value.cpp')
| -rw-r--r-- | lldb/source/Core/Value.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index ccd36096b545..5a2631ca501f 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -121,6 +121,20 @@ AddressType Value::GetValueAddressType() const { return eAddressTypeInvalid; } +Value::ValueType Value::GetValueTypeFromAddressType(AddressType address_type) { + switch (address_type) { + case eAddressTypeFile: + return Value::ValueType::FileAddress; + case eAddressTypeLoad: + return Value::ValueType::LoadAddress; + case eAddressTypeHost: + return Value::ValueType::HostAddress; + case eAddressTypeInvalid: + return Value::ValueType::Invalid; + } + llvm_unreachable("Unexpected address type!"); +} + RegisterInfo *Value::GetRegisterInfo() const { if (m_context_type == ContextType::RegisterInfo) return static_cast<RegisterInfo *>(m_context); |
