<div dir="ltr"><div dir="ltr">On Wed, Jul 31, 2019 at 11:29 AM Greg Clayton via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><br>
<br>
> On Jul 31, 2019, at 10:57 AM, Raphael Isemann <<a href="mailto:teemperor@gmail.com" target="_blank">teemperor@gmail.com</a>> wrote:<br>
> <br>
> It seems that patch is lacking a test (which doesn't seem too hard to provide).<br>
<br>
I am not the original author of this patch that was causing the crash, just fixing a crash that was introduced by the patch. <br></blockquote><div><br></div><div>Perhaps we should identify the original change and revert that instead?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
I am all ears for anyone that can provide me with DWARF to help reproduce this scenario where we have a DW_CC_pass_by_value struct with no definition. Not sure how you would have a compiler that is passing a struct to a function as a parameter and yet does not emit debug info for that struct it is clearly using in the debug info.<br></blockquote><div><br></div><div>Was this something that you noticed by inspection?  It doesn't sound like it, so we should be able to reduce something from what caused it to be triggered.  lldb has been better about adding test coverage, and I think that we should be encouraging that.  It really does help make it easier to make changes to the project where we can be sure that we don't cause regressions.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<br>
> <br>
> Am Mi., 31. Juli 2019 um 18:24 Uhr schrieb Greg Clayton via<br>
> lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>>:<br>
>> <br>
>> Author: gclayton<br>
>> Date: Wed Jul 31 09:24:55 2019<br>
>> New Revision: 367441<br>
>> <br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=367441&view=rev" target="_blank" rel="noreferrer">http://llvm.org/viewvc/llvm-project?rev=367441&view=rev</a><br>
>> Log:<br>
>> Don't crash when pass by value struct has no definition.<br>
>> <br>
>> <br>
>> Modified:<br>
>>    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp<br>
>> <br>
>> Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=367441&r1=367440&r2=367441&view=diff" target="_blank" rel="noreferrer">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=367441&r1=367440&r2=367441&view=diff</a><br>
>> ==============================================================================<br>
>> --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original)<br>
>> +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Wed Jul 31 09:24:55 2019<br>
>> @@ -1010,7 +1010,7 @@ TypeSP DWARFASTParserClang::ParseTypeFro<br>
>>     if (attrs.calling_convention == llvm::dwarf::DW_CC_pass_by_value) {<br>
>>       clang::CXXRecordDecl *record_decl =<br>
>>           m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType());<br>
>> -      if (record_decl) {<br>
>> +      if (record_decl && record_decl->getDefinition()) {<br>
>>         record_decl->setHasTrivialSpecialMemberForCall();<br>
>>       }<br>
>>     }<br>
>> <br>
>> <br>
>> _______________________________________________<br>
>> lldb-commits mailing list<br>
>> <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" target="_blank" rel="noreferrer">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" target="_blank" rel="noreferrer">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature" dir="ltr">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div></div>