[lldb-dev] Making a new symbol provider

Zachary Turner via lldb-dev lldb-dev at lists.llvm.org
Mon Feb 29 17:51:20 PST 2016


On Mon, Feb 29, 2016 at 5:49 PM Zachary Turner <zturner at google.com> wrote:

> Those are addresses.  Here's the situation I was encountering this on:
>
> // foo.h
> #include "bar.h"
> inline int f(int n)
> {
>     return g(n) + 1;
> }
>
> // bar.h
> inline int g(int n)
> {
>     return n+1;
> }
>
> // foo.cpp
> #include "foo.h"
> int main(int argc, char** argv)
> {
>     return f(argc);
> }
>
> PDB gives me back line numbers and address range grouped by file.  So I
> get all of foo.h's lines, all of bar.h's lines, and all of foo.cpp's
> lines.  In sorted form, the lines for g will appear inside the sequence of
> lines for f.  So that's how the situation was arising.
>

Just to clarify here.  When I was encountering this problem, I would create
one LineSequence for foo.h's lines, one LineSequence for bar.h's lines, and
one for foo.cpp's.  And each one is monotonically increasing, but the
ranges can overlap as per the previous explanation, which was causing
InsertLineSequence to fail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160301/3c9e384b/attachment.html>


More information about the lldb-dev mailing list