On 01/08/2019 00:14, Jim Ingham via lldb-commits wrote:


On Jul 31, 2019, at 12:50 PM, via lldb-commits <lldb-commits@lists.llvm.org> 
wrote:



-----Original Message-----
From: lldb-commits [mailto:lldb-commits-boun...@lists.llvm.org] On Behalf
Of Greg Clayton via lldb-commits
Sent: Wednesday, July 31, 2019 2:29 PM
To: Raphael Isemann
Cc: lldb-commits
Subject: Re: [Lldb-commits] [lldb] r367441 - Don't crash when pass by
value struct has no definition.



On Jul 31, 2019, at 10:57 AM, Raphael Isemann <teempe...@gmail.com>
wrote:

It seems that patch is lacking a test (which doesn't seem too hard to
provide).

I am not the original author of this patch that was causing the crash,
just fixing a crash that was introduced by the patch.

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.

Presumably one could construct a type DIE by hand which contains a DW_AT_declaration and a DW_AT_calling_convention. Even if this isn't the exact same way how the original bug came to be, it is a still a valid thing to test, and so it's better than no test at all.

That said, if the problem here is that the type is not fully defined, I am wondering if it wouldn't be better to move the calling convention stuff into the if(!is_forward_declaration) block right above it.
pl
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to