The documentation for SymTagFuncDebugStart
and SymTagFuncDebugEnd
state that calling IDiaSymbol::get_lexicalParent
will return a symbol for the enclosing function. I interpret this as I will get an IDiaSymbol
whose get_symTag
method returns SymTagFunction
. However, when I do this it returns me the SymTagCompiland
and not the function. So the documentation appears wrong, but worse I'm not sure how to actually tie the SymTagFuncDebugStart
and SymTagFuncDebugEnd
to the containing SymTagFunction
.
Does anyone know? A few dumps suggest that SymTagFuncDebugStart
and SymTagFuncDebugEnd
always come immediately after the corresponding SymTagFunction
when enumerating the symbols via IEnumSymbols
. Or put another way, that if IDiaSymbol::get_symIndexId
returns n
for the function, it will return n+1
and n+2
respectively for the func debug start and func debug end.
But I can't be sure this is always true, and this seems unreliable and hackish.
Does anyone have any suggestions on the correct way to do this?