<div dir="ltr">I seen very similar error messages when debugging an application compiled with fission (split/dwo) debug info on Linux with a release version of LLDB compiled from ToT. When I tested the same with a debug or with a release+assert build I hit some assertion inside clang. It might worth a try to check if the same is happening in your case as it might help finding out the root cause.<div><br></div><div>In my case the issue is that we somehow end up with 2 FilldDecl object for a given field inside one of the CXXRecordDecl object and then when we are doing a pointer based lookup we will go wrong. I haven't figured out why it is happening and haven't manage to reproduce it reliably either, but plan to look into it in the near future if nobody beats me.</div><div dir="ltr"><div><br></div><div>Tamas</div></div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 21, 2015 at 4:46 PM Ramkumar Ramachandra via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So first, an addendum: I found a way to make the project build without<br>
using a symlink, and use a direct reference instead. The problem still<br>
persists. It may be that symlink is one of the problems, but it is<br>
certainly not the only problem.<br>
<br>
On Tue, Oct 20, 2015 at 8:22 PM, Greg Clayton <<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>> wrote:<br>
> int<br>
> Declaration::Compare(const Declaration& a, const Declaration& b)<br>
> {<br>
>     int result = FileSpec::Compare(a.m_file, b.m_file, true);<br>
>     if (result)<br>
<br>
Wait, won't FileSpec::Compare be true iff a.m_file is the same as<br>
b.m_file (excluding symlink resolution)? If so, why are we putting the<br>
symlink-checking logic in the true branch of the original<br>
FileSpec::Compare? Aren't we expanding the scope of what we match,<br>
instead of narrowing it?<br>
<br>
>     {<br>
>         int symlink_result = result;<br>
>         if (a.m_file.GetFilename() == b.m_file.GetFilename())<br>
>         {<br>
>             // Check if the directories in a and b are symlinks to each other<br>
>             FileSpec resolved_a;<br>
>             FileSpec resolved_b;<br>
>             if (FileSystem::ResolveSymbolicLink(a.m_file, resolved_a).Success() &&<br>
>                 FileSystem::ResolveSymbolicLink(b.m_file, resolved_b).Success())<br>
>             {<br>
>                 symlink_result = FileSpec::Compare(resolved_a, resolved_b, true);<br>
<br>
I'm confused. Shouldn't the logic be "check literal equality; if true,<br>
return immediately; if not, check equality with symlink resolution"?<br>
<br>
>             }<br>
>         }<br>
>         if (symlink_result != 0)<br>
>             return symlink_result;<br>
>     }<br>
>     if (a.m_line < b.m_line)<br>
>         return -1;<br>
>     else if (a.m_line > b.m_line)<br>
>         return 1;<br>
> #ifdef LLDB_ENABLE_DECLARATION_COLUMNS<br>
>     if (a.m_column < b.m_column)<br>
>         return -1;<br>
>     else if (a.m_column > b.m_column)<br>
>         return 1;<br>
> #endif<br>
>     return 0;<br>
> }<br>
<br>
Here's my version of the patch, although I'm not sure when the code<br>
will be reached.<br>
<br>
int<br>
Declaration::Compare(const Declaration& a, const Declaration& b)<br>
{<br>
    int result = FileSpec::Compare(a.m_file, b.m_file, true);<br>
    if (result)<br>
        return result;<br>
    if (a.m_file.GetFilename() == b.m_file.GetFilename()) {<br>
        // Check if one of the directories is a symlink to the other<br>
        int symlink_result = result;<br>
        FileSpec resolved_a;<br>
        FileSpec resolved_b;<br>
        if (FileSystem::ResolveSymbolicLink(a.m_file, resolved_a).Success() &&<br>
            FileSystem::ResolveSymbolicLink(b.m_file, resolved_b).Success())<br>
        {<br>
            symlink_result = FileSpec::Compare(resolved_a, resolved_b, true);<br>
            if (symlink_result)<br>
                return symlink_result;<br>
        }<br>
    }<br>
    if (a.m_line < b.m_line)<br>
        return -1;<br>
    else if (a.m_line > b.m_line)<br>
        return 1;<br>
#ifdef LLDB_ENABLE_DECLARATION_COLUMNS<br>
    if (a.m_column < b.m_column)<br>
        return -1;<br>
    else if (a.m_column > b.m_column)<br>
        return 1;<br>
#endif<br>
    return 0;<br>
}<br>
<br>
If you're confident that this solves a problem, I can send it as a<br>
code review or something (and set up git-svn, sigh).<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div></div></div>