[Lldb-commits] [lldb] r346430 - Fix bug in PE/COFF plugin and ValueObjectVariable.

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 8 13:40:57 PST 2018


Looks like this test was testing the functionality that you changed. It it expecting that a type won't be complete until you ask for more info about it (like asking about a child). Since PDB is not completing the type up front, we need to change LLDB or make your previous case work even when handing out a forward type.

So the question is: do we expect types to be able to complete themselves on the fly anywhere? I believe we should be able to hand out a type as a forward declaration and have it complete itself at any point when it is needed. I know classes already do this when they need to know more. Maybe the AST doesn't treat enums like classes where it will complete the type through the external AST class.

The correct fix is to probably call 

bool CompilerType::GetCompleteType() const;

Before you need to access the enumerators in an enumeration.



> On Nov 8, 2018, at 1:17 PM, Zachary Turner via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> +greg.
> 
> Greg, is the test wrong here or the patch?  If it’s the test let’s just fix the test, otherwise we can revert the patch until we figure it out.
> 
> It seems related to my change to use the layout type instead of the forward type.
> 
> On Thu, Nov 8, 2018 at 1:03 PM Davide Italiano <dccitaliano at gmail.com <mailto:dccitaliano at gmail.com>> wrote:
> On Thu, Nov 8, 2018 at 12:59 PM Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote:
> >
> > I’m ooo for at least 2 hours. Is it a test failure or a compilation failure?
> 
> 
> FAIL: test_with_run_command_gmodules (TestTypeCompletion.TypeCompletionTestCase)
> 
>    Check that types only get completed when necessary.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/lldbtest.py",
> line 1744, in test_method
>     return attrvalue(self)
>   File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/decorators.py",
> line 113, in wrapper
>     func(*args, **kwargs)
>   File "/Users/davide/work/llvm-project-20170507/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py",
> line 55, in test_with_run_command 'vector<T> complete but it should
> not be')
> AssertionError: True is not False : vector<T> complete but it should not be
> 
> 
> Do you want me to revert this in the meanwhile?
> 
> --Davide
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181108/b3eb99b6/attachment.html>


More information about the lldb-commits mailing list