[Lldb-commits] [clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)
Eli Friedman via lldb-commits
lldb-commits at lists.llvm.org
Fri May 31 15:43:52 PDT 2024
efriedma-quic wrote:
> > The correct answer here is probably to fix the sizes in the RecordLayout itself; in particular, the DataSize of the members.
>
> That would be ideal, but also means we'd have to reflect the various C++ attributes that affect layout in DWARF. Avoiding adding such language-specific constructs to DWARF is what partly motivated this patch.
Given the offsets and sizes of the members of a struct, you can compute the datasize as the offset plus the size of the last member. That isn't really correct for POD structs, but the CGRecordLayout won't care: it can't tell the difference between padding that's illegal to reuse, vs. padding that the frontend chose not to reuse for some other reason.
https://github.com/llvm/llvm-project/pull/93809
More information about the lldb-commits
mailing list