[Lldb-commits] [PATCH] D130796: [LLDB][NativePDB] Switch to use DWARFLocationList.
Reid Kleckner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 10 11:21:11 PDT 2022
rnk added inline comments.
================
Comment at: lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp:843-846
+ std::map<uint64_t, size_t> offset_to_size;
+ // Get the size of each fields if it's udt.
+ if (!FindMembersSize::GetMemberSizesForUdt(result.type, index.tpi(), 0,
+ offset_to_size))
----------------
I'm a bit worried about performance. This code runs for every `S_LOCAL` record. So, every time we encounter a `std::string` local variable, we walk over the entire string class hierarchy field list to compute this map, which we may or may not need later.
This code is pretty thorough, but can we reduce the scope of this patch by ignoring subfield records stored in memory, since they lack size information? I think that would make it easier to review and test. Just focus on variables in registers, and subfields in registers, since those are easiest to test and understand.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130796/new/
https://reviews.llvm.org/D130796
More information about the lldb-commits
mailing list