<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">In the meanwhile, here is the crash backtrace when it crashe ( the scenario is: gdb is debugging lldb which debugs a debug version of codelite ;) )</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><a href="http://pastebin.com/PVcZeQFk">http://pastebin.com/PVcZeQFk</a><br></div><div class="gmail_default"><font face="verdana, sans-serif"><br>
</font></div><div class="gmail_default"><font face="verdana, sans-serif">HTH</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 12:19 AM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can check this yourself by searching for "wxClientDataContainer" in an command line LLDB session that has your debug symbols loaded for codelight:<br>
<br>
% lldb /path/to/codelight<br>
(lldb) image lookup --type wxClientDataContainer<br>
<br>
See if you see any complete definitions that are printed out. If so, then solution #1 will probably get around this issue for the moment. But we should still not crash even if we do look for a complete "wxClientDataContainer" definition and don't find one (also part of the fix for solution #1).<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Apr 8, 2014, at 2:16 PM, Eran Ifrah <<a href="mailto:eran.ifrah@gmail.com">eran.ifrah@gmail.com</a>> wrote:<br>
<br>
><br>
><br>
><br>
> On Wed, Apr 9, 2014 at 12:11 AM, Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br>
> This is a serious problem with the debug info that GCC and Clang recently started to emit to try and save space by omitting important debug info.<br>
><br>
> The problem is:<br>
><br>
> class A : public B<br>
> {<br>
> }<br>
><br>
> The debug info for "A" is complete, but since no one used stuff from class "B" they decided to just forward declare "B". Why is this a problem? Because we are trying to reconstruct a class definition of "A" using incomplete information.<br>
><br>
> There are two things that can fix this:<br>
> 1 - Modify the DWARF parser to look for a complete version of "B" elsewhere in the current executable's debug info (but there might not be one).<br>
> 2 - Change flags to GCC to have it not elide this debug info (don't know what these flags would be, you will need to find out if there is such a flag).<br>
> 3 - Just start and complete the definition for "B" and pretend it is a class that contains nothing<br>
><br>
> Solution #1 is might alleviate some of the problems, but often will result in a failure when there is no complete definition of "B".<br>
><br>
> Solution #2 is the best solution, but this doesn't mean that people won't run into this crasher when debugging random code.<br>
><br>
> Solution #3 is dangerous because you might have foo.cpp whose debug info has complete definitions for A and B, and bar.cpp that has a complete definition for A but not for B. Then you write and expression that uses an instance of "A" from foo.cpp and uses it with an instance of "A" from bar.cpp and the expression parser will now complain that is has two competing definitions for class "A" that don't match.<br>
><br>
> Solution #1 should probably be tried first. If you can send me the executable you were debugging with debug info inside it, I can look and see if solution #1 will fix your current problem. We should avoid crashing, that is for sure.<br>
><br>
> This might be a slight problem since I was trying to debug codelite.<br>
> With debug symbols it can go up to 200MB and it consists of way too many shared libraries<br>
> Let me first to try and narrowing it to something minimalistic<br>
><br>
><br>
> Greg<br>
><br>
> On Apr 8, 2014, at 1:49 PM, Eran Ifrah <<a href="mailto:eran.ifrah@gmail.com">eran.ifrah@gmail.com</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > While debugging a real world application (codelite) I placed a breakpoint in the 'OnAbout' function<br>
> > attempting to view any of the local variables resulted in crash, see below:<br>
> ><br>
> > Process 24146 stopped<br>
> > * thread #1: tid = 24146, 0x00000000006667f6 codelite`clMainFrame::OnAbout(this=0x000000000215f5c0, (null)=0x00007fffa6fd2640) + 66 at frame.cpp:1794, name = 'codelite', stop reason = step over<br>
> > frame #0: 0x00000000006667f6 codelite`clMainFrame::OnAbout(this=0x000000000215f5c0, (null)=0x00007fffa6fd2640) + 66 at frame.cpp:1794<br>
> > 1791 wxString mainTitle;<br>
> > 1792 mainTitle = CODELITE_VERSION_STR;<br>
> > 1793<br>
> > -> 1794 AboutDlg dlg(this, mainTitle);<br>
> > 1795 dlg.SetInfo(mainTitle);<br>
> > 1796 dlg.ShowModal();<br>
> > 1797 }<br>
> > (lldb) p dlg<br>
> > error: libwx_gtk2u_unofficial_core-3.0.so.0 DWARF DIE at 0x030ac4cc for class 'wxSizer' has a base class 'wxClientDataContainer' that is a forward declaration, not a complete definition.<br>
> > Please file a bug against the compiler and include the preprocessed output for /home/david/devel/packages/wx/3.0-2/wxwidgets3.0-3.0.0/objs_gtk_sh/../src/common/sizer.cpp<br>
> > Segmentation fault<br>
> ><br>
> > From the segfault message, I understand that this is a bug with gcc<br>
> > Still, is there a way to suppress this error by telling lldb to silently ignore this? ( I prefer it to display nothing instead of crashing and taking down codelite with it )<br>
> ><br>
> > Thanks<br>
> ><br>
> > --<br>
> > Eran Ifrah<br>
> > Author of codelite, a cross platform open source C/C++ IDE: <a href="http://www.codelite.org" target="_blank">http://www.codelite.org</a><br>
> > wxCrafter, a wxWidgets RAD: <a href="http://wxcrafter.codelite.org" target="_blank">http://wxcrafter.codelite.org</a><br>
> > _______________________________________________<br>
> > lldb-dev mailing list<br>
> > <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Eran Ifrah<br>
> Author of codelite, a cross platform open source C/C++ IDE: <a href="http://www.codelite.org" target="_blank">http://www.codelite.org</a><br>
> wxCrafter, a wxWidgets RAD: <a href="http://wxcrafter.codelite.org" target="_blank">http://wxcrafter.codelite.org</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Eran Ifrah<br>Author of codelite, a cross platform open source C/C++ IDE: <a href="http://www.codelite.org" target="_blank">http://www.codelite.org</a><br>
<div>wxCrafter, a wxWidgets RAD: http://<a href="http://wxcrafter.codelite.org" target="_blank">wxcrafter.codelite.org</a></div></div>
</div>