[Lldb-commits] [lldb] [LLDB][NativePDB] Ignore functions with no type in name lookup (PR #153382)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 14 05:59:30 PDT 2025


Michael137 wrote:

> > Could you elaborate in the PR description why these "no prototype functions" would cause issues if we cached them?
> 
> A bit later in the function, we look up the function type:
> 
> ```c++
> auto type = m_index->tpi().getType(proc.FunctionType);
> ```
> 
> In PDB, types with an index lower than `0x1000` are simple/primitive types. These types are predefined and won't occur in the type streams. Or rather: the type streams start from `0x1000`, so this is subtracted from every type index to get to the array index. The none type is `0` and we'd overflow. LLVM has an assert in this function which caught this.

Ah gotcha. Thanks for the context. It would be more obvious if we guarded this on `TypeIndex::isSimple` then (see inline comment)

https://github.com/llvm/llvm-project/pull/153382


More information about the lldb-commits mailing list