[Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 26 15:33:12 PST 2016


Ok, so back to check_inlines.  I realized after I hit send that the
explanation I had written out is exactly what I thought I had to do for
check_inlines == true.

I guess a concrete example would make it clearer.  If I have this code:

// foo.cpp
#include "foo.h"

int main(int argc, char **argv) { return 0; }


And I run this C++ code:

// After this, sc_list should have 1 entry.
ResolveSymbolContext("foo.h", 0, true, eSymbolContextCompUnit, sc_list);

// After this, sc_list should have how many entries?  1 or 0?
ResolveSymbolContext("foo.h", 0, false, eSymbolContextCompUnit, sc_list);

how many entries are in sc_list after the second call?  If it's still 1,
then what is the difference with the first case?

Is the only difference what I put into the line tables?  In the 'true'
case, I fill out the line tables with all the contributions from foo.h, but
in the 'false' case I don't?  But both still return the same number of
entries in sc_list?

(Sorry this is so confusing, I'm planning to document this process as I go
so that the next person that comes along will be able to have all this
information up front)

On Fri, Feb 26, 2016 at 3:26 PM Greg Clayton <clayborg at gmail.com> wrote:

>
> > On Feb 26, 2016, at 3:22 PM, Zachary Turner <zturner at google.com> wrote:
> >
> >
> >
> > On Fri, Feb 26, 2016 at 3:16 PM Greg Clayton <clayborg at gmail.com> wrote:
> >
> > > On Feb 26, 2016, at 2:49 PM, Zachary Turner <zturner at google.com>
> wrote:
> >
> > > 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?
> >
> > It can be called, but you should only match on compile units whose files
> match "vector" as the basename.
> > Ahh, so I don't return each compile unit that matches the file_spec, but
> rather each CompileUnit where the compile unit OR one of the support files
> matches the file_spec.
>
> Yes. Think of what the user is going to want if they type:
>
> (lldb) b vector:123
>
> This should find all files that match vector and set a breakpoint on line
> 123 of _all_ of them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160226/8242727c/attachment-0001.html>


More information about the lldb-commits mailing list