Re: [Lldb-commits] [PATCH] D19685: Fix NetBSD build with CMake 3.5.2

2016-04-29 Thread Pavel Labath via lldb-commits
labath added a reviewer: zturner.
labath added a comment.

cmake 2.8 is still widely used (Ubuntu 14.04 LTS for one, but there are people 
around using even longer lived versions of RedHat). I don't think we should 
bump the version over a tiny detail like this. I'm pretty sure there is a way 
to rewrite the target rules to be compatible with both cmake 2.8 and 3+. Adding 
zachary for more insight.

A couple of other random thoughts:

- LLVM specifies the minimum version as 2.8.12.2. I think it's safe to go up to 
that point. Would that make any difference in this case?
- For the NetBSD target, I think you are free to choose whichever minimal 
version of cmake you like (although I would suggest to not go too far). 
However, you still need to make sure the build works with cmake 2.8 for others. 
Is it possible to fix your libexecinfo problem by conditionally changing the 
minimum version, or setting setting some policy?


Repository:
  rL LLVM

http://reviews.llvm.org/D19685



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19685: Fix NetBSD build with CMake 3.5.2

2016-04-29 Thread Zachary Turner via lldb-commits
zturner added a subscriber: zturner.
zturner added a comment.

Agree, the build should work with 2.8.12, but feel free to take advantage
of newer cmake features if they're present


Repository:
  rL LLVM

http://reviews.llvm.org/D19685



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19690: Split out console and file writing cases in TestCommandScriptImmediateOutput

2016-04-29 Thread Francis Ricci via lldb-commits
fjricci added inline comments.


Comment at: 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py:29
@@ -30,1 +28,3 @@
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to the console."""
+self.launch(timeout=5)
 

granata.enrico wrote:
> Can we raise this a little bit? I worry that going all the way from 60 down 
> to 5 might cause this test to start failing more in load scenarios. Maybe 10 
> would be a better value?
I chose 5 because your original console unit test used 5. I changed it to 60 
when I added the file aspects. I don't have a problem changing it to 10 though


Comment at: 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py:43
@@ +42,3 @@
+@expectedFailureAll(oslist=["freebsd","linux"], 
bugnumber="llvm.org/pr26139")
+def test_command_script_immediate_output_file (self):
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to a file."""

granata.enrico wrote:
> Feel free to make the file version non pexpect-based if you want
I ended up finding clayborg's sendline bug-fix, so pexpect should be fine 
(actually probably preferred)


http://reviews.llvm.org/D19690



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r267861 - Revert "Fixed a bug where const this would cause parser errors about $__lldb_expr."

2016-04-29 Thread Sean Callanan via lldb-commits
Pavel,

thank you for reverting this.  I have no idea how I was able to run the 
testsuite with this code still in there – I’ll 

Sean

> On Apr 28, 2016, at 1:16 AM, Pavel Labath via lldb-commits 
>  wrote:
> 
> Author: labath
> Date: Thu Apr 28 03:16:19 2016
> New Revision: 267861
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=267861&view=rev
> Log:
> Revert "Fixed a bug where const this would cause parser errors about 
> $__lldb_expr."
> 
> This reverts commit r267833 as it breaks the build. It looks like some work 
> in progress got
> committed together with the actual fix, but I'm not sure which one is which, 
> so I'll revert the
> whole patch and let author resumbit it after fixing the build error.
> 
> Removed:
>lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
>
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
> Modified:
>lldb/trunk/source/Core/Scalar.cpp
>lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>lldb/trunk/source/Expression/LLVMUserExpression.cpp
>lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
>lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
> 
> Removed: 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile?rev=267860&view=auto
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
> (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
> (removed)
> @@ -1,8 +0,0 @@
> -LEVEL = ../../../make
> -CXX_SOURCES := main.cpp
> -CXXFLAGS += -std=c++11
> -include $(LEVEL)/Makefile.rules
> -
> -cleanup:
> - rm -f Makefile *.d
> -
> 
> Removed: 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py?rev=267860&view=auto
> ==
> --- 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>  (original)
> +++ 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>  (removed)
> @@ -1,4 +0,0 @@
> -from lldbsuite.test import lldbinline
> -from lldbsuite.test import decorators
> -
> -lldbinline.MakeInlineTest(__file__, globals(), 
> [decorators.expectedFailureAll(oslist=["windows"], 
> bugnumber="llvm.org/pr24764")] )
> 
> Removed: 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp?rev=267860&view=auto
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
> (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
> (removed)
> @@ -1,23 +0,0 @@
> -//===-- main.cpp *- C++ 
> -*-===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===--===//
> -
> -#include 
> -
> -class foo {
> -public:
> -  template  T func(T x) const {
> -return x+2; //% self.expect("expr 2+3", DATA_TYPES_DISPLAYED_CORRECTLY, 
> substrs = ["5"])
> -  }
> -};
> -
> -int i;
> -
> -int main() {
> -  return foo().func(i);
> -}
> 
> Modified: lldb/trunk/source/Core/Scalar.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=267861&r1=267860&r2=267861&view=diff
> ==
> --- lldb/trunk/source/Core/Scalar.cpp (original)
> +++ lldb/trunk/source/Core/Scalar.cpp Thu Apr 28 03:16:19 2016
> @@ -78,74 +78,6 @@ PromoteToMaxType
> return Scalar::e_void;
> }
> 
> -llvm::APInt
> -Scalar::APIntWithTypeAndValue(Scalar::Type type, uint64_t raw_value)
> -{
> -//  APInt(unsigned numBits, uint64_t val, bool isSigned = false)
> -unsigned num_bits = 1;
> -bool is_signed = false;
> -
> -switch (type)
> -{
> -case Scalar::e_void:
> -break;
> -case Scalar::e_sint:
> -is_signed = true;
> -num_bits = sizeof(sint_t) * 8;
> -break;
> -case Scalar::e_uint:
> -is_signed = false;
> -num_bits = sizeof(uint_t) * 8;
> -break;
> -case Scalar::e_slong:
> -is_signed = true;
> -num_bits = sizeof(slong_t

Re: [Lldb-commits] [PATCH] D19690: Split out console and file writing cases in TestCommandScriptImmediateOutput

2016-04-29 Thread Enrico Granata via lldb-commits
granata.enrico accepted this revision.
This revision is now accepted and ready to land.


Comment at: 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py:29
@@ -30,1 +28,3 @@
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to the console."""
+self.launch(timeout=5)
 

fjricci wrote:
> granata.enrico wrote:
> > Can we raise this a little bit? I worry that going all the way from 60 down 
> > to 5 might cause this test to start failing more in load scenarios. Maybe 
> > 10 would be a better value?
> I chose 5 because your original console unit test used 5. I changed it to 60 
> when I added the file aspects. I don't have a problem changing it to 10 though
10 is probably fine - the file version also seems to use 10, so I'd just make 
them consistent. Other than that LGTM.


http://reviews.llvm.org/D19690



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19690: Split out console and file writing cases in TestCommandScriptImmediateOutput

2016-04-29 Thread Francis Ricci via lldb-commits
fjricci updated this revision to Diff 55619.
fjricci added a comment.

Update timeout to 10 seconds for console case


http://reviews.llvm.org/D19690

Files:
  
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py

Index: 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
===
--- 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
+++ 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
@@ -24,17 +24,25 @@
 @skipIfRemote # test not remote-ready llvm.org/pr24813
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need 
a pexpect replacement for windows")
 @expectedFailureAll(oslist=["freebsd","linux"], 
bugnumber="llvm.org/pr26139")
-def test_command_script_immediate_output (self):
-"""Test that LLDB correctly allows scripted commands to set an 
immediate output file."""
-self.launch(timeout=60)
+def test_command_script_immediate_output_console (self):
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to the console."""
+self.launch(timeout=10)
 
 script = os.path.join(os.getcwd(), 'custom_command.py')
 prompt = "\(lldb\) "
-  
+
 self.sendline('command script import %s' % script, patterns=[prompt])
 self.sendline('command script add -f custom_command.command_function 
mycommand', patterns=[prompt])
 self.sendline('mycommand', patterns='this is a test string, just a 
test string')
 self.sendline('command script delete mycommand', patterns=[prompt])
+self.quit(gracefully=False)
+
+@skipIfRemote # test not remote-ready llvm.org/pr24813
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need 
a pexpect replacement for windows")
+@expectedFailureAll(oslist=["freebsd","linux"], 
bugnumber="llvm.org/pr26139")
+def test_command_script_immediate_output_file (self):
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to a file."""
+self.launch(timeout=10)
 
 test_files = {os.path.join(os.getcwd(), 'read.txt'):'r',
   os.path.join(os.getcwd(), 'write.txt')   :'w',
@@ -50,6 +58,11 @@
 with open(path, 'w+') as init:
 init.write(starter_string)
 
+script = os.path.join(os.getcwd(), 'custom_command.py')
+prompt = "\(lldb\) "
+
+self.sendline('command script import %s' % script, patterns=[prompt])
+
 self.sendline('command script add -f custom_command.write_file 
mywrite', patterns=[prompt])
 for path, mode in test_files.iteritems():
 command = 'mywrite "' + path + '" ' + mode


Index: packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
===
--- packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
+++ packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
@@ -24,17 +24,25 @@
 @skipIfRemote # test not remote-ready llvm.org/pr24813
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
 @expectedFailureAll(oslist=["freebsd","linux"], bugnumber="llvm.org/pr26139")
-def test_command_script_immediate_output (self):
-"""Test that LLDB correctly allows scripted commands to set an immediate output file."""
-self.launch(timeout=60)
+def test_command_script_immediate_output_console (self):
+"""Test that LLDB correctly allows scripted commands to set immediate output to the console."""
+self.launch(timeout=10)
 
 script = os.path.join(os.getcwd(), 'custom_command.py')
 prompt = "\(lldb\) "
-  
+
 self.sendline('command script import %s' % script, patterns=[prompt])
 self.sendline('command script add -f custom_command.command_function mycommand', patterns=[prompt])
 self.sendline('mycommand', patterns='this is a test string, just a test string')
 self.sendline('command script delete mycommand', patterns=[prompt])
+self.quit(gracefully=False)
+
+@skipIfRemote # test not remote-ready llvm.org/pr24813
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+@expectedFailureAll(oslist=["freebsd","linux"], bugnumber="llvm.org/pr26139")
+def test_command_script_immediate_out

Re: [Lldb-commits] [lldb] r267861 - Revert "Fixed a bug where const this would cause parser errors about $__lldb_expr."

2016-04-29 Thread Sean Callanan via lldb-commits
I think I’ve figured it out.  The error was in the APInt code (which shouldn’t 
have been committed).
It required a corresponding header change which I hadn’t committed (the change 
I wanted to commit had no corresponding header changes) but which of course 
were present locally.

Sean

> On Apr 29, 2016, at 10:09 AM, Sean Callanan via lldb-commits 
>  wrote:
> 
> Pavel,
> 
> thank you for reverting this.  I have no idea how I was able to run the 
> testsuite with this code still in there – I’ll 
> 
> Sean
> 
>> On Apr 28, 2016, at 1:16 AM, Pavel Labath via lldb-commits 
>>  wrote:
>> 
>> Author: labath
>> Date: Thu Apr 28 03:16:19 2016
>> New Revision: 267861
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=267861&view=rev
>> Log:
>> Revert "Fixed a bug where const this would cause parser errors about 
>> $__lldb_expr."
>> 
>> This reverts commit r267833 as it breaks the build. It looks like some work 
>> in progress got
>> committed together with the actual fix, but I'm not sure which one is which, 
>> so I'll revert the
>> whole patch and let author resumbit it after fixing the build error.
>> 
>> Removed:
>>   lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
>>   
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>>   lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
>> Modified:
>>   lldb/trunk/source/Core/Scalar.cpp
>>   lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>>   lldb/trunk/source/Expression/LLVMUserExpression.cpp
>>   lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
>>   lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
>> 
>> Removed: 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile?rev=267860&view=auto
>> ==
>> --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
>> (original)
>> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
>> (removed)
>> @@ -1,8 +0,0 @@
>> -LEVEL = ../../../make
>> -CXX_SOURCES := main.cpp
>> -CXXFLAGS += -std=c++11
>> -include $(LEVEL)/Makefile.rules
>> -
>> -cleanup:
>> -rm -f Makefile *.d
>> -
>> 
>> Removed: 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py?rev=267860&view=auto
>> ==
>> --- 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>>  (original)
>> +++ 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>>  (removed)
>> @@ -1,4 +0,0 @@
>> -from lldbsuite.test import lldbinline
>> -from lldbsuite.test import decorators
>> -
>> -lldbinline.MakeInlineTest(__file__, globals(), 
>> [decorators.expectedFailureAll(oslist=["windows"], 
>> bugnumber="llvm.org/pr24764")] )
>> 
>> Removed: 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp?rev=267860&view=auto
>> ==
>> --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
>> (original)
>> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
>> (removed)
>> @@ -1,23 +0,0 @@
>> -//===-- main.cpp *- C++ 
>> -*-===//
>> -//
>> -// The LLVM Compiler Infrastructure
>> -//
>> -// This file is distributed under the University of Illinois Open Source
>> -// License. See LICENSE.TXT for details.
>> -//
>> -//===--===//
>> -
>> -#include 
>> -
>> -class foo {
>> -public:
>> -  template  T func(T x) const {
>> -return x+2; //% self.expect("expr 2+3", DATA_TYPES_DISPLAYED_CORRECTLY, 
>> substrs = ["5"])
>> -  }
>> -};
>> -
>> -int i;
>> -
>> -int main() {
>> -  return foo().func(i);
>> -}
>> 
>> Modified: lldb/trunk/source/Core/Scalar.cpp
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=267861&r1=267860&r2=267861&view=diff
>> ==
>> --- lldb/trunk/source/Core/Scalar.cpp (original)
>> +++ lldb/trunk/source/Core/Scalar.cpp Thu Apr 28 03:16:19 2016
>> @@ -78,74 +78,6 @@ PromoteToMaxType
>>return Scalar::e_void;
>> }
>> 
>> -llvm::APInt
>> -Scalar::APIntWithTypeAndValue(Scalar::Type type, uint64_t raw_value)
>> -{
>> -//  APInt(unsigned numBits, uint64_t val, bool isSigned = false)
>> -unsigned num_bits = 1;
>> -

Re: [Lldb-commits] [PATCH] D18017: Eliminate the TestStarted-XXX and TestFinished-XXX files from the test traces

2016-04-29 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Can we close this now?


http://reviews.llvm.org/D18017



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19690: Split out console and file writing cases in TestCommandScriptImmediateOutput

2016-04-29 Thread Enrico Granata via lldb-commits
granata.enrico added a comment.

LGTM


http://reviews.llvm.org/D19690



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19680: XFail TestBitfields.py Python API tests.

2016-04-29 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Sorry I missed, looked good!  (We are failing this on OS X right now as well 
since it also started failing there).


Repository:
  rL LLVM

http://reviews.llvm.org/D19680



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D18017: Eliminate the TestStarted-XXX and TestFinished-XXX files from the test traces

2016-04-29 Thread Adrian McCarthy via lldb-commits
amccarth closed this revision.
amccarth added a comment.

This was submitted last month.  r263122


http://reviews.llvm.org/D18017



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19685: Fix NetBSD build with CMake 3.5.2

2016-04-29 Thread Greg Clayton via lldb-commits
clayborg resigned from this revision.
clayborg removed a reviewer: clayborg.
clayborg added a comment.

I will the unix / cmake experts make the decision here.


Repository:
  rL LLVM

http://reviews.llvm.org/D19685



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r268083 - [fix] Fixed a bug where const this would cause parser errors about $__lldb_expr.

2016-04-29 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Fri Apr 29 13:09:03 2016
New Revision: 268083

URL: http://llvm.org/viewvc/llvm-project?rev=268083&view=rev
Log:
[fix] Fixed a bug where const this would cause parser errors about $__lldb_expr.

In templated const functions, trying to run an expression would produce the
error

error: out-of-line definition of '$__lldb_expr' does not match any declaration
in 'foo' member declaration does not match because it is const qualified
error: 1 error parsing expression

which is no good.  It turned out we don't actually need to worry about "const,"
we just need to be consistent about the declaration of the expression and the
FunctionDecl we inject into the class for "this."

Also added a test case.



Added:
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
Modified:
lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Expression/LLVMUserExpression.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp

Modified: lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h?rev=268083&r1=268082&r2=268083&view=diff
==
--- lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h Fri Apr 29 
13:09:03 2016
@@ -54,7 +54,6 @@ public:
 
 bool GetText (std::string &text, 
   lldb::LanguageType wrapping_language, 
-  bool const_object,
   bool static_method,
   ExecutionContext &exe_ctx) const;
 

Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile?rev=268083&view=auto
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
(added)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile Fri 
Apr 29 13:09:03 2016
@@ -0,0 +1,8 @@
+LEVEL = ../../../make
+CXX_SOURCES := main.cpp
+CXXFLAGS += -std=c++11
+include $(LEVEL)/Makefile.rules
+
+cleanup:
+   rm -f Makefile *.d
+

Added: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py?rev=268083&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py 
(added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py 
Fri Apr 29 13:09:03 2016
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), 
[decorators.expectedFailureAll(oslist=["windows"], 
bugnumber="llvm.org/pr24764")] )

Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp?rev=268083&view=auto
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
(added)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp Fri 
Apr 29 13:09:03 2016
@@ -0,0 +1,23 @@
+//===-- main.cpp *- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include 
+
+class foo {
+public:
+  template  T func(T x) const {
+return x+2; //% self.expect("expr 2+3", DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ["5"])
+  }
+};
+
+int i;
+
+int main() {
+  return foo().func(i);
+}

Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=268083&r1=268082&r2=268083&view=diff
==
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Fri Apr 29 13:09:03 
2016
@@ -195,7 +195,7 @@ AddLocalVariableDecls(const lldb::Variab
 }
 }
 
-bool ExpressionSo

[Lldb-commits] Buildbot numbers for the week of 4/10/2016 - 4/16/2016

2016-04-29 Thread Galina Kistanova via lldb-commits
Hello everyone,

Below are some buildbot numbers for the week of 4/10/2016 - 4/16/2016.

Thanks

Galina


"Status change ratio" by active builder (percent of builds that changed the
builder status from greed to red or from red to green):

 buildername| builds |
changes | status change ratio
++-+-
 perf-x86_64-penryn-O3-polly| 49 |
34 |69.4
 lldb-windows7-android  |100 |
41 |41.0
 clang-ppc64le-linux-lnt| 78 |
21 |26.9
 sanitizer-x86_64-linux | 84 |
17 |20.2
 lldb-x86_64-darwin-13.4|126 |
22 |17.5
 clang-ppc64be-linux-multistage |118 |
18 |15.3
 llvm-mips-linux| 66 |
10 |15.2
 lldb-x86_64-ubuntu-14.04-cmake |257 |
37 |14.4
 clang-cmake-mipsel | 15
|   2 |13.3
 clang-cmake-aarch64-full   | 54
|   6 |11.1
 clang-x64-ninja-win7   |165 |
18 |10.9
 clang-cmake-mips   | 75
|   8 |10.7
 clang-x86-win2008-selfhost |102 |
10 | 9.8
 lldb-x86_64-ubuntu-14.04-android   |123 |
12 | 9.8
 sanitizer-x86_64-linux-fast|167 |
16 | 9.6
 sanitizer-x86_64-linux-bootstrap   | 45
|   4 | 8.9
 llvm-clang-lld-x86_64-debian-fast  |161 |
14 | 8.7
 sanitizer-ppc64be-linux| 93
|   8 | 8.6
 clang-cmake-armv7-a15-selfhost-neon| 24
|   2 | 8.3
 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast   |379 |
31 | 8.2
 clang-ppc64le-linux|197 |
16 | 8.1
 perf-x86_64-penryn-O3-polly-fast   | 25
|   2 | 8.0
 clang-ppc64be-linux-lnt|225 |
18 | 8.0
 clang-cmake-aarch64-quick  |155 |
12 | 7.7
 clang-cmake-thumbv7-a15-full-sh| 26
|   2 | 7.7
 lld-x86_64-win7|279 |
20 | 7.2
 clang-atom-d525-fedora-rel | 57
|   4 | 7.0
 clang-cmake-armv7-a15-selfhost | 30
|   2 | 6.7
 clang-cmake-aarch64-42vma  |153 |
10 | 6.5
 perf-x86_64-penryn-O3  | 49
|   3 | 6.1
 clang-ppc64be-linux|269 |
16 | 5.9
 perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable |191 |
11 | 5.8
 lld-x86_64-freebsd |173 |
10 | 5.8
 clang-cmake-armv7-a15-full | 75
|   4 | 5.3
 clang-cmake-thumbv7-a15|155
|   8 | 5.2
 clang-s390x-linux  |272 |
14 | 5.1
 lld-x86_64-darwin13|254 |
13 | 5.1
 clang-x86_64-debian-fast   |126
|   6 | 4.8
 sanitizer-x86_64-linux-fuzzer  |169
|   8 | 4.7
 clang-cmake-armv7-a15  |129
|   6 | 4.7
 sanitizer-ppc64le-linux| 66
|   3 | 4.5
 lldb-amd64-ninja-netbsd7   |141
|   6 | 4.3
 clang-bpf-build|294 |
12 | 4.1
 sanitizer-windows  |340 |
14 | 4.1
 polly-amd64-linux  |211
|   8 | 3.8
 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast |408 |
14 | 3.4
 lldb-x86-windows-msvc2015

[Lldb-commits] Buildbot numbers for the last week of 4/17/2016 - 4/23/2016

2016-04-29 Thread Galina Kistanova via lldb-commits
Hello everyone,

Below are some buildbot numbers for the last week of 4/17/2016 - 4/23/2016.

Thanks

Galina


"Status change ratio" by active builder (percent of builds that changed the
builder status from greed to red or from red to green):

 buildername| builds |
changes | status change ratio
++-+-
 perf-x86_64-penryn-O3-polly| 55 |
45 |81.8
 clang-ppc64le-linux-lnt| 71 |
30 |42.3
 lldb-x86_64-darwin-13.4|138 |
54 |39.1
 lldb-windows7-android  |114 |
32 |28.1
 sanitizer-x86_64-linux | 89 |
18 |20.2
 llvm-mips-linux| 65 |
12 |18.5
 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx03 | 24
|   4 |16.7
 clang-x86-win2008-selfhost |153 |
22 |14.4
 sanitizer-ppc64le-linux| 44
|   6 |13.6
 clang-cmake-mipsel | 16
|   2 |12.5
 clang-cmake-armv7-a15-selfhost | 32
|   4 |12.5
 clang-x64-ninja-win7   |217 |
26 |12.0
 clang-atom-d525-fedora-rel | 67
|   8 |11.9
 clang-ppc64be-linux-multistage | 94
|   9 | 9.6
 clang-ppc64le-linux|189 |
18 | 9.5
 clang-native-aarch64-full  | 11
|   1 | 9.1
 clang-ppc64be-linux-lnt|244 |
22 | 9.0
 clang-cmake-armv7-a15  |142 |
12 | 8.5
 llvm-clang-lld-x86_64-debian-fast  |166 |
14 | 8.4
 clang-cmake-thumbv7-a15-full-sh| 24
|   2 | 8.3
 perf-x86_64-penryn-O3-polly-fast   | 25
|   2 | 8.0
 sanitizer-ppc64be-linux|103
|   8 | 7.8
 lld-x86_64-win7|287 |
22 | 7.7
 clang-cmake-aarch64-42vma  |169 |
12 | 7.1
 clang-cmake-mips   | 98
|   7 | 7.1
 clang-cmake-armv7-a15-full | 88
|   6 | 6.8
 perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable |205 |
14 | 6.8
 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast   |425 |
28 | 6.6
 clang-cmake-thumbv7-a15|160 |
10 | 6.3
 sanitizer-x86_64-linux-fast|195 |
12 | 6.2
 lld-x86_64-darwin13|303 |
18 | 5.9
 clang-cmake-aarch64-quick  |174 |
10 | 5.7
 sanitizer-windows  |370 |
20 | 5.4
 clang-cmake-aarch64-full   | 58
|   3 | 5.2
 clang-s390x-linux  |242 |
12 | 5.0
 lld-x86_64-freebsd |210 |
10 | 4.8
 clang-ppc64be-linux|295 |
14 | 4.7
 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast |433 |
20 | 4.6
 lldb-x86_64-ubuntu-14.04-android   |136
|   6 | 4.4
 sanitizer-x86_64-linux-bootstrap   | 50
|   2 | 4.0
 clang-bpf-build|319 |
12 | 3.8
 clang-x86_64-linux-selfhost-modules|241
|   9 | 3.7
 lldb-x86_64-ubuntu-14.04-cmake |274
|   9 | 3.3
 clang-x86_64-debian-fast   |129
|   4 | 3.1
 llvm-hexagon-elf   |254
|   8 | 3.1
 perf-x86_64-penryn-O3-polly-unprofitable   |199
|   6 | 3.0
 sanitizer-x86_64-linux-autoconf

[Lldb-commits] [lldb] r268098 - Make sure LLDB can deal with forward declarations to enums without crashing or asserting.

2016-04-29 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Fri Apr 29 15:48:39 2016
New Revision: 268098

URL: http://llvm.org/viewvc/llvm-project?rev=268098&view=rev
Log:
Make sure LLDB can deal with forward declarations to enums without crashing or 
asserting.

 


Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py?rev=268098&r1=268097&r2=268098&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py 
Fri Apr 29 15:48:39 2016
@@ -63,7 +63,14 @@ class EnumTypesTestCase(TestBase):
 'Sunday',
 'kNumDays',
 '5'];
-
+   
  
+# Make sure a pointer to an anonymous enum type does crash LLDB and 
displays correctly using
+# frame variable and expression commands
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops *', 'f.op', '0x'])
+self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops', '*f.op', ''])
+self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['ops *', '$', '0x'])
+self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['error:'], error = True)
+
 bkpt = self.target().FindBreakpointByID(bkpt_id)
 for enum_value in enum_values:
 self.expect("frame variable day", 'check for valid enumeration 
value',

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c?rev=268098&r1=268097&r2=268098&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c Fri Apr 
29 15:48:39 2016
@@ -8,6 +8,15 @@
 
//===--===//
 #include 
 
+#include 
+
+// Forward declare an enumeration (only works in C, not C++)
+typedef enum ops ops;
+
+struct foo {
+   ops *op;
+};
+
 int main (int argc, char const *argv[])
 {
 enum days {
@@ -21,6 +30,8 @@ int main (int argc, char const *argv[])
 kNumDays
 };
 enum days day;
+struct foo f;
+   f.op = NULL;
 for (day = Monday - 1; day <= kNumDays + 1; day++)
 {
 printf("day as int is %i\n", (int)day); // Set break point at this 
line.

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=268098&r1=268097&r2=268098&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri Apr 
29 15:48:39 2016
@@ -1011,9 +1011,18 @@ DWARFASTParserClang::ParseTypeFromDWARF
 }
 
 if (!enumerator_clang_type)
-enumerator_clang_type = 
m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize (NULL,
-   
 DW_ATE_signed,
-   
 byte_size * 8);
+{
+if (byte_size > 0)
+{
+enumerator_clang_type = 
m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize(NULL,
+   
DW_ATE_signed,
+   
byte_size * 8);
+}
+else
+{
+enumerator_clang_type = 
m_ast.GetBasicType(eBasicTypeInt);
+}
+}
 
   

[Lldb-commits] [lldb] r268101 - Fix TestGetVariables.py so it works correctly. We had duplicate static values showing up as we would find static variables in the Block and also in the compile unit. We

2016-04-29 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Fri Apr 29 16:00:38 2016
New Revision: 268101

URL: http://llvm.org/viewvc/llvm-project?rev=268101&view=rev
Log:
Fix TestGetVariables.py so it works correctly. We had duplicate static values 
showing up as we would find static variables in the Block and also in the 
compile unit. We now make sure a variable hasn't been added to the list before 
we add it.


Modified:
lldb/trunk/source/API/SBFrame.cpp

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=268101&r1=268100&r2=268101&view=diff
==
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Fri Apr 29 16:00:38 2016
@@ -10,6 +10,7 @@
 // C Includes
 // C++ Includes
 #include 
+#include 
 #include 
 
 // Other libraries and framework includes
@@ -1142,7 +1143,8 @@ SBFrame::GetVariables (const lldb::SBVar
  arguments, locals,
  statics, in_scope_only,
  include_runtime_support_values, use_dynamic);
-
+
+std::set variable_set;
 Process *process = exe_ctx.GetProcessPtr();
 if (target && process)
 {
@@ -1186,6 +1188,12 @@ SBFrame::GetVariables (const lldb::SBVar
 }
 if (add_variable)
 {
+// Only add variables once so we don't end 
up with duplicates
+if (variable_set.find(variable_sp) == 
variable_set.end())
+variable_set.insert(variable_sp);
+else
+continue;
+
 if (in_scope_only && 
!variable_sp->IsInScope(frame))
 continue;
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r268110 - Watch out for compilers that generate bad bitfield info. If the bit size of a bitfield member doesn't lie within the bit bounds of the type itself, just leave it out so

2016-04-29 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Fri Apr 29 16:26:46 2016
New Revision: 268110

URL: http://llvm.org/viewvc/llvm-project?rev=268110&view=rev
Log:
Watch out for compilers that generate bad bitfield info. If the bit size of a 
bitfield member doesn't lie within the bit bounds of the type itself, just 
leave it out so we don't get clang asserting and killing our IDE when it gets 
unhappy with the information.

https://llvm.org/bugs/show_bug.cgi?id=27515



Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=268110&r1=268109&r2=268110&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py 
Fri Apr 29 16:26:46 2016
@@ -22,7 +22,6 @@ class BitfieldsTestCase(TestBase):
 
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
 @skipIf("llvm.org/pr27510", oslist=["linux"], compiler="clang", 
compiler_version=[">=", "3.9"]) # expectedFailure, skip to avoid crash
-@skipIf("llvm.org/pr27515", oslist=["macosx"]) # Assertion failed: (Offset 
>= Size), function insertPadding CGRecordLayoutBuilder.cpp
 def test_and_run_command(self):
 """Test 'frame variable ...' on a variable with bitfields."""
 self.build()

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=268110&r1=268109&r2=268110&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri Apr 
29 16:26:46 2016
@@ -2645,6 +2645,10 @@ DWARFASTParserClang::ParseChildMembers(c
 if (!parent_die)
 return 0;
 
+// Get the parent byte size so we can verify any members will fit
+const uint64_t parent_byte_size = 
parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX) * 8;
+const uint64_t parent_bit_size = parent_byte_size == UINT64_MAX ? 
UINT64_MAX : parent_byte_size * 8;
+
 uint32_t member_idx = 0;
 BitfieldInfo last_field_info;
 
@@ -2890,10 +2894,23 @@ DWARFASTParserClang::ParseChildMembers(c
 if (byte_size == 0)
 byte_size = member_type->GetByteSize();
 
-if 
(die.GetDWARF()->GetObjectFile()->GetByteOrder() == eByteOrderLittle)
+ObjectFile *objfile = 
die.GetDWARF()->GetObjectFile();
+if (objfile->GetByteOrder() == 
eByteOrderLittle)
 {
 this_field_info.bit_offset += 
byte_size * 8;
 this_field_info.bit_offset -= 
(bit_offset + bit_size);
+
+if (this_field_info.bit_offset >= 
parent_bit_size)
+{
+
objfile->GetModule()->ReportWarning("0x%8.8" PRIx64 ": %s bitfield named \"%s\" 
has invalid bit offset (0x%8.8" PRIx64 ") member will be ignored. Please file a 
bug against the compiler and include the preprocessed output for %s\n",
+   
 die.GetID(),
+   
 DW_TAG_value_to_name(tag),
+   
 name,
+   
 this_field_info.bit_offset,
+   
 sc.comp_unit ? sc.comp_unit->GetPath().c_str() : "the source file");
+this_field_info.Clear();
+continue;
+}
 }
 else
 {


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r268110 - Watch out for compilers that generate bad bitfield info. If the bit size of a bitfield member doesn't lie within the bit bounds of the type itself, just leave it ou

2016-04-29 Thread Zachary Turner via lldb-commits
If clang is generating bad debug info, do you think you should file a bug
against clang for that?

On Fri, Apr 29, 2016 at 2:32 PM Greg Clayton via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: gclayton
> Date: Fri Apr 29 16:26:46 2016
> New Revision: 268110
>
> URL: http://llvm.org/viewvc/llvm-project?rev=268110&view=rev
> Log:
> Watch out for compilers that generate bad bitfield info. If the bit size
> of a bitfield member doesn't lie within the bit bounds of the type itself,
> just leave it out so we don't get clang asserting and killing our IDE when
> it gets unhappy with the information.
>
> https://llvm.org/bugs/show_bug.cgi?id=27515
> 
>
>
> Modified:
>
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=268110&r1=268109&r2=268110&view=diff
>
> ==
> ---
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> (original)
> +++
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> Fri Apr 29 16:26:46 2016
> @@ -22,7 +22,6 @@ class BitfieldsTestCase(TestBase):
>
>  @skipIfWindows # BitFields exhibit crashes in record layout on
> Windows (http://llvm.org/pr21800)
>  @skipIf("llvm.org/pr27510", oslist=["linux"], compiler="clang",
> compiler_version=[">=", "3.9"]) # expectedFailure, skip to avoid crash
> -@skipIf("llvm.org/pr27515", oslist=["macosx"]) # Assertion failed:
> (Offset >= Size), function insertPadding CGRecordLayoutBuilder.cpp
>  def test_and_run_command(self):
>  """Test 'frame variable ...' on a variable with bitfields."""
>  self.build()
>
> Modified:
> lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=268110&r1=268109&r2=268110&view=diff
>
> ==
> --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> (original)
> +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri
> Apr 29 16:26:46 2016
> @@ -2645,6 +2645,10 @@ DWARFASTParserClang::ParseChildMembers(c
>  if (!parent_die)
>  return 0;
>
> +// Get the parent byte size so we can verify any members will fit
> +const uint64_t parent_byte_size =
> parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX) * 8;
> +const uint64_t parent_bit_size = parent_byte_size == UINT64_MAX ?
> UINT64_MAX : parent_byte_size * 8;
> +
>  uint32_t member_idx = 0;
>  BitfieldInfo last_field_info;
>
> @@ -2890,10 +2894,23 @@ DWARFASTParserClang::ParseChildMembers(c
>  if (byte_size == 0)
>  byte_size =
> member_type->GetByteSize();
>
> -if
> (die.GetDWARF()->GetObjectFile()->GetByteOrder() == eByteOrderLittle)
> +ObjectFile *objfile =
> die.GetDWARF()->GetObjectFile();
> +if (objfile->GetByteOrder() ==
> eByteOrderLittle)
>  {
>  this_field_info.bit_offset +=
> byte_size * 8;
>  this_field_info.bit_offset -=
> (bit_offset + bit_size);
> +
> +if (this_field_info.bit_offset >=
> parent_bit_size)
> +{
> +
> objfile->GetModule()->ReportWarning("0x%8.8" PRIx64 ": %s bitfield named
> \"%s\" has invalid bit offset (0x%8.8" PRIx64 ") member will be ignored.
> Please file a bug against the compiler and include the preprocessed output
> for %s\n",
> +
>   die.GetID(),
> +
>   DW_TAG_value_to_name(tag),
> +
>   name,
> +
>   this_field_info.bit_offset,
> +
>   sc.comp_unit ? sc.comp_unit->GetPath().c_str() : "the source file");
> +this_field_info.Clear();
> +continue;
> +}
>  }
>  else
>  {
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r268110 - Watch out for compilers that generate bad bitfield info. If the bit size of a bitfield member doesn't lie within the bit bounds of the type itself, just leave it ou

2016-04-29 Thread Jim Ingham via lldb-commits
Of course we filed a bug about this, and I'm pretty sure Adrian is done or 
close to done with the fix.

Searching for a useful interpretation to your question all I can come up with 
is: "Why are you bothering to work around this rather than fixing clang."  That 
is actually worth answering, since it may not be obvious that it is very common 
for debug information to get archived for symbolication of crashes, regression, 
etc.  So if a bug has been in the compiler for a while, the debugger has to do 
its best to deal with it.  Expecting somewhat stinky debug information is a sad 
but true fact of supporting a debugger...

Jim

> On Apr 29, 2016, at 2:36 PM, Zachary Turner via lldb-commits 
>  wrote:
> 
> If clang is generating bad debug info, do you think you should file a bug 
> against clang for that?
> 
> On Fri, Apr 29, 2016 at 2:32 PM Greg Clayton via lldb-commits 
>  wrote:
> Author: gclayton
> Date: Fri Apr 29 16:26:46 2016
> New Revision: 268110
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=268110&view=rev
> Log:
> Watch out for compilers that generate bad bitfield info. If the bit size of a 
> bitfield member doesn't lie within the bit bounds of the type itself, just 
> leave it out so we don't get clang asserting and killing our IDE when it gets 
> unhappy with the information.
> 
> https://llvm.org/bugs/show_bug.cgi?id=27515
> 
> 
> 
> Modified:
> 
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> 
> Modified: 
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=268110&r1=268109&r2=268110&view=diff
> ==
> --- 
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py 
> (original)
> +++ 
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py 
> Fri Apr 29 16:26:46 2016
> @@ -22,7 +22,6 @@ class BitfieldsTestCase(TestBase):
> 
>  @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
> (http://llvm.org/pr21800)
>  @skipIf("llvm.org/pr27510", oslist=["linux"], compiler="clang", 
> compiler_version=[">=", "3.9"]) # expectedFailure, skip to avoid crash
> -@skipIf("llvm.org/pr27515", oslist=["macosx"]) # Assertion failed: 
> (Offset >= Size), function insertPadding CGRecordLayoutBuilder.cpp
>  def test_and_run_command(self):
>  """Test 'frame variable ...' on a variable with bitfields."""
>  self.build()
> 
> Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=268110&r1=268109&r2=268110&view=diff
> ==
> --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp 
> (original)
> +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri 
> Apr 29 16:26:46 2016
> @@ -2645,6 +2645,10 @@ DWARFASTParserClang::ParseChildMembers(c
>  if (!parent_die)
>  return 0;
> 
> +// Get the parent byte size so we can verify any members will fit
> +const uint64_t parent_byte_size = 
> parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX) * 8;
> +const uint64_t parent_bit_size = parent_byte_size == UINT64_MAX ? 
> UINT64_MAX : parent_byte_size * 8;
> +
>  uint32_t member_idx = 0;
>  BitfieldInfo last_field_info;
> 
> @@ -2890,10 +2894,23 @@ DWARFASTParserClang::ParseChildMembers(c
>  if (byte_size == 0)
>  byte_size = 
> member_type->GetByteSize();
> 
> -if 
> (die.GetDWARF()->GetObjectFile()->GetByteOrder() == eByteOrderLittle)
> +ObjectFile *objfile = 
> die.GetDWARF()->GetObjectFile();
> +if (objfile->GetByteOrder() == 
> eByteOrderLittle)
>  {
>  this_field_info.bit_offset += 
> byte_size * 8;
>  this_field_info.bit_offset -= 
> (bit_offset + bit_size);
> +
> +if (this_field_info.bit_offset >= 
> parent_bit_size)
> +{
> +
> objfile->GetModule()->ReportWarning("0x%8.8" PRIx64 ": %s bitfield named 
> \"%s\" has invalid bit offset (0x%8.8" PRIx64 ") member will be ignored. 
> Please file a bug against the compiler and include the preprocessed output 
> for %s\n",
> + 
>die.GetID(),
> +   

Re: [Lldb-commits] [lldb] r268110 - Watch out for compilers that generate bad bitfield info. If the bit size of a bitfield member doesn't lie within the bit bounds of the type itself, just leave it ou

2016-04-29 Thread Zachary Turner via lldb-commits
Just to be clear, I definitely think it should be fixed on the LLDB side,
because even if it were fixed in clang, you still have to deal with old
debug info.  I just want to make sure that it's also fixed in clang, which
it sounds like you said you did file a bug against.  So I wasn't really
saying "why bother working around this", because obviously like you said
you have no choice.  Just wanted to make sure it didn't go unnoticed by the
people on the clang side is all.

On Fri, Apr 29, 2016 at 2:49 PM Jim Ingham  wrote:

> Of course we filed a bug about this, and I'm pretty sure Adrian is done or
> close to done with the fix.
>
> Searching for a useful interpretation to your question all I can come up
> with is: "Why are you bothering to work around this rather than fixing
> clang."  That is actually worth answering, since it may not be obvious that
> it is very common for debug information to get archived for symbolication
> of crashes, regression, etc.  So if a bug has been in the compiler for a
> while, the debugger has to do its best to deal with it.  Expecting somewhat
> stinky debug information is a sad but true fact of supporting a debugger...
>
> Jim
>
> > On Apr 29, 2016, at 2:36 PM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >
> > If clang is generating bad debug info, do you think you should file a
> bug against clang for that?
> >
> > On Fri, Apr 29, 2016 at 2:32 PM Greg Clayton via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> > Author: gclayton
> > Date: Fri Apr 29 16:26:46 2016
> > New Revision: 268110
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=268110&view=rev
> > Log:
> > Watch out for compilers that generate bad bitfield info. If the bit size
> of a bitfield member doesn't lie within the bit bounds of the type itself,
> just leave it out so we don't get clang asserting and killing our IDE when
> it gets unhappy with the information.
> >
> > https://llvm.org/bugs/show_bug.cgi?id=27515
> > 
> >
> >
> > Modified:
> >
>  lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> > lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> >
> > Modified:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=268110&r1=268109&r2=268110&view=diff
> >
> ==
> > ---
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> (original)
> > +++
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
> Fri Apr 29 16:26:46 2016
> > @@ -22,7 +22,6 @@ class BitfieldsTestCase(TestBase):
> >
> >  @skipIfWindows # BitFields exhibit crashes in record layout on
> Windows (http://llvm.org/pr21800)
> >  @skipIf("llvm.org/pr27510", oslist=["linux"], compiler="clang",
> compiler_version=[">=", "3.9"]) # expectedFailure, skip to avoid crash
> > -@skipIf("llvm.org/pr27515", oslist=["macosx"]) # Assertion failed:
> (Offset >= Size), function insertPadding CGRecordLayoutBuilder.cpp
> >  def test_and_run_command(self):
> >  """Test 'frame variable ...' on a variable with bitfields."""
> >  self.build()
> >
> > Modified:
> lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=268110&r1=268109&r2=268110&view=diff
> >
> ==
> > --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> (original)
> > +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> Fri Apr 29 16:26:46 2016
> > @@ -2645,6 +2645,10 @@ DWARFASTParserClang::ParseChildMembers(c
> >  if (!parent_die)
> >  return 0;
> >
> > +// Get the parent byte size so we can verify any members will fit
> > +const uint64_t parent_byte_size =
> parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX) * 8;
> > +const uint64_t parent_bit_size = parent_byte_size == UINT64_MAX ?
> UINT64_MAX : parent_byte_size * 8;
> > +
> >  uint32_t member_idx = 0;
> >  BitfieldInfo last_field_info;
> >
> > @@ -2890,10 +2894,23 @@ DWARFASTParserClang::ParseChildMembers(c
> >  if (byte_size == 0)
> >  byte_size =
> member_type->GetByteSize();
> >
> > -if
> (die.GetDWARF()->GetObjectFile()->GetByteOrder() == eByteOrderLittle)
> > +ObjectFile *objfile =
> die.GetDWARF()->GetObjectFile();
> > +if (objfile->GetByteOrder() ==
> eByteOrderLittle)
> >  {
> >  this_field_info.bit_offset +=

Re: [Lldb-commits] [lldb] r268098 - Make sure LLDB can deal with forward declarations to enums without crashing or asserting.

2016-04-29 Thread Chaoren Lin via lldb-commits
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY,
substrs = ['ops *', 'f.op', '*0x*'])
+self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY,
substrs = ['ops', '*f.op', ''])
+self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs =
['ops *', '$', '*0x*'])
+self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs
= ['error:'], error = True)

These break on 32 bit machines I think. We should probably use something
like 0x0+.

On Fri, Apr 29, 2016 at 1:48 PM, Greg Clayton via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: gclayton
> Date: Fri Apr 29 15:48:39 2016
> New Revision: 268098
>
> URL: http://llvm.org/viewvc/llvm-project?rev=268098&view=rev
> Log:
> Make sure LLDB can deal with forward declarations to enums without
> crashing or asserting.
>
> 
>
>
> Modified:
>
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
> lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> lldb/trunk/source/Symbol/ClangASTContext.cpp
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py?rev=268098&r1=268097&r2=268098&view=diff
>
> ==
> ---
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
> (original)
> +++
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
> Fri Apr 29 15:48:39 2016
> @@ -63,7 +63,14 @@ class EnumTypesTestCase(TestBase):
>  'Sunday',
>  'kNumDays',
>  '5'];
> -
> +
> +# Make sure a pointer to an anonymous enum type does crash LLDB
> and displays correctly using
> +# frame variable and expression commands
> +self.expect('frame variable f.op',
> DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op',
> '0x'])
> +self.expect('frame variable *f.op',
> DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', ' NULL>'])
> +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs
> = ['ops *', '$', '0x'])
> +self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs
> = ['error:'], error = True)
> +
>  bkpt = self.target().FindBreakpointByID(bkpt_id)
>  for enum_value in enum_values:
>  self.expect("frame variable day", 'check for valid
> enumeration value',
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c?rev=268098&r1=268097&r2=268098&view=diff
>
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
> (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c Fri
> Apr 29 15:48:39 2016
> @@ -8,6 +8,15 @@
>
>  
> //===--===//
>  #include 
>
> +#include 
> +
> +// Forward declare an enumeration (only works in C, not C++)
> +typedef enum ops ops;
> +
> +struct foo {
> +   ops *op;
> +};
> +
>  int main (int argc, char const *argv[])
>  {
>  enum days {
> @@ -21,6 +30,8 @@ int main (int argc, char const *argv[])
>  kNumDays
>  };
>  enum days day;
> +struct foo f;
> +   f.op = NULL;
>  for (day = Monday - 1; day <= kNumDays + 1; day++)
>  {
>  printf("day as int is %i\n", (int)day); // Set break point at
> this line.
>
> Modified:
> lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=268098&r1=268097&r2=268098&view=diff
>
> ==
> --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
> (original)
> +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri
> Apr 29 15:48:39 2016
> @@ -1011,9 +1011,18 @@ DWARFASTParserClang::ParseTypeFromDWARF
>  }
>
>  if (!enumerator_clang_type)
> -enumerator_clang_type =
> m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize (NULL,
> -
>   DW_ATE_signed,
> -
>   byte_size * 8);
> +{
> +if (byte_size > 0)
> +{
> +enumerator_clang_type =
> m_ast.GetBuiltinTypeForDWARFEncod

[Lldb-commits] [PATCH] D19751: Fix TestEnumTypes.py for 32 bit platforms.

2016-04-29 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: clayborg.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D19751

Files:
  packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py

Index: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
===
--- packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
+++ packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
@@ -66,9 +66,9 @@

  
 # Make sure a pointer to an anonymous enum type does crash LLDB and 
displays correctly using
 # frame variable and expression commands
-self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops *', 'f.op', '0x'])
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops *', 'f.op'], patterns = ['0x0+$'])
 self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops', '*f.op', ''])
-self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['ops *', '$', '0x'])
+self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['ops *', '$'], patterns = ['0x0+$'])
 self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['error:'], error = True)
 
 bkpt = self.target().FindBreakpointByID(bkpt_id)


Index: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
===
--- packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
+++ packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
@@ -66,9 +66,9 @@
  
 # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using
 # frame variable and expression commands
-self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '0x'])
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$'])
 self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', ''])
-self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '0x'])
+self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$'])
 self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True)
 
 bkpt = self.target().FindBreakpointByID(bkpt_id)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19751: Fix TestEnumTypes.py for 32 bit platforms.

2016-04-29 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL268135: Fix TestEnumTypes.py for 32 bit platforms. (authored 
by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D19751?vs=55685&id=55686#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19751

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py

Index: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
@@ -66,9 +66,9 @@

  
 # Make sure a pointer to an anonymous enum type does crash LLDB and 
displays correctly using
 # frame variable and expression commands
-self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops *', 'f.op', '0x'])
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops *', 'f.op'], patterns = ['0x0+$'])
 self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops', '*f.op', ''])
-self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['ops *', '$', '0x'])
+self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['ops *', '$'], patterns = ['0x0+$'])
 self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['error:'], error = True)
 
 bkpt = self.target().FindBreakpointByID(bkpt_id)


Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
@@ -66,9 +66,9 @@
  
 # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using
 # frame variable and expression commands
-self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '0x'])
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$'])
 self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', ''])
-self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '0x'])
+self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$'])
 self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True)
 
 bkpt = self.target().FindBreakpointByID(bkpt_id)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r268135 - Fix TestEnumTypes.py for 32 bit platforms.

2016-04-29 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Fri Apr 29 18:34:44 2016
New Revision: 268135

URL: http://llvm.org/viewvc/llvm-project?rev=268135&view=rev
Log:
Fix TestEnumTypes.py for 32 bit platforms.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D19751

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py?rev=268135&r1=268134&r2=268135&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py 
Fri Apr 29 18:34:44 2016
@@ -66,9 +66,9 @@ class EnumTypesTestCase(TestBase):

  
 # Make sure a pointer to an anonymous enum type does crash LLDB and 
displays correctly using
 # frame variable and expression commands
-self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops *', 'f.op', '0x'])
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops *', 'f.op'], patterns = ['0x0+$'])
 self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ['ops', '*f.op', ''])
-self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['ops *', '$', '0x'])
+self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['ops *', '$'], patterns = ['0x0+$'])
 self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = 
['error:'], error = True)
 
 bkpt = self.target().FindBreakpointByID(bkpt_id)


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits