[Lldb-commits] [lldb] [LLDB] Ensure the data of apple accelerator tables is kept around (PR #71828)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 10 11:20:28 PST 2023
================
@@ -57,7 +57,9 @@ std::unique_ptr<AppleDWARFIndex> AppleDWARFIndex::Create(
return std::make_unique<AppleDWARFIndex>(
----------------
clayborg wrote:
> These asserts might not always pass? I don't know if it's guaranteed that if one of those sections is present, then the rest of them are as well.
You can check the size first and if non-zero then check the buffer:
```
lldbassert(apple_names.GetByteSize() == 0 || apple_names.GetSharedDataBuffer());
lldbassert(apple_namespaces.GetByteSize() == 0 || apple_namespaces.GetSharedDataBuffer());
lldbassert(apple_types.GetByteSize() == 0 || apple_types.GetSharedDataBuffer());
lldbassert(apple_objc.GetByteSize() == 0 || apple_objc.GetSharedDataBuffer());
```
https://github.com/llvm/llvm-project/pull/71828
More information about the lldb-commits
mailing list