<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 18, 2016 at 6:16 PM Greg Clayton <<a href="mailto:clayborg@gmail.com">clayborg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> Just to make sure I understand, is it safe to say that:<br>
><br>
> If check_inlines is false, sc_list should return with exactly 1 SymbolContext with m_comp_unit set to the main source file?<br>
<br>
You would get one SymbolContext per compile unit whose path matches the file_spec _and_ contains a line number. There might be multiple "Foo.cpp" files in different directories withing one PDB file, so you might still end up finding N matches. So your existing code can be used when check_inlines if false as long as the PDB can search by fullname and by basename. I am guessing it doesn't though, am I wrong?<br>
<br>
> The same for the check_inlines is false calse -- we still just have  SymbolContext but we add line table entries from all additional files that contribute to the compilation unit?<br>
> When will sc_list end up with multiple entries?<br>
<br>
You always look through all compile units. If check_inlines is false, then you make sure "file_spec" matches (by basename  if only basename is specified, or by full path if a directory and filename are valid inside file_spec. If the file matches, then look for any lines that match and return ALL instances of them. Auto inlining of a function inside a compile unit might cause there to be many entries for line 10.<br></blockquote><div><br></div><div>I'm coming back around to this now.  What happens if check_inlines is False, but the FileSpec is a header file like <vector>.  You said "If check_inlines is false, make sure file_spec matches".  But if file_spec is a header file, it's never going to match anything.  Should I simply expect that the API is not called in this way?  i.e. if I write b vector:1234 then I can expect that check_inlines will be true?</div></div></div>