Re: [Lldb-commits] [PATCH] D24293: Use llvm's demangler

2016-09-07 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

Cool. Would it be a good idea to only use LLVM's demangler? We can get rid of 
all the messy ifdef business, and I assume the LLVM demangler would be better 
maintained and more up to date than any system demangler.


https://reviews.llvm.org/D24293



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


[Lldb-commits] [lldb] r275914 - Add missing headers after header cleanup in r275882.

2016-07-18 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Mon Jul 18 16:11:43 2016
New Revision: 275914

URL: http://llvm.org/viewvc/llvm-project?rev=275914&view=rev
Log:
Add missing headers after header cleanup in r275882.

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp

Modified: 
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp?rev=275914&r1=275913&r2=275914&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp 
Mon Jul 18 16:11:43 2016
@@ -16,9 +16,11 @@
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendActions.h"
 #include "clang/Lex/Preprocessor.h"
+#include "clang/Lex/PreprocessorOptions.h"
 #include "clang/Parse/Parser.h"
 #include "clang/Sema/Lookup.h"
 #include "clang/Serialization/ASTReader.h"
+#include "llvm/Support/Path.h"
 
 // Project includes
 #include "ClangModulesDeclVendor.h"


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


Re: [Lldb-commits] [PATCH] D20540: Make sure TestRedefinitionsInInlines.py actually inlines.

2016-05-23 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL270493: Make sure TestRedefinitionsInInlines.py actually 
inlines. (authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D20540?vs=58153&id=58156#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20540

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c

Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c
@@ -1,7 +1,7 @@
 #include 
 
-void test1(int) __attribute__ ((always_inline));
-void test2(int) __attribute__ ((always_inline));
+inline void test1(int) __attribute__ ((always_inline));
+inline void test2(int) __attribute__ ((always_inline));
 
 void test2(int b) {
 printf("test2(%d)\n", b); //% self.expect("expression b", 
DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])


Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c
@@ -1,7 +1,7 @@
 #include 
 
-void test1(int) __attribute__ ((always_inline));
-void test2(int) __attribute__ ((always_inline));
+inline void test1(int) __attribute__ ((always_inline));
+inline void test2(int) __attribute__ ((always_inline));
 
 void test2(int b) {
 printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r270493 - Make sure TestRedefinitionsInInlines.py actually inlines.

2016-05-23 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Mon May 23 16:44:34 2016
New Revision: 270493

URL: http://llvm.org/viewvc/llvm-project?rev=270493&view=rev
Log:
Make sure TestRedefinitionsInInlines.py actually inlines.

Reviewers: spyffe

Subscribers: lldb-commits

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

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c?rev=270493&r1=270492&r2=270493&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c Mon May 23 
16:44:34 2016
@@ -1,7 +1,7 @@
 #include 
 
-void test1(int) __attribute__ ((always_inline));
-void test2(int) __attribute__ ((always_inline));
+inline void test1(int) __attribute__ ((always_inline));
+inline void test2(int) __attribute__ ((always_inline));
 
 void test2(int b) {
 printf("test2(%d)\n", b); //% self.expect("expression b", 
DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])


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


[Lldb-commits] [PATCH] D20540: Make sure TestRedefinitionsInInlines.py always actually inlines.

2016-05-23 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: spyffe.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D20540

Files:
  packages/Python/lldbsuite/test/lang/c/inlines/main.c

Index: packages/Python/lldbsuite/test/lang/c/inlines/main.c
===
--- packages/Python/lldbsuite/test/lang/c/inlines/main.c
+++ packages/Python/lldbsuite/test/lang/c/inlines/main.c
@@ -1,7 +1,7 @@
 #include 
 
-void test1(int) __attribute__ ((always_inline));
-void test2(int) __attribute__ ((always_inline));
+inline void test1(int) __attribute__ ((always_inline));
+inline void test2(int) __attribute__ ((always_inline));
 
 void test2(int b) {
 printf("test2(%d)\n", b); //% self.expect("expression b", 
DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])


Index: packages/Python/lldbsuite/test/lang/c/inlines/main.c
===
--- packages/Python/lldbsuite/test/lang/c/inlines/main.c
+++ packages/Python/lldbsuite/test/lang/c/inlines/main.c
@@ -1,7 +1,7 @@
 #include 
 
-void test1(int) __attribute__ ((always_inline));
-void test2(int) __attribute__ ((always_inline));
+inline void test1(int) __attribute__ ((always_inline));
+inline void test2(int) __attribute__ ((always_inline));
 
 void test2(int b) {
 printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])
___
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-05-04 Thread Chaoren Lin via lldb-commits
chaoren added a subscriber: chaoren.
chaoren added a comment.

We don't test host-only Windows. It's passing Windows to Android though.
What's the reason that it fails on Windows?


Repository:
  rL LLVM

http://reviews.llvm.org/D19751



___
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-05-04 Thread Chaoren Lin via lldb-commits
We don't test host-only Windows. It's passing Windows to Android though.
What's the reason that it fails on Windows?

On Wed, May 4, 2016 at 2:31 PM, Adrian McCarthy  wrote:

> amccarth added a subscriber: amccarth.
> amccarth added a comment.
>
> Chaoren:  Did this completely fix the test for you?  It's still failing
> for me on Windows, but for a reason not addressed here.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D19751
>
>
>
>
___
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


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] [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] [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

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

2016-04-28 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267923: XFail TestBitfields.py Python API tests. (authored 
by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D19680?vs=55464&id=55465#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19680

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

Index: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()
___
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-28 Thread Chaoren Lin via lldb-commits
chaoren updated this revision to Diff 55464.
chaoren added a comment.

Clickable links.


http://reviews.llvm.org/D19680

Files:
  packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r267923 - XFail TestBitfields.py Python API tests.

2016-04-28 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Apr 28 14:40:19 2016
New Revision: 267923

URL: http://llvm.org/viewvc/llvm-project?rev=267923&view=rev
Log:
XFail TestBitfields.py Python API tests.

Summary:
Started failing after rL267895.
Possibly related to http://llvm.org/pr27510.

Reviewers: labath, tfiala

Subscribers: lldb-commits

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

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

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=267923&r1=267922&r2=267923&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 
Thu Apr 28 14:40:19 2016
@@ -108,6 +108,7 @@ class BitfieldsTestCase(TestBase):
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


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


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

2016-04-28 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: labath, tfiala.
chaoren added a subscriber: lldb-commits.

Started failing after r267895.
Possibly related to llvm.org/pr27510.

http://reviews.llvm.org/D19680

Files:
  packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r267478 - Fix StackFrame::GetVariables(...) function that was broken by 261858 when lambda functions were added to Block::AppendBlockVariables(). The Stackframe::GetVariables

2016-04-25 Thread Chaoren Lin via lldb-commits
Because it's compiled in debug mode? I wouldn't expect *any* optimization
to be done in that case.

On Mon, Apr 25, 2016 at 4:35 PM, Siva Chandra 
wrote:

> Clang is probably right. Why bother to emit an unused file static scalar?
>
> On Mon, Apr 25, 2016 at 4:21 PM, Chaoren Lin  wrote:
> > Ah, I see. Is that a known clang bug?
> >
> > On Mon, Apr 25, 2016 at 4:07 PM, Siva Chandra 
> > wrote:
> >>
> >> AFAICT, happens only with Clang; Using g_static_var, say as "return
> >> g_static_var - 123;", fixes for me.
> >>
> >> On Mon, Apr 25, 2016 at 3:50 PM, Chaoren Lin via lldb-commits
> >>  wrote:
> >> > Is g_global_var necessarily static?
> >> >
> >> > On Linux, we're only seeing 2 static variables when your test expects
> 3.
> >> >
> >> >>  static_names = ['static_var', 'g_global_var', 'static_var']
> >> >
> >> > I'm guessing g_global_var isn't treated as static.
> >> >
> >> > On Mon, Apr 25, 2016 at 2:54 PM, Greg Clayton via lldb-commits
> >> >  wrote:
> >> >>
> >> >> Author: gclayton
> >> >> Date: Mon Apr 25 16:54:10 2016
> >> >> New Revision: 267478
> >> >>
> >> >> URL: http://llvm.org/viewvc/llvm-project?rev=267478&view=rev
> >> >> Log:
> >> >> Fix StackFrame::GetVariables(...) function that was broken by 261858
> >> >> when
> >> >> lambda functions were added to Block::AppendBlockVariables(). The
> >> >> Stackframe::GetVariables(...) function should get all variables
> >> >> regardless
> >> >> if they are in scope.
> >> >>
> >> >> This wasn't caught by the test suite so I added a test for it.
> >> >>
> >> >>
> >> >> Added:
> >> >>
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/
> >> >>
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >> >>
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> >> >>
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
> >> >> Modified:
> >> >> lldb/trunk/source/Target/StackFrame.cpp
> >> >>
> >> >> Added:
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >> >> URL:
> >> >>
> >> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile?rev=267478&view=auto
> >> >>
> >> >>
> >> >>
> ==
> >> >> ---
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >> >> (added)
> >> >> +++
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >> >> Mon Apr 25 16:54:10 2016
> >> >> @@ -0,0 +1,5 @@
> >> >> +LEVEL = ../../../make
> >> >> +
> >> >> +C_SOURCES := main.c
> >> >> +
> >> >> +include $(LEVEL)/Makefile.rules
> >> >>
> >> >> Added:
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> >> >> URL:
> >> >>
> >> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267478&view=auto
> >> >>
> >> >>
> >> >>
> ==
> >> >> ---
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> >> >> (added)
> >> >> +++
> >> >>
> >> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVa

Re: [Lldb-commits] [PATCH] D19511: Fix TestGetVariables.py.

2016-04-25 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267492: Fix TestGetVariables.py. (authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D19511?vs=54940&id=54944#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19511

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
  
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c

Index: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
@@ -12,8 +12,9 @@
 static int g_static_var = 123;
 
 int main (int argc, char const *argv[])
-{
+{
 static int static_var = 123;
+g_static_var = 123; // clang bug. Need to touch this variable, otherwise 
it disappears.
 int i = 0;  // breakpoint 1
 for (i=0; i<1; ++i)
 {
Index: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
@@ -79,7 +79,7 @@
 
 arg_names = ['argc', 'argv']   
 local_names = ['i', 'j', 'k']
-static_names = ['static_var', 'g_global_var', 'static_var']
+static_names = ['static_var', 'g_global_var', 'g_static_var']
 breakpoint1_locals = ['i']
 breakpoint1_statics = ['static_var']
 num_args = len(arg_names)


Index: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
===
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
@@ -12,8 +12,9 @@
 static int g_static_var = 123;
 
 int main (int argc, char const *argv[])
-{
+{
 static int static_var = 123;
+g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears.
 int i = 0;  // breakpoint 1
 for (i=0; i<1; ++i)
 {
Index: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
@@ -79,7 +79,7 @@
 
 arg_names = ['argc', 'argv']   
 local_names = ['i', 'j', 'k']
-static_names = ['static_var', 'g_global_var', 'static_var']
+static_names = ['static_var', 'g_global_var', 'g_static_var']
 breakpoint1_locals = ['i']
 breakpoint1_statics = ['static_var']
 num_args = len(arg_names)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r267492 - Fix TestGetVariables.py.

2016-04-25 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Mon Apr 25 18:29:53 2016
New Revision: 267492

URL: http://llvm.org/viewvc/llvm-project?rev=267492&view=rev
Log:
Fix TestGetVariables.py.

Reviewers: sivachandra, clayborg

Subscribers: lldb-commits

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

Modified:

lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267492&r1=267491&r2=267492&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
 Mon Apr 25 18:29:53 2016
@@ -79,7 +79,7 @@ class TestGetVariables(TestBase):
 
 arg_names = ['argc', 'argv']   
 local_names = ['i', 'j', 'k']
-static_names = ['static_var', 'g_global_var', 'static_var']
+static_names = ['static_var', 'g_global_var', 'g_static_var']
 breakpoint1_locals = ['i']
 breakpoint1_statics = ['static_var']
 num_args = len(arg_names)

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c?rev=267492&r1=267491&r2=267492&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c 
Mon Apr 25 18:29:53 2016
@@ -12,8 +12,9 @@ int g_global_var = 123;
 static int g_static_var = 123;
 
 int main (int argc, char const *argv[])
-{
+{
 static int static_var = 123;
+g_static_var = 123; // clang bug. Need to touch this variable, otherwise 
it disappears.
 int i = 0;  // breakpoint 1
 for (i=0; i<1; ++i)
 {


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


[Lldb-commits] [PATCH] D19511: Fix TestGetVariables.py.

2016-04-25 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: sivachandra, clayborg.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D19511

Files:
  
packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
  packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c

Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
===
--- packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
+++ packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
@@ -12,8 +12,9 @@
 static int g_static_var = 123;
 
 int main (int argc, char const *argv[])
-{
+{
 static int static_var = 123;
+g_static_var = 123; // clang bug. Need to touch this variable, otherwise 
it disappears.
 int i = 0;  // breakpoint 1
 for (i=0; i<1; ++i)
 {
Index: 
packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
===
--- 
packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
+++ 
packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
@@ -79,7 +79,7 @@
 
 arg_names = ['argc', 'argv']   
 local_names = ['i', 'j', 'k']
-static_names = ['static_var', 'g_global_var', 'static_var']
+static_names = ['static_var', 'g_global_var', 'g_static_var']
 breakpoint1_locals = ['i']
 breakpoint1_statics = ['static_var']
 num_args = len(arg_names)


Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
===
--- packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
+++ packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
@@ -12,8 +12,9 @@
 static int g_static_var = 123;
 
 int main (int argc, char const *argv[])
-{
+{
 static int static_var = 123;
+g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears.
 int i = 0;  // breakpoint 1
 for (i=0; i<1; ++i)
 {
Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
===
--- packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
+++ packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
@@ -79,7 +79,7 @@
 
 arg_names = ['argc', 'argv']   
 local_names = ['i', 'j', 'k']
-static_names = ['static_var', 'g_global_var', 'static_var']
+static_names = ['static_var', 'g_global_var', 'g_static_var']
 breakpoint1_locals = ['i']
 breakpoint1_statics = ['static_var']
 num_args = len(arg_names)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r267478 - Fix StackFrame::GetVariables(...) function that was broken by 261858 when lambda functions were added to Block::AppendBlockVariables(). The Stackframe::GetVariables

2016-04-25 Thread Chaoren Lin via lldb-commits
Ah, I see. Is that a known clang bug?

On Mon, Apr 25, 2016 at 4:07 PM, Siva Chandra 
wrote:

> AFAICT, happens only with Clang; Using g_static_var, say as "return
> g_static_var - 123;", fixes for me.
>
> On Mon, Apr 25, 2016 at 3:50 PM, Chaoren Lin via lldb-commits
>  wrote:
> > Is g_global_var necessarily static?
> >
> > On Linux, we're only seeing 2 static variables when your test expects 3.
> >
> >>  static_names = ['static_var', 'g_global_var', 'static_var']
> >
> > I'm guessing g_global_var isn't treated as static.
> >
> > On Mon, Apr 25, 2016 at 2:54 PM, Greg Clayton via lldb-commits
> >  wrote:
> >>
> >> Author: gclayton
> >> Date: Mon Apr 25 16:54:10 2016
> >> New Revision: 267478
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=267478&view=rev
> >> Log:
> >> Fix StackFrame::GetVariables(...) function that was broken by 261858
> when
> >> lambda functions were added to Block::AppendBlockVariables(). The
> >> Stackframe::GetVariables(...) function should get all variables
> regardless
> >> if they are in scope.
> >>
> >> This wasn't caught by the test suite so I added a test for it.
> >>
> >>
> >> Added:
> >>
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/
> >>
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >>
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> >>
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
> >> Modified:
> >> lldb/trunk/source/Target/StackFrame.cpp
> >>
> >> Added:
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile?rev=267478&view=auto
> >>
> >>
> ==
> >> ---
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >> (added)
> >> +++
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> >> Mon Apr 25 16:54:10 2016
> >> @@ -0,0 +1,5 @@
> >> +LEVEL = ../../../make
> >> +
> >> +C_SOURCES := main.c
> >> +
> >> +include $(LEVEL)/Makefile.rules
> >>
> >> Added:
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267478&view=auto
> >>
> >>
> ==
> >> ---
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> >> (added)
> >> +++
> >>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> >> Mon Apr 25 16:54:10 2016
> >> @@ -0,0 +1,190 @@
> >> +"""
> >> +Test that SBFrame::GetVariables() calls work correctly.
> >> +"""
> >> +
> >> +from __future__ import print_function
> >> +
> >> +
> >> +
> >> +import os, time
> >> +import lldb
> >> +from lldbsuite.test.decorators import *
> >> +from lldbsuite.test.lldbtest import *
> >> +from lldbsuite.test import lldbplatform
> >> +from lldbsuite.test import lldbutil
> >> +
> >> +def get_names_from_value_list(value_list):
> >> +names = list()
> >> +for value in value_list:
> >> +names.append(value.GetName())
> >> +return names
> >> +
> >> +class TestGetVariables(TestBase):
> >> +
> >> +mydir = TestBase.compute_mydir(__file__)
> >> +
> >> +def setUp(self):
> >> +# Call super's setUp().
> >> +TestBase.setUp(self)
> >> +self.source = 'main.c'
> >> +
> >> +def verify_variable_names(self, description, value_list, names):
> >> +copy_names = list(names)
> >> +actual_names = get_names_from_va

Re: [Lldb-commits] [lldb] r267478 - Fix StackFrame::GetVariables(...) function that was broken by 261858 when lambda functions were added to Block::AppendBlockVariables(). The Stackframe::GetVariables

2016-04-25 Thread Chaoren Lin via lldb-commits
Is g_global_var necessarily static?

On Linux, we're only seeing 2 static variables when your test expects 3.

>  static_names = ['static_var', 'g_global_var', 'static_var']

I'm guessing g_global_var isn't treated as static.

On Mon, Apr 25, 2016 at 2:54 PM, Greg Clayton via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: gclayton
> Date: Mon Apr 25 16:54:10 2016
> New Revision: 267478
>
> URL: http://llvm.org/viewvc/llvm-project?rev=267478&view=rev
> Log:
> Fix StackFrame::GetVariables(...) function that was broken by 261858 when
> lambda functions were added to Block::AppendBlockVariables(). The
> Stackframe::GetVariables(...) function should get all variables regardless
> if they are in scope.
>
> This wasn't caught by the test suite so I added a test for it.
>
>
> Added:
>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/
>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
>
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
> Modified:
> lldb/trunk/source/Target/StackFrame.cpp
>
> Added:
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile?rev=267478&view=auto
>
> ==
> ---
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> (added)
> +++
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
> Mon Apr 25 16:54:10 2016
> @@ -0,0 +1,5 @@
> +LEVEL = ../../../make
> +
> +C_SOURCES := main.c
> +
> +include $(LEVEL)/Makefile.rules
>
> Added:
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267478&view=auto
>
> ==
> ---
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> (added)
> +++
> lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
> Mon Apr 25 16:54:10 2016
> @@ -0,0 +1,190 @@
> +"""
> +Test that SBFrame::GetVariables() calls work correctly.
> +"""
> +
> +from __future__ import print_function
> +
> +
> +
> +import os, time
> +import lldb
> +from lldbsuite.test.decorators import *
> +from lldbsuite.test.lldbtest import *
> +from lldbsuite.test import lldbplatform
> +from lldbsuite.test import lldbutil
> +
> +def get_names_from_value_list(value_list):
> +names = list()
> +for value in value_list:
> +names.append(value.GetName())
> +return names
> +
> +class TestGetVariables(TestBase):
> +
> +mydir = TestBase.compute_mydir(__file__)
> +
> +def setUp(self):
> +# Call super's setUp().
> +TestBase.setUp(self)
> +self.source = 'main.c'
> +
> +def verify_variable_names(self, description, value_list, names):
> +copy_names = list(names)
> +actual_names = get_names_from_value_list(value_list)
> +for name in actual_names:
> +if name in copy_names:
> +copy_names.remove(name)
> +else:
> +self.assertTrue(False, "didn't find '%s' in %s" % (name,
> copy_names))
> +self.assertEqual(len(copy_names), 0, "%s: we didn't find
> variables: %s in value list (%s)" % (description, copy_names, actual_names))
> +
> +def test (self):
> +self.build ()
> +
> +# Set debugger into synchronous mode
> +self.dbg.SetAsync(False)
> +
> +# Create a target by the debugger.
> +exe = os.path.join(os.getcwd(), "a.out")
> +target = self.dbg.CreateTarget(exe)
> +self.assertTrue(target, VALID_TARGET)
> +
> +line1 = line_number(self.source, '// breakpoint 1')
> +line2 = line_number(self.source, '// breakpoint 2')
> +line3 = line_number(self.source, '// breakpoint 3')
> +
> +breakpoint1 = target.BreakpointCreateByLocation (self.source,
> line1);
> +breakpoint2 = target.BreakpointCreateByLocation (self.source,
> line2);
> +breakpoint3 = target.BreakpointCreateByLocation (self.source,
> line3);
> +
> +self.assertTrue(breakpoint1.GetNumLocations() >= 1,
> PROCESS_IS_VALID)
> +self.assertTrue(breakpoint2.GetNumLocations() >= 1,
> PROCESS_IS_VALID)
> +self.assertTrue(breakpoint3.GetNumLocations() >= 1,
> PROCESS_IS_VALID)
> +
> +# Register our shared libraries for remote targets so they get
> automatically uploaded
> +arguments = None
> +environment = None
> +
> +# Now launch the process, and do not stop at entry p

[Lldb-commits] [lldb] r266702 - Fix Windows build.

2016-04-18 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Mon Apr 18 20:09:37 2016
New Revision: 266702

URL: http://llvm.org/viewvc/llvm-project?rev=266702&view=rev
Log:
Fix Windows build.

Modified:
lldb/trunk/source/Host/windows/Windows.cpp

Modified: lldb/trunk/source/Host/windows/Windows.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Windows.cpp?rev=266702&r1=266701&r2=266702&view=diff
==
--- lldb/trunk/source/Host/windows/Windows.cpp (original)
+++ lldb/trunk/source/Host/windows/Windows.cpp Mon Apr 18 20:09:37 2016
@@ -14,6 +14,7 @@
 
 #include "llvm/Support/ConvertUTF.h"
 
+#include 
 #include 
 #include 
 #include 


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


Re: [Lldb-commits] [PATCH] D18481: Add argument to expectedFailureAll decorator to xfail for environment variables, and xfail tests for hard float abi and -mthumb on android arm

2016-03-25 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

In http://reviews.llvm.org/D18481#383694, @zturner wrote:

> This seems very strange to me.  What if someone specifies those flags on the 
> command line in the makefile instead of via some environment variables?


I don't think there's anything we can do about that unless we parse the 
Makefiles from within the test suite.  These kinds of flags are bad to hard 
code into the Makefiles anyway, unless there's a way to mark a test as thumb 
specific or hard float specific in the test suite, in which case we'd be using 
*those* indicators instead to filter for xfail. For now I think this is a 
pretty reasonable way to discriminate on the validity of failures based on 
compile flags.

> It also seems like a very specialized argument that we might use once or 
> twice ever.


This applies to arbitrary compile flags. Though you probably won't ever need it 
for x86/x86_64, I can see it being useful for ARM and MIPS due to the sheer 
number of variations.


http://reviews.llvm.org/D18481



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


Re: [Lldb-commits] [PATCH] D17402: Shuffle an #undef to avoid a warning on FreeBSD

2016-03-14 Thread Chaoren Lin via lldb-commits
chaoren accepted this revision.
chaoren added a comment.
This revision is now accepted and ready to land.

Seems legit.


http://reviews.llvm.org/D17402



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


Re: [Lldb-commits] [lldb] r262041 - Fix bug with register values byte order in expression evaluation.

2016-02-29 Thread Chaoren Lin via lldb-commits
I think the issue is that on OS X, GetScalarValue fails to return false
when the value is *not* actually scalar. When it's not scalar, it should be
using WriteMemory instead, right? Or is it possible for GetScalarValue to
succeed but return something with a different byte size?

On Mon, Feb 29, 2016 at 10:05 AM, Marianne Mailhot-Sarrasin <
marianne1...@hotmail.com> wrote:

> Really sorry about the breakage.
>
> Is there anybody who understands what is the issue of using
> WriteScalarToMemory when the register value is a scalar?
>
> From my understanding, using WriteScalarToMemory handles the byte swap
> needed when the Host endianness is different from the Target endianness,
> which is not done by WriteMemory. Therefor using WriteScalarToMemory is
> fixing the evaluation of the registers on my out-of-tree target.
>
>
> 2016-02-29 11:06 GMT-05:00 Aidan Dodds :
>
>> Sorry about the breakage, and thanks for working on a patch Chaoren.
>> Hopefully Marianne will revise her merge request if this fix is still
>> important for her.
>>
>> On 28/02/2016 00:06, Todd Fiala wrote:
>>
>> I brought the state of the lines changed there to what they were prior to
>> the change. If you adjusted those same lines, then yes that got undone.
>>
>> We were failing different tests in those files.  Your change may have
>> fixed the new issues on Linux, but did not address the new failures on OS
>> X.  The OS X bot went green after the revert.
>>
>> -Todd
>>
>> On Feb 27, 2016, at 4:01 PM, Chaoren Lin < 
>> chaor...@google.com> wrote:
>>
>> I thought I fixed it with  <http://reviews.llvm.org/D17658>
>> http://reviews.llvm.org/D17658. Did you revert that as well?
>>
>> On Sat, Feb 27, 2016 at 3:14 PM, Todd Fiala < 
>> todd.fi...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> The new assert was failing on the OS X testbot here:
>>> http://lab.llvm.org:8080/green/job/lldb_build_test/
>>>
>>> The nag mail didn't make it to you since we have it only fire on the
>>> transition from good build to bad build, and Tamas had the privilege of
>>> earning that with a minor Xcode breakage just shortly before this issue
>>> showed up.  However, that bot as been broken since this change went in.
>>>
>>> I reverted it in r262156.
>>>
>>> Feel free to reapply if you have a suggested fix for the test failure
>>> introduced.
>>>
>>> Thanks!
>>>
>>> -Todd
>>>
>>> On Fri, Feb 26, 2016 at 12:08 PM, Chaoren Lin via lldb-commits <
>>> lldb-commits@lists.llvm.org> wrote:
>>>
>>>> Hmm. Weird. That assert is failing on Linux:
>>>> <http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833>
>>>> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833
>>>>
>>>> On Fri, Feb 26, 2016 at 9:40 AM, Aidan Dodds via lldb-commits <
>>>> lldb-commits@lists.llvm.org> wrote:
>>>>
>>>>> Author: aidandodds
>>>>> Date: Fri Feb 26 11:40:50 2016
>>>>> New Revision: 262041
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=262041&view=rev
>>>>> Log:
>>>>> Fix bug with register values byte order in expression evaluation.
>>>>>
>>>>> The evaluation of expressions containing register values was broken
>>>>> for targets for which endianness differs from host.
>>>>>
>>>>> Committed on behalf of: mamai < 
>>>>> marianne.mailhot.sarra...@gmail.com>
>>>>>
>>>>> Differential revision: <http://reviews.llvm.org/D17167>
>>>>> http://reviews.llvm.org/D17167
>>>>>
>>>>> Modified:
>>>>> lldb/trunk/source/Expression/Materializer.cpp
>>>>>
>>>>> Modified: lldb/trunk/source/Expression/Materializer.cpp
>>>>> URL:
>>>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff
>>>>>
>>>>> ==
>>>>> --- lldb/trunk/source/Expression/Materializer.cpp (original)
>>>>> +++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 11:40:50
>>>>> 2016
>>>>> @@ -26,6 +26,7 @@
>>>>>  #include "lldb/Target/StackFrame.h"
>>>>&g

Re: [Lldb-commits] [lldb] r262041 - Fix bug with register values byte order in expression evaluation.

2016-02-27 Thread Chaoren Lin via lldb-commits
I thought I fixed it with http://reviews.llvm.org/D17658. Did you revert
that as well?

On Sat, Feb 27, 2016 at 3:14 PM, Todd Fiala  wrote:

> Hi all,
>
> The new assert was failing on the OS X testbot here:
> http://lab.llvm.org:8080/green/job/lldb_build_test/
>
> The nag mail didn't make it to you since we have it only fire on the
> transition from good build to bad build, and Tamas had the privilege of
> earning that with a minor Xcode breakage just shortly before this issue
> showed up.  However, that bot as been broken since this change went in.
>
> I reverted it in r262156.
>
> Feel free to reapply if you have a suggested fix for the test failure
> introduced.
>
> Thanks!
>
> -Todd
>
> On Fri, Feb 26, 2016 at 12:08 PM, Chaoren Lin via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Hmm. Weird. That assert is failing on Linux:
>> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833
>>
>> On Fri, Feb 26, 2016 at 9:40 AM, Aidan Dodds via lldb-commits <
>> lldb-commits@lists.llvm.org> wrote:
>>
>>> Author: aidandodds
>>> Date: Fri Feb 26 11:40:50 2016
>>> New Revision: 262041
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=262041&view=rev
>>> Log:
>>> Fix bug with register values byte order in expression evaluation.
>>>
>>> The evaluation of expressions containing register values was broken for
>>> targets for which endianness differs from host.
>>>
>>> Committed on behalf of: mamai 
>>>
>>> Differential revision: http://reviews.llvm.org/D17167
>>>
>>> Modified:
>>> lldb/trunk/source/Expression/Materializer.cpp
>>>
>>> Modified: lldb/trunk/source/Expression/Materializer.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff
>>>
>>> ==
>>> --- lldb/trunk/source/Expression/Materializer.cpp (original)
>>> +++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 11:40:50
>>> 2016
>>> @@ -26,6 +26,7 @@
>>>  #include "lldb/Target/StackFrame.h"
>>>  #include "lldb/Target/Target.h"
>>>  #include "lldb/Target/Thread.h"
>>> +#include "lldb/Utility/LLDBAssert.h"
>>>
>>>  using namespace lldb_private;
>>>
>>> @@ -1275,9 +1276,14 @@ public:
>>>  m_register_contents.reset(new
>>> DataBufferHeap(register_data.GetDataStart(), register_data.GetByteSize()));
>>>
>>>  Error write_error;
>>> -
>>> -map.WriteMemory(load_addr, register_data.GetDataStart(),
>>> register_data.GetByteSize(), write_error);
>>> -
>>> +
>>> +Scalar scalar;
>>> +reg_value.GetScalarValue(scalar);
>>> +
>>> +lldbassert(scalar.GetByteSize() == register_data.GetByteSize());
>>> +
>>> +map.WriteScalarToMemory(load_addr, scalar,
>>> scalar.GetByteSize(), write_error);
>>> +
>>>  if (!write_error.Success())
>>>  {
>>>  err.SetErrorStringWithFormat("couldn't write the contents
>>> of register %s: %s", m_register_info.name, write_error.AsCString());
>>>
>>>
>>> ___
>>> 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
>>
>>
>
>
> --
> -Todd
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D17658: Register value is not necessarily scalar.

2016-02-26 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL262081: Register value is not necessarily scalar. (authored 
by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D17658?vs=49237&id=49238#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17658

Files:
  lldb/trunk/source/Expression/Materializer.cpp

Index: lldb/trunk/source/Expression/Materializer.cpp
===
--- lldb/trunk/source/Expression/Materializer.cpp
+++ lldb/trunk/source/Expression/Materializer.cpp
@@ -35,35 +35,35 @@
 {
 uint32_t size = entity.GetSize();
 uint32_t alignment = entity.GetAlignment();
-
+
 uint32_t ret;
-
+
 if (m_current_offset == 0)
 m_struct_alignment = alignment;
-
+
 if (m_current_offset % alignment)
 m_current_offset += (alignment - (m_current_offset % alignment));
-
+
 ret = m_current_offset;
-
+
 m_current_offset += size;
-
+
 return ret;
 }
 
 void
 Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type)
 {
 m_size = type.GetByteSize(nullptr);
-
+
 uint32_t bit_alignment = type.GetTypeBitAlign();
-
+
 if (bit_alignment % 8)
 {
 bit_alignment += 8;
 bit_alignment &= ~((uint32_t)0x111u);
 }
-
+
 m_alignment = bit_alignment / 8;
 }
 
@@ -80,117 +80,117 @@
 m_size = 8;
 m_alignment = 8;
 }
-
+
 void MakeAllocation (IRMemoryMap &map, Error &err)
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
 // Allocate a spare memory area to store the persistent variable's contents.
-
+
 Error allocate_error;
 const bool zero_memory = false;
-
+
 lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(),
   8,
   lldb::ePermissionsReadable | lldb::ePermissionsWritable,
   IRMemoryMap::eAllocationPolicyMirror,
   zero_memory,
   allocate_error);
-
+
 if (!allocate_error.Success())
 {
 err.SetErrorStringWithFormat("couldn't allocate a memory area to store %s: %s", m_persistent_variable_sp->GetName().GetCString(), allocate_error.AsCString());
 return;
 }
-
+
 if (log)
 log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem);
-
+
 // Put the location of the spare memory into the live data of the ValueObject.
-
+
 m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(),
   m_persistent_variable_sp->GetCompilerType(),
   m_persistent_variable_sp->GetName(),
   mem,
   eAddressTypeLoad,
   map.GetAddressByteSize());
-
+
 // Clear the flag if the variable will never be deallocated.
-
+
 if (m_persistent_variable_sp->m_flags & ExpressionVariable::EVKeepInTarget)
 {
 Error leak_error;
 map.Leak(mem, leak_error);
 m_persistent_variable_sp->m_flags &= ~ExpressionVariable::EVNeedsAllocation;
 }
-
+
 // Write the contents of the variable to the area.
-
+
 Error write_error;
-
+
 map.WriteMemory (mem,
  m_persistent_variable_sp->GetValueBytes(),
  m_persistent_variable_sp->GetByteSize(),
  write_error);
-
+
 if (!write_error.Success())
 {
 err.SetErrorStringWithFormat ("couldn't write %s to the target: %s", m_persistent_variable_sp->GetName().AsCString(),
   write_error.AsCString());
 return;
 }
 }
-
+
 void DestroyAllocation (IRMemoryMap &map, Error &err)
 {
 Error deallocate_error;
-
+
 map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(), deallocate_error);
-
+
 m_persistent_variable_sp->m_live_sp.reset();
-
+
 if (!deallocate_error.Success())
 {
 err.SetErrorStringWithFormat ("couldn't deallocate memory for %s: %s", m_persistent_variable_sp->GetName().GetCString(), deallocate_error.AsCString());
 }
 }
-
+
 void Materialize(lldb::StackFrameSP &frame_sp,
 

[Lldb-commits] [lldb] r262081 - Register value is not necessarily scalar.

2016-02-26 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Fri Feb 26 16:12:35 2016
New Revision: 262081

URL: http://llvm.org/viewvc/llvm-project?rev=262081&view=rev
Log:
Register value is not necessarily scalar.

Reviewers: aidan.dodds, mamai

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Expression/Materializer.cpp

Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262081&r1=262080&r2=262081&view=diff
==
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 16:12:35 2016
@@ -35,19 +35,19 @@ Materializer::AddStructMember (Entity &e
 {
 uint32_t size = entity.GetSize();
 uint32_t alignment = entity.GetAlignment();
-
+
 uint32_t ret;
-
+
 if (m_current_offset == 0)
 m_struct_alignment = alignment;
-
+
 if (m_current_offset % alignment)
 m_current_offset += (alignment - (m_current_offset % alignment));
-
+
 ret = m_current_offset;
-
+
 m_current_offset += size;
-
+
 return ret;
 }
 
@@ -55,15 +55,15 @@ void
 Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type)
 {
 m_size = type.GetByteSize(nullptr);
-
+
 uint32_t bit_alignment = type.GetTypeBitAlign();
-
+
 if (bit_alignment % 8)
 {
 bit_alignment += 8;
 bit_alignment &= ~((uint32_t)0x111u);
 }
-
+
 m_alignment = bit_alignment / 8;
 }
 
@@ -80,59 +80,59 @@ public:
 m_size = 8;
 m_alignment = 8;
 }
-
+
 void MakeAllocation (IRMemoryMap &map, Error &err)
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet 
(LIBLLDB_LOG_EXPRESSIONS));
 
 // Allocate a spare memory area to store the persistent variable's 
contents.
-
+
 Error allocate_error;
 const bool zero_memory = false;
-
+
 lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(),
   8,
   lldb::ePermissionsReadable | 
lldb::ePermissionsWritable,
   IRMemoryMap::eAllocationPolicyMirror,
   zero_memory,
   allocate_error);
-
+
 if (!allocate_error.Success())
 {
 err.SetErrorStringWithFormat("couldn't allocate a memory area to 
store %s: %s", m_persistent_variable_sp->GetName().GetCString(), 
allocate_error.AsCString());
 return;
 }
-
+
 if (log)
 log->Printf("Allocated %s (0x%" PRIx64 ") successfully", 
m_persistent_variable_sp->GetName().GetCString(), mem);
-
+
 // Put the location of the spare memory into the live data of the 
ValueObject.
-
+
 m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create 
(map.GetBestExecutionContextScope(),
   
m_persistent_variable_sp->GetCompilerType(),
   
m_persistent_variable_sp->GetName(),
   
mem,
   
eAddressTypeLoad,
   
map.GetAddressByteSize());
-
+
 // Clear the flag if the variable will never be deallocated.
-
+
 if (m_persistent_variable_sp->m_flags & 
ExpressionVariable::EVKeepInTarget)
 {
 Error leak_error;
 map.Leak(mem, leak_error);
 m_persistent_variable_sp->m_flags &= 
~ExpressionVariable::EVNeedsAllocation;
 }
-
+
 // Write the contents of the variable to the area.
-
+
 Error write_error;
-
+
 map.WriteMemory (mem,
  m_persistent_variable_sp->GetValueBytes(),
  m_persistent_variable_sp->GetByteSize(),
  write_error);
-
+
 if (!write_error.Success())
 {
 err.SetErrorStringWithFormat ("couldn't write %s to the target: 
%s", m_persistent_variable_sp->GetName().AsCString(),
@@ -140,21 +140,21 @@ public:
 return;
 }
 }
-
+
 void DestroyAllocation (IRMemoryMap &map, Error &err)
 {
 Error deallocate_error;
-
+
 
map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(),
 deallocate_error);
-
+
 m_persistent_variable_sp->m_live_sp.reset();
-
+
 if (!deallocate_error.Success())
 {
 err.SetErrorStr

Re: [Lldb-commits] [PATCH] D17658: Register value is not necessarily scalar.

2016-02-26 Thread Chaoren Lin via lldb-commits
chaoren updated this revision to Diff 49237.
chaoren added a comment.

Check return value of GetScalarValue directly.


http://reviews.llvm.org/D17658

Files:
  source/Expression/Materializer.cpp

Index: source/Expression/Materializer.cpp
===
--- source/Expression/Materializer.cpp
+++ source/Expression/Materializer.cpp
@@ -35,35 +35,35 @@
 {
 uint32_t size = entity.GetSize();
 uint32_t alignment = entity.GetAlignment();
-
+
 uint32_t ret;
-
+
 if (m_current_offset == 0)
 m_struct_alignment = alignment;
-
+
 if (m_current_offset % alignment)
 m_current_offset += (alignment - (m_current_offset % alignment));
-
+
 ret = m_current_offset;
-
+
 m_current_offset += size;
-
+
 return ret;
 }
 
 void
 Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type)
 {
 m_size = type.GetByteSize(nullptr);
-
+
 uint32_t bit_alignment = type.GetTypeBitAlign();
-
+
 if (bit_alignment % 8)
 {
 bit_alignment += 8;
 bit_alignment &= ~((uint32_t)0x111u);
 }
-
+
 m_alignment = bit_alignment / 8;
 }
 
@@ -80,117 +80,117 @@
 m_size = 8;
 m_alignment = 8;
 }
-
+
 void MakeAllocation (IRMemoryMap &map, Error &err)
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
 // Allocate a spare memory area to store the persistent variable's contents.
-
+
 Error allocate_error;
 const bool zero_memory = false;
-
+
 lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(),
   8,
   lldb::ePermissionsReadable | lldb::ePermissionsWritable,
   IRMemoryMap::eAllocationPolicyMirror,
   zero_memory,
   allocate_error);
-
+
 if (!allocate_error.Success())
 {
 err.SetErrorStringWithFormat("couldn't allocate a memory area to store %s: %s", m_persistent_variable_sp->GetName().GetCString(), allocate_error.AsCString());
 return;
 }
-
+
 if (log)
 log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem);
-
+
 // Put the location of the spare memory into the live data of the ValueObject.
-
+
 m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(),
   m_persistent_variable_sp->GetCompilerType(),
   m_persistent_variable_sp->GetName(),
   mem,
   eAddressTypeLoad,
   map.GetAddressByteSize());
-
+
 // Clear the flag if the variable will never be deallocated.
-
+
 if (m_persistent_variable_sp->m_flags & ExpressionVariable::EVKeepInTarget)
 {
 Error leak_error;
 map.Leak(mem, leak_error);
 m_persistent_variable_sp->m_flags &= ~ExpressionVariable::EVNeedsAllocation;
 }
-
+
 // Write the contents of the variable to the area.
-
+
 Error write_error;
-
+
 map.WriteMemory (mem,
  m_persistent_variable_sp->GetValueBytes(),
  m_persistent_variable_sp->GetByteSize(),
  write_error);
-
+
 if (!write_error.Success())
 {
 err.SetErrorStringWithFormat ("couldn't write %s to the target: %s", m_persistent_variable_sp->GetName().AsCString(),
   write_error.AsCString());
 return;
 }
 }
-
+
 void DestroyAllocation (IRMemoryMap &map, Error &err)
 {
 Error deallocate_error;
-
+
 map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(), deallocate_error);
-
+
 m_persistent_variable_sp->m_live_sp.reset();
-
+
 if (!deallocate_error.Success())
 {
 err.SetErrorStringWithFormat ("couldn't deallocate memory for %s: %s", m_persistent_variable_sp->GetName().GetCString(), deallocate_error.AsCString());
 }
 }
-
+
 void Materialize(lldb::StackFrameSP &frame_sp,
  IRMemoryMap &map,
  lldb::addr_t process_address,
  Error &err) override
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSe

[Lldb-commits] [PATCH] D17658: Register value is not necessarily scalar.

2016-02-26 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: aidan.dodds, mamai.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D17658

Files:
  source/Expression/Materializer.cpp

Index: source/Expression/Materializer.cpp
===
--- source/Expression/Materializer.cpp
+++ source/Expression/Materializer.cpp
@@ -35,35 +35,35 @@
 {
 uint32_t size = entity.GetSize();
 uint32_t alignment = entity.GetAlignment();
-
+
 uint32_t ret;
-
+
 if (m_current_offset == 0)
 m_struct_alignment = alignment;
-
+
 if (m_current_offset % alignment)
 m_current_offset += (alignment - (m_current_offset % alignment));
-
+
 ret = m_current_offset;
-
+
 m_current_offset += size;
-
+
 return ret;
 }
 
 void
 Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type)
 {
 m_size = type.GetByteSize(nullptr);
-
+
 uint32_t bit_alignment = type.GetTypeBitAlign();
-
+
 if (bit_alignment % 8)
 {
 bit_alignment += 8;
 bit_alignment &= ~((uint32_t)0x111u);
 }
-
+
 m_alignment = bit_alignment / 8;
 }
 
@@ -80,117 +80,117 @@
 m_size = 8;
 m_alignment = 8;
 }
-
+
 void MakeAllocation (IRMemoryMap &map, Error &err)
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
 // Allocate a spare memory area to store the persistent variable's contents.
-
+
 Error allocate_error;
 const bool zero_memory = false;
-
+
 lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(),
   8,
   lldb::ePermissionsReadable | lldb::ePermissionsWritable,
   IRMemoryMap::eAllocationPolicyMirror,
   zero_memory,
   allocate_error);
-
+
 if (!allocate_error.Success())
 {
 err.SetErrorStringWithFormat("couldn't allocate a memory area to store %s: %s", m_persistent_variable_sp->GetName().GetCString(), allocate_error.AsCString());
 return;
 }
-
+
 if (log)
 log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem);
-
+
 // Put the location of the spare memory into the live data of the ValueObject.
-
+
 m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(),
   m_persistent_variable_sp->GetCompilerType(),
   m_persistent_variable_sp->GetName(),
   mem,
   eAddressTypeLoad,
   map.GetAddressByteSize());
-
+
 // Clear the flag if the variable will never be deallocated.
-
+
 if (m_persistent_variable_sp->m_flags & ExpressionVariable::EVKeepInTarget)
 {
 Error leak_error;
 map.Leak(mem, leak_error);
 m_persistent_variable_sp->m_flags &= ~ExpressionVariable::EVNeedsAllocation;
 }
-
+
 // Write the contents of the variable to the area.
-
+
 Error write_error;
-
+
 map.WriteMemory (mem,
  m_persistent_variable_sp->GetValueBytes(),
  m_persistent_variable_sp->GetByteSize(),
  write_error);
-
+
 if (!write_error.Success())
 {
 err.SetErrorStringWithFormat ("couldn't write %s to the target: %s", m_persistent_variable_sp->GetName().AsCString(),
   write_error.AsCString());
 return;
 }
 }
-
+
 void DestroyAllocation (IRMemoryMap &map, Error &err)
 {
 Error deallocate_error;
-
+
 map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(), deallocate_error);
-
+
 m_persistent_variable_sp->m_live_sp.reset();
-
+
 if (!deallocate_error.Success())
 {
 err.SetErrorStringWithFormat ("couldn't deallocate memory for %s: %s", m_persistent_variable_sp->GetName().GetCString(), deallocate_error.AsCString());
 }
 }
-
+
 void Materialize(lldb::StackFrameSP &frame_sp,
  IRMemoryMap &map,
  lldb::addr_t process_address,
  Error &err) override
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet

Re: [Lldb-commits] [lldb] r262041 - Fix bug with register values byte order in expression evaluation.

2016-02-26 Thread Chaoren Lin via lldb-commits
Hmm. Weird. That assert is failing on Linux:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833

On Fri, Feb 26, 2016 at 9:40 AM, Aidan Dodds via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: aidandodds
> Date: Fri Feb 26 11:40:50 2016
> New Revision: 262041
>
> URL: http://llvm.org/viewvc/llvm-project?rev=262041&view=rev
> Log:
> Fix bug with register values byte order in expression evaluation.
>
> The evaluation of expressions containing register values was broken for
> targets for which endianness differs from host.
>
> Committed on behalf of: mamai 
>
> Differential revision: http://reviews.llvm.org/D17167
>
> Modified:
> lldb/trunk/source/Expression/Materializer.cpp
>
> Modified: lldb/trunk/source/Expression/Materializer.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff
>
> ==
> --- lldb/trunk/source/Expression/Materializer.cpp (original)
> +++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 11:40:50 2016
> @@ -26,6 +26,7 @@
>  #include "lldb/Target/StackFrame.h"
>  #include "lldb/Target/Target.h"
>  #include "lldb/Target/Thread.h"
> +#include "lldb/Utility/LLDBAssert.h"
>
>  using namespace lldb_private;
>
> @@ -1275,9 +1276,14 @@ public:
>  m_register_contents.reset(new
> DataBufferHeap(register_data.GetDataStart(), register_data.GetByteSize()));
>
>  Error write_error;
> -
> -map.WriteMemory(load_addr, register_data.GetDataStart(),
> register_data.GetByteSize(), write_error);
> -
> +
> +Scalar scalar;
> +reg_value.GetScalarValue(scalar);
> +
> +lldbassert(scalar.GetByteSize() == register_data.GetByteSize());
> +
> +map.WriteScalarToMemory(load_addr, scalar, scalar.GetByteSize(),
> write_error);
> +
>  if (!write_error.Success())
>  {
>  err.SetErrorStringWithFormat("couldn't write the contents of
> register %s: %s", m_register_info.name, write_error.AsCString());
>
>
> ___
> 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] r261953 - Add the "block" keyword to "thread step-in -e", and an alias that uses it: "sif " - i.e. step-into-function

2016-02-25 Thread Chaoren Lin via lldb-commits
It's okay. I think I fixed it with http://reviews.llvm.org/D17634

On Thu, Feb 25, 2016 at 6:55 PM, Jason Molenda  wrote:

> Jim just headed home - if you don't mind, please revert the commit.  He'll
> look into it tomorrow morning.
>
> J
>
>
> > On Feb 25, 2016, at 6:51 PM, Chaoren Lin via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >
> > Hi Jim,
> >
> > This broke a lot of our tests on Linux. E.g., "p foo" doesn't work.
> >
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11803
> >
> > Since the breakage is pretty severe, mind if I revert this first until
> the problem can be fixed?
> >
> > On Thu, Feb 25, 2016 at 5:42 PM Jim Ingham via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> > Author: jingham
> > Date: Thu Feb 25 19:37:30 2016
> > New Revision: 261953
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=261953&view=rev
> > Log:
> > Add the "block" keyword to "thread step-in -e", and an alias that uses
> it: "sif " - i.e. step-into-function
> > to allow you to step through a complex calling sequence into a
> particular function that may span multiple lines.  Also some
> > test cases for this and the --step-target feature.
> >
> >
> > Added:
> > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/
> > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
> >
>  
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/main.c
> > Modified:
> > lldb/trunk/source/Commands/CommandObjectThread.cpp
> > lldb/trunk/source/Interpreter/CommandInterpreter.cpp
> >
> > Added:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile?rev=261953&view=auto
> >
> ==
> > ---
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
> (added)
> > +++
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile Thu
> Feb 25 19:37:30 2016
> > @@ -0,0 +1,5 @@
> > +LEVEL = ../../../make
> > +
> > +C_SOURCES := main.c
> > +
> > +include $(LEVEL)/Makefile.rules
> >
> > Added:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py?rev=261953&view=auto
> >
> ==
> > ---
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> (added)
> > +++
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> Thu Feb 25 19:37:30 2016
> > @@ -0,0 +1,113 @@
> > +"""Test the 'step target' feature."""
> > +
> > +from __future__ import print_function
> > +
> > +import os, time
> > +import lldb
> > +from lldbsuite.test.decorators import *
> > +from lldbsuite.test.lldbtest import *
> > +from lldbsuite.test import lldbutil
> > +
> > +class TestStepTarget(TestBase):
> > +
> > +mydir = TestBase.compute_mydir(__file__)
> > +
> > +def getCategories(self):
> > +return ['basic_process']
> > +
> > +def setUp(self):
> > +# Call super's setUp().
> > +TestBase.setUp(self)
> > +# Find the line numbers that we will step to in main:
> > +self.main_source = "main.c"
> > +self.end_line = line_number(self.main_source, "All done")
> > +
> > +@add_test_categories(['pyapi'])
> > +
> > +def get_to_start (self):
> > +self.build()
> > +exe = os.path.join(os.getcwd(), "a.out")
> > +
> > +target = self.dbg.CreateTarget(exe)
> > +self.assertTrue(target, VALID_TARGET)
> > +
> > +self.main_source_spec = lldb.SBFileSpec (self.main_source)
> > +
> > +break_in_main = target.BreakpointCreateBySourceRegex ('Break
> here to try targetted stepping', self.main_source_spec)
> > +self.assertTrue(break_in_main, VALID_BREAKPOINT)
> > +self.assertTrue(break_in_main.GetNumLocations() > 0,&qu

Re: [Lldb-commits] [PATCH] D17634: Clear alias argument vector for 'p' alias.

2016-02-25 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL261969: Clear alias argument vector for 'p' alias. (authored 
by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D17634?vs=49147&id=49148#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17634

Files:
  lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Index: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
===
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp
@@ -337,6 +337,8 @@
 AddAlias ("image", cmd_obj_sp);
 
 
+alias_arguments_vector_sp.reset(new OptionArgVector);
+
 cmd_obj_sp = GetCommandSPExact ("expression", false);
 if (cmd_obj_sp)
 {


Index: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
===
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp
@@ -337,6 +337,8 @@
 AddAlias ("image", cmd_obj_sp);
 
 
+alias_arguments_vector_sp.reset(new OptionArgVector);
+
 cmd_obj_sp = GetCommandSPExact ("expression", false);
 if (cmd_obj_sp)
 {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r261969 - Clear alias argument vector for 'p' alias.

2016-02-25 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Feb 25 21:36:27 2016
New Revision: 261969

URL: http://llvm.org/viewvc/llvm-project?rev=261969&view=rev
Log:
Clear alias argument vector for 'p' alias.

Summary: This fixes the 'p' command which should be aliased to 'expresion --'.

Reviewers: jingham

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=261969&r1=261968&r2=261969&view=diff
==
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Thu Feb 25 21:36:27 
2016
@@ -337,6 +337,8 @@ CommandInterpreter::Initialize ()
 AddAlias ("image", cmd_obj_sp);
 
 
+alias_arguments_vector_sp.reset(new OptionArgVector);
+
 cmd_obj_sp = GetCommandSPExact ("expression", false);
 if (cmd_obj_sp)
 {


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


[Lldb-commits] [PATCH] D17634: Clear alias argument vector for 'p' alias.

2016-02-25 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: jingham.
chaoren added a subscriber: lldb-commits.

This fixes the 'p' command which should be aliased to 'expresion --'.

http://reviews.llvm.org/D17634

Files:
  source/Interpreter/CommandInterpreter.cpp

Index: source/Interpreter/CommandInterpreter.cpp
===
--- source/Interpreter/CommandInterpreter.cpp
+++ source/Interpreter/CommandInterpreter.cpp
@@ -337,6 +337,8 @@
 AddAlias ("image", cmd_obj_sp);
 
 
+alias_arguments_vector_sp.reset(new OptionArgVector);
+
 cmd_obj_sp = GetCommandSPExact ("expression", false);
 if (cmd_obj_sp)
 {


Index: source/Interpreter/CommandInterpreter.cpp
===
--- source/Interpreter/CommandInterpreter.cpp
+++ source/Interpreter/CommandInterpreter.cpp
@@ -337,6 +337,8 @@
 AddAlias ("image", cmd_obj_sp);
 
 
+alias_arguments_vector_sp.reset(new OptionArgVector);
+
 cmd_obj_sp = GetCommandSPExact ("expression", false);
 if (cmd_obj_sp)
 {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r261953 - Add the "block" keyword to "thread step-in -e", and an alias that uses it: "sif " - i.e. step-into-function

2016-02-25 Thread Chaoren Lin via lldb-commits
Hi Jim,

This broke a lot of our tests on Linux. E.g., "p foo" doesn't work.
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11803

Since the breakage is pretty severe, mind if I revert this first until the
problem can be fixed?

On Thu, Feb 25, 2016 at 5:42 PM Jim Ingham via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: jingham
> Date: Thu Feb 25 19:37:30 2016
> New Revision: 261953
>
> URL: http://llvm.org/viewvc/llvm-project?rev=261953&view=rev
> Log:
> Add the "block" keyword to "thread step-in -e", and an alias that uses it:
> "sif " - i.e. step-into-function
> to allow you to step through a complex calling sequence into a particular
> function that may span multiple lines.  Also some
> test cases for this and the --step-target feature.
>
>
> Added:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
>
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/main.c
> Modified:
> lldb/trunk/source/Commands/CommandObjectThread.cpp
> lldb/trunk/source/Interpreter/CommandInterpreter.cpp
>
> Added:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile?rev=261953&view=auto
>
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
> (added)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
> Thu Feb 25 19:37:30 2016
> @@ -0,0 +1,5 @@
> +LEVEL = ../../../make
> +
> +C_SOURCES := main.c
> +
> +include $(LEVEL)/Makefile.rules
>
> Added:
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py?rev=261953&view=auto
>
> ==
> ---
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> (added)
> +++
> lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
> Thu Feb 25 19:37:30 2016
> @@ -0,0 +1,113 @@
> +"""Test the 'step target' feature."""
> +
> +from __future__ import print_function
> +
> +import os, time
> +import lldb
> +from lldbsuite.test.decorators import *
> +from lldbsuite.test.lldbtest import *
> +from lldbsuite.test import lldbutil
> +
> +class TestStepTarget(TestBase):
> +
> +mydir = TestBase.compute_mydir(__file__)
> +
> +def getCategories(self):
> +return ['basic_process']
> +
> +def setUp(self):
> +# Call super's setUp().
> +TestBase.setUp(self)
> +# Find the line numbers that we will step to in main:
> +self.main_source = "main.c"
> +self.end_line = line_number(self.main_source, "All done")
> +
> +@add_test_categories(['pyapi'])
> +
> +def get_to_start (self):
> +self.build()
> +exe = os.path.join(os.getcwd(), "a.out")
> +
> +target = self.dbg.CreateTarget(exe)
> +self.assertTrue(target, VALID_TARGET)
> +
> +self.main_source_spec = lldb.SBFileSpec (self.main_source)
> +
> +break_in_main = target.BreakpointCreateBySourceRegex ('Break here
> to try targetted stepping', self.main_source_spec)
> +self.assertTrue(break_in_main, VALID_BREAKPOINT)
> +self.assertTrue(break_in_main.GetNumLocations() > 0,"Has
> locations.")
> +
> +# Now launch the process, and do not stop at entry point.
> +process = target.LaunchSimple (None, None,
> self.get_process_working_directory())
> +
> +self.assertTrue(process, PROCESS_IS_VALID)
> +
> +# The stop reason of the thread should be breakpoint.
> +threads = lldbutil.get_threads_stopped_at_breakpoint (process,
> break_in_main)
> +
> +if len(threads) != 1:
> +self.fail ("Failed to stop at first breakpoint in main.")
> +
> +thread = threads[0]
> +return thread
> +
> +def test_with_end_line(self):
> +"""Test stepping over vrs. hitting breakpoints & subsequent
> stepping in various forms."""
> +
> +thread = self.get_to_start()
> +
> +error = lldb.SBError()
> +thread.StepInto("lotsOfArgs", self.end_line, error)
> +frame = thread.frames[0]
> +
> +self.assertTrue (frame.name == "lotsOfArgs", "Stepped to
> lotsOfArgs.")
> +
> +def test_with_end_line_bad_name(self):
> +"""Test stepping over vrs. hitting breakpoints & subsequent
> stepping in various forms."""
> +
> +thread = self.get_to_start()
> +
> +error = lldb.SBError()
> +thread.StepInto("lotsOfArg", self.end_line, error)
> +frame = thread.frames[0]
> +self.assertTru

[Lldb-commits] [lldb] r261718 - Fix TestCStrings for Linux with i386 inferiors.

2016-02-23 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Feb 23 21:15:21 2016
New Revision: 261718

URL: http://llvm.org/viewvc/llvm-project?rev=261718&view=rev
Log:
Fix TestCStrings for Linux with i386 inferiors.

Summary: Temporarily revert part of r261704.

Reviewers: spyffe

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Expression/IRExecutionUnit.cpp

Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=261718&r1=261717&r2=261718&view=diff
==
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Tue Feb 23 21:15:21 2016
@@ -213,7 +213,7 @@ IRExecutionUnit::DisassembleFunction (St
 
 InstructionList &instruction_list = disassembler_sp->GetInstructionList();
 instruction_list.Dump(&stream, true, true, &exe_ctx);
-
+
 // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if 
it has any active instructions.
 // I'll fix that but for now, just clear the list and it will go away 
nicely.
 disassembler_sp->GetInstructionList().Clear();
@@ -297,7 +297,7 @@ IRExecutionUnit::GetRunnableInfo(Error &
 {
 relocModel = llvm::Reloc::PIC_;
 }
-
+
 // This will be small for 32-bit and large for 64-bit.
 codeModel = llvm::CodeModel::JITDefault;
 
@@ -325,7 +325,7 @@ IRExecutionUnit::GetRunnableInfo(Error &
mAttrs);
 
 m_execution_engine_ap.reset(builder.create(target_machine));
-
+
 m_strip_underscore = 
(m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_');
 
 if (!m_execution_engine_ap.get())
@@ -373,11 +373,11 @@ IRExecutionUnit::GetRunnableInfo(Error &
 if (m_failed_lookups.size())
 {
 StreamString ss;
-
+
 ss.PutCString("Couldn't lookup symbols:\n");
-
+
 bool emitNewLine = false;
-
+
 for (const ConstString &failed_lookup : m_failed_lookups)
 {
 if (emitNewLine)
@@ -386,14 +386,14 @@ IRExecutionUnit::GetRunnableInfo(Error &
 ss.PutCString("  ");
 
ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString());
 }
-
+
 m_failed_lookups.clear();
-
+
 error.SetErrorString(ss.GetData());
-
+
 return;
 }
-
+
 m_function_load_addr = LLDB_INVALID_ADDRESS;
 m_function_end_load_addr = LLDB_INVALID_ADDRESS;
 
@@ -446,7 +446,7 @@ IRExecutionUnit::GetRunnableInfo(Error &
 else
 {
 record.dump(log);
-
+
 DataExtractor my_extractor ((const 
void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8);
 my_extractor.PutToLog(log, 0, record.m_size, 
record.m_host_address, 16, DataExtractor::TypeUInt8);
 }
@@ -731,20 +731,20 @@ IRExecutionUnit::CollectCandidateCPlusPl
 {
 Mangled mangled(name, true);
 ConstString demangled = 
mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus);
-
+
 if (demangled)
 {
 ConstString best_alternate_mangled_name = 
FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc);
-
+
 if (best_alternate_mangled_name)
 {
 CPP_specs.push_back(best_alternate_mangled_name);
 }
-
+
 CPP_specs.push_back(SearchSpec(demangled, 
lldb::eFunctionNameTypeFull));
 }
 }
-
+
 // Maybe we're looking for a const symbol but the debug info told us 
it was const...
 if (!strncmp(name.GetCString(), "_ZN", 3) &&
 strncmp(name.GetCString(), "_ZNK", 4))
@@ -753,7 +753,7 @@ IRExecutionUnit::CollectCandidateCPlusPl
 fixed_scratch.append(name.GetCString() + 3);
 CPP_specs.push_back(ConstString(fixed_scratch.c_str()));
 }
-
+
 // Maybe we're looking for a static symbol but we thought it was 
global...
 if (!strncmp(name.GetCString(), "_Z", 2) &&
 strncmp(name.GetCString(), "_ZL", 3))
@@ -799,33 +799,28 @@ IRExecutionUnit::FindInSymbols(const std
 const bool is_external = (candidate_sc.function) ||
  (candidate_sc.symbol && 
candidate_sc.symbol->IsExternal());
 
-AddressRange range;
+load_address = 
candidate_sc.symbol->ResolveCallableAddress(*target);
 
-if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction 
| lldb::eSymbolContextSymbol,
- 0,
-  

Re: [Lldb-commits] [PATCH] D17557: Fix TestCStrings for Linux with i386 inferiors.

2016-02-23 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL261718: Fix TestCStrings for Linux with i386 inferiors. 
(authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D17557?vs=48867&id=48878#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17557

Files:
  lldb/trunk/source/Expression/IRExecutionUnit.cpp

Index: lldb/trunk/source/Expression/IRExecutionUnit.cpp
===
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp
@@ -213,7 +213,7 @@
 
 InstructionList &instruction_list = disassembler_sp->GetInstructionList();
 instruction_list.Dump(&stream, true, true, &exe_ctx);
-
+
 // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions.
 // I'll fix that but for now, just clear the list and it will go away nicely.
 disassembler_sp->GetInstructionList().Clear();
@@ -297,7 +297,7 @@
 {
 relocModel = llvm::Reloc::PIC_;
 }
-
+
 // This will be small for 32-bit and large for 64-bit.
 codeModel = llvm::CodeModel::JITDefault;
 
@@ -325,7 +325,7 @@
mAttrs);
 
 m_execution_engine_ap.reset(builder.create(target_machine));
-
+
 m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_');
 
 if (!m_execution_engine_ap.get())
@@ -373,27 +373,27 @@
 if (m_failed_lookups.size())
 {
 StreamString ss;
-
+
 ss.PutCString("Couldn't lookup symbols:\n");
-
+
 bool emitNewLine = false;
-
+
 for (const ConstString &failed_lookup : m_failed_lookups)
 {
 if (emitNewLine)
 ss.PutCString("\n");
 emitNewLine = true;
 ss.PutCString("  ");
 ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString());
 }
-
+
 m_failed_lookups.clear();
-
+
 error.SetErrorString(ss.GetData());
-
+
 return;
 }
-
+
 m_function_load_addr = LLDB_INVALID_ADDRESS;
 m_function_end_load_addr = LLDB_INVALID_ADDRESS;
 
@@ -446,7 +446,7 @@
 else
 {
 record.dump(log);
-
+
 DataExtractor my_extractor ((const void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8);
 my_extractor.PutToLog(log, 0, record.m_size, record.m_host_address, 16, DataExtractor::TypeUInt8);
 }
@@ -731,29 +731,29 @@
 {
 Mangled mangled(name, true);
 ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus);
-
+
 if (demangled)
 {
 ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc);
-
+
 if (best_alternate_mangled_name)
 {
 CPP_specs.push_back(best_alternate_mangled_name);
 }
-
+
 CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull));
 }
 }
-
+
 // Maybe we're looking for a const symbol but the debug info told us it was const...
 if (!strncmp(name.GetCString(), "_ZN", 3) &&
 strncmp(name.GetCString(), "_ZNK", 4))
 {
 std::string fixed_scratch("_ZNK");
 fixed_scratch.append(name.GetCString() + 3);
 CPP_specs.push_back(ConstString(fixed_scratch.c_str()));
 }
-
+
 // Maybe we're looking for a static symbol but we thought it was global...
 if (!strncmp(name.GetCString(), "_Z", 2) &&
 strncmp(name.GetCString(), "_ZL", 3))
@@ -799,33 +799,28 @@
 const bool is_external = (candidate_sc.function) ||
  (candidate_sc.symbol && candidate_sc.symbol->IsExternal());
 
-AddressRange range;
+load_address = candidate_sc.symbol->ResolveCallableAddress(*target);
 
-if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol,
- 0,
- false,
- range))
-{
-load_address = range.GetBaseAddress().GetCallableLoadAddress(target);
+if (load_address == LLDB_INVALID_ADDRESS)
+load_address = candidate_sc.symbol->GetAddress().GetLoadAddress(target);
 
-if (load_address != LLDB_INVALID_ADDRESS)
+if (load_address != LLDB_INVALID_ADDRESS)
+{
+if (is_e

Re: [Lldb-commits] [PATCH] D17557: Fix TestCStrings for Linux with i386 inferiors.

2016-02-23 Thread Chaoren Lin via lldb-commits
chaoren updated this revision to Diff 48867.
chaoren added a comment.

Use target instead of sc.target_sp.get().


http://reviews.llvm.org/D17557

Files:
  source/Expression/IRExecutionUnit.cpp

Index: source/Expression/IRExecutionUnit.cpp
===
--- source/Expression/IRExecutionUnit.cpp
+++ source/Expression/IRExecutionUnit.cpp
@@ -213,7 +213,7 @@
 
 InstructionList &instruction_list = disassembler_sp->GetInstructionList();
 instruction_list.Dump(&stream, true, true, &exe_ctx);
-
+
 // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions.
 // I'll fix that but for now, just clear the list and it will go away nicely.
 disassembler_sp->GetInstructionList().Clear();
@@ -297,7 +297,7 @@
 {
 relocModel = llvm::Reloc::PIC_;
 }
-
+
 // This will be small for 32-bit and large for 64-bit.
 codeModel = llvm::CodeModel::JITDefault;
 
@@ -325,7 +325,7 @@
mAttrs);
 
 m_execution_engine_ap.reset(builder.create(target_machine));
-
+
 m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_');
 
 if (!m_execution_engine_ap.get())
@@ -373,27 +373,27 @@
 if (m_failed_lookups.size())
 {
 StreamString ss;
-
+
 ss.PutCString("Couldn't lookup symbols:\n");
-
+
 bool emitNewLine = false;
-
+
 for (const ConstString &failed_lookup : m_failed_lookups)
 {
 if (emitNewLine)
 ss.PutCString("\n");
 emitNewLine = true;
 ss.PutCString("  ");
 ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString());
 }
-
+
 m_failed_lookups.clear();
-
+
 error.SetErrorString(ss.GetData());
-
+
 return;
 }
-
+
 m_function_load_addr = LLDB_INVALID_ADDRESS;
 m_function_end_load_addr = LLDB_INVALID_ADDRESS;
 
@@ -446,7 +446,7 @@
 else
 {
 record.dump(log);
-
+
 DataExtractor my_extractor ((const void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8);
 my_extractor.PutToLog(log, 0, record.m_size, record.m_host_address, 16, DataExtractor::TypeUInt8);
 }
@@ -731,29 +731,29 @@
 {
 Mangled mangled(name, true);
 ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus);
-
+
 if (demangled)
 {
 ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc);
-
+
 if (best_alternate_mangled_name)
 {
 CPP_specs.push_back(best_alternate_mangled_name);
 }
-
+
 CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull));
 }
 }
-
+
 // Maybe we're looking for a const symbol but the debug info told us it was const...
 if (!strncmp(name.GetCString(), "_ZN", 3) &&
 strncmp(name.GetCString(), "_ZNK", 4))
 {
 std::string fixed_scratch("_ZNK");
 fixed_scratch.append(name.GetCString() + 3);
 CPP_specs.push_back(ConstString(fixed_scratch.c_str()));
 }
-
+
 // Maybe we're looking for a static symbol but we thought it was global...
 if (!strncmp(name.GetCString(), "_Z", 2) &&
 strncmp(name.GetCString(), "_ZL", 3))
@@ -799,33 +799,28 @@
 const bool is_external = (candidate_sc.function) ||
  (candidate_sc.symbol && candidate_sc.symbol->IsExternal());
 
-AddressRange range;
+load_address = candidate_sc.symbol->ResolveCallableAddress(*target);
 
-if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol,
- 0,
- false,
- range))
-{
-load_address = range.GetBaseAddress().GetCallableLoadAddress(target);
+if (load_address == LLDB_INVALID_ADDRESS)
+load_address = candidate_sc.symbol->GetAddress().GetLoadAddress(target);
 
-if (load_address != LLDB_INVALID_ADDRESS)
+if (load_address != LLDB_INVALID_ADDRESS)
+{
+if (is_external)
 {
-if (is_external)
-{
-return true;
-}
-else if (bes

[Lldb-commits] [PATCH] D17557: Fix TestCStrings for Linux with i386 inferiors.

2016-02-23 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: spyffe.
chaoren added a subscriber: lldb-commits.

Temporarily revert part of r261704.

http://reviews.llvm.org/D17557

Files:
  source/Expression/IRExecutionUnit.cpp

Index: source/Expression/IRExecutionUnit.cpp
===
--- source/Expression/IRExecutionUnit.cpp
+++ source/Expression/IRExecutionUnit.cpp
@@ -213,7 +213,7 @@
 
 InstructionList &instruction_list = disassembler_sp->GetInstructionList();
 instruction_list.Dump(&stream, true, true, &exe_ctx);
-
+
 // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions.
 // I'll fix that but for now, just clear the list and it will go away nicely.
 disassembler_sp->GetInstructionList().Clear();
@@ -297,7 +297,7 @@
 {
 relocModel = llvm::Reloc::PIC_;
 }
-
+
 // This will be small for 32-bit and large for 64-bit.
 codeModel = llvm::CodeModel::JITDefault;
 
@@ -325,7 +325,7 @@
mAttrs);
 
 m_execution_engine_ap.reset(builder.create(target_machine));
-
+
 m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_');
 
 if (!m_execution_engine_ap.get())
@@ -373,27 +373,27 @@
 if (m_failed_lookups.size())
 {
 StreamString ss;
-
+
 ss.PutCString("Couldn't lookup symbols:\n");
-
+
 bool emitNewLine = false;
-
+
 for (const ConstString &failed_lookup : m_failed_lookups)
 {
 if (emitNewLine)
 ss.PutCString("\n");
 emitNewLine = true;
 ss.PutCString("  ");
 ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString());
 }
-
+
 m_failed_lookups.clear();
-
+
 error.SetErrorString(ss.GetData());
-
+
 return;
 }
-
+
 m_function_load_addr = LLDB_INVALID_ADDRESS;
 m_function_end_load_addr = LLDB_INVALID_ADDRESS;
 
@@ -446,7 +446,7 @@
 else
 {
 record.dump(log);
-
+
 DataExtractor my_extractor ((const void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8);
 my_extractor.PutToLog(log, 0, record.m_size, record.m_host_address, 16, DataExtractor::TypeUInt8);
 }
@@ -731,29 +731,29 @@
 {
 Mangled mangled(name, true);
 ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus);
-
+
 if (demangled)
 {
 ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc);
-
+
 if (best_alternate_mangled_name)
 {
 CPP_specs.push_back(best_alternate_mangled_name);
 }
-
+
 CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull));
 }
 }
-
+
 // Maybe we're looking for a const symbol but the debug info told us it was const...
 if (!strncmp(name.GetCString(), "_ZN", 3) &&
 strncmp(name.GetCString(), "_ZNK", 4))
 {
 std::string fixed_scratch("_ZNK");
 fixed_scratch.append(name.GetCString() + 3);
 CPP_specs.push_back(ConstString(fixed_scratch.c_str()));
 }
-
+
 // Maybe we're looking for a static symbol but we thought it was global...
 if (!strncmp(name.GetCString(), "_Z", 2) &&
 strncmp(name.GetCString(), "_ZL", 3))
@@ -799,33 +799,28 @@
 const bool is_external = (candidate_sc.function) ||
  (candidate_sc.symbol && candidate_sc.symbol->IsExternal());
 
-AddressRange range;
+load_address = candidate_sc.symbol->ResolveCallableAddress(*target);
 
-if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol,
- 0,
- false,
- range))
-{
-load_address = range.GetBaseAddress().GetCallableLoadAddress(target);
+if (load_address == LLDB_INVALID_ADDRESS)
+load_address = candidate_sc.symbol->GetAddress().GetLoadAddress(sc.target_sp.get());
 
-if (load_address != LLDB_INVALID_ADDRESS)
+if (load_address != LLDB_INVALID_ADDRESS)
+{
+if (is_external)
 {
-if (is_external)
-{
-return true;
- 

Re: [Lldb-commits] [lldb] r261704 - When looking for symbols, find load addresses in a more robust way.

2016-02-23 Thread Chaoren Lin via lldb-commits
Hi Sean,

On Linux with i386 inferiors,

range.GetBaseAddress().GetCallableLoadAddress(target);

returns the wrong load address for strlen, while

candidate_sc.symbol->ResolveCallableAddress(*target);

returns the correct load address.

This is causing TestCStrings to fail on our bot:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11726

Do you know why this might be happening?

May I revert back to using

candidate_sc.symbol->ResolveCallableAddress(*target);

and

candidate_sc.symbol->GetAddress().GetLoadAddress(target);

while you look into it?

On Tue, Feb 23, 2016 at 3:13 PM Sean Callanan via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: spyffe
> Date: Tue Feb 23 17:09:06 2016
> New Revision: 261704
>
> URL: http://llvm.org/viewvc/llvm-project?rev=261704&view=rev
> Log:
> When looking for symbols, find load addresses in a more robust way.
>
> IRExecutionUnit previously replicated a bunch of logic that already
> existed elsewhere for the purpose of getting a load address for a
> symbol.  This approach failed to resolve certain types of symbols.
> Instead, we now use functions on SymbolContext to do the address
> resolution.
>
> This is a cleanup of IRExecutionUnit::FindInSymbols, and also fixes a
> latent bug where we looked at the wrong SymbolContext to determine
> whether or not it is external.
>
> 
>
> Modified:
> lldb/trunk/source/Expression/IRExecutionUnit.cpp
>
> Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=261704&r1=261703&r2=261704&view=diff
>
> ==
> --- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
> +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Tue Feb 23 17:09:06
> 2016
> @@ -769,9 +769,62 @@ IRExecutionUnit::CollectCandidateCPlusPl
>  lldb::addr_t
>  IRExecutionUnit::FindInSymbols(const
> std::vector &specs, const
> lldb_private::SymbolContext &sc)
>  {
> +Target *target = sc.target_sp.get();
> +
> +if (!target)
> +{
> +// we shouldn't be doing any symbol lookup at all without a target
> +return LLDB_INVALID_ADDRESS;
> +}
> +
>  for (const SearchSpec &spec : specs)
>  {
>  SymbolContextList sc_list;
> +
> +lldb::addr_t best_internal_load_address = LLDB_INVALID_ADDRESS;
> +
> +std::function lldb_private::SymbolContext &)> get_external_load_address =
> +[&best_internal_load_address, target](lldb::addr_t
> &load_address,
> +  SymbolContextList
> &sc_list,
> +  const
> lldb_private::SymbolContext &sc) -> lldb::addr_t
> +{
> +load_address = LLDB_INVALID_ADDRESS;
> +
> +for (size_t si = 0, se = sc_list.GetSize(); si < se; ++si)
> +{
> +SymbolContext candidate_sc;
> +
> +sc_list.GetContextAtIndex(si, candidate_sc);
> +
> +const bool is_external = (candidate_sc.function) ||
> + (candidate_sc.symbol &&
> candidate_sc.symbol->IsExternal());
> +
> +AddressRange range;
> +
> +if
> (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction |
> lldb::eSymbolContextSymbol,
> + 0,
> + false,
> + range))
> +{
> +load_address =
> range.GetBaseAddress().GetCallableLoadAddress(target);
> +
> +if (load_address != LLDB_INVALID_ADDRESS)
> +{
> +if (is_external)
> +{
> +return true;
> +}
> +else if (best_internal_load_address ==
> LLDB_INVALID_ADDRESS)
> +{
> +best_internal_load_address = load_address;
> +load_address = LLDB_INVALID_ADDRESS;
> +}
> +}
> +}
> +}
> +
> +return false;
> +};
>
>  if (sc.module_sp)
>  {
> @@ -783,6 +836,17 @@ IRExecutionUnit::FindInSymbols(const std
>  true,  // append
>  sc_list);
>  }
> +
> +lldb::addr_t load_address = LLDB_INVALID_ADDRESS;
> +
> +if (get_external_load_address(load_address, sc_list, sc))
> +{
> +return load_address;
> +}
> +else
> +{
> +sc_list.Clear();
> +}
>
>  if (sc_list.GetSize() == 0 && sc.target_sp)
>  {
> @@ -794,49 +858,26 @@ IRExecutionUnit::FindInSymbols(const std
>   

[Lldb-commits] [lldb] r259153 - Fix TestDataFormatterScript for Linux.

2016-01-28 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Jan 28 21:48:08 2016
New Revision: 259153

URL: http://llvm.org/viewvc/llvm-project?rev=259153&view=rev
Log:
Fix TestDataFormatterScript for Linux.

Summary:
m_function_name will contain a dummy name for the auto-generated function from
the python script on Linux. Check for script name first.

Reviewers: granata.enrico

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/DataFormatters/TypeSummary.cpp

Modified: lldb/trunk/source/DataFormatters/TypeSummary.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeSummary.cpp?rev=259153&r1=259152&r2=259153&view=diff
==
--- lldb/trunk/source/DataFormatters/TypeSummary.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeSummary.cpp Thu Jan 28 21:48:08 2016
@@ -263,21 +263,20 @@ ScriptSummaryFormat::GetDescription ()
  SkipsPointers() ? " (skip pointers)" : "",
  SkipsReferences() ? " (skip references)" : "",
  HideNames(nullptr) ? " (hide member names)" : "");
-if (m_function_name.empty())
+if (m_python_script.empty())
 {
-if (m_python_script.empty())
+if (m_function_name.empty())
 {
 sstr.PutCString("no backing script");
 }
 else
 {
-sstr.PutCString(m_python_script.c_str());
+sstr.PutCString(m_function_name.c_str());
 }
 }
 else
 {
-sstr.PutCString(m_function_name.c_str());
+sstr.PutCString(m_python_script.c_str());
 }
 return sstr.GetString();
-
 }


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


Re: [Lldb-commits] [PATCH] D16703: Fix TestDataFormatterScript for Linux.

2016-01-28 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL259153: Fix TestDataFormatterScript for Linux. (authored by 
chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D16703?vs=46330&id=46340#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16703

Files:
  lldb/trunk/source/DataFormatters/TypeSummary.cpp

Index: lldb/trunk/source/DataFormatters/TypeSummary.cpp
===
--- lldb/trunk/source/DataFormatters/TypeSummary.cpp
+++ lldb/trunk/source/DataFormatters/TypeSummary.cpp
@@ -263,21 +263,20 @@
  SkipsPointers() ? " (skip pointers)" : "",
  SkipsReferences() ? " (skip references)" : "",
  HideNames(nullptr) ? " (hide member names)" : "");
-if (m_function_name.empty())
+if (m_python_script.empty())
 {
-if (m_python_script.empty())
+if (m_function_name.empty())
 {
 sstr.PutCString("no backing script");
 }
 else
 {
-sstr.PutCString(m_python_script.c_str());
+sstr.PutCString(m_function_name.c_str());
 }
 }
 else
 {
-sstr.PutCString(m_function_name.c_str());
+sstr.PutCString(m_python_script.c_str());
 }
 return sstr.GetString();
-
 }


Index: lldb/trunk/source/DataFormatters/TypeSummary.cpp
===
--- lldb/trunk/source/DataFormatters/TypeSummary.cpp
+++ lldb/trunk/source/DataFormatters/TypeSummary.cpp
@@ -263,21 +263,20 @@
  SkipsPointers() ? " (skip pointers)" : "",
  SkipsReferences() ? " (skip references)" : "",
  HideNames(nullptr) ? " (hide member names)" : "");
-if (m_function_name.empty())
+if (m_python_script.empty())
 {
-if (m_python_script.empty())
+if (m_function_name.empty())
 {
 sstr.PutCString("no backing script");
 }
 else
 {
-sstr.PutCString(m_python_script.c_str());
+sstr.PutCString(m_function_name.c_str());
 }
 }
 else
 {
-sstr.PutCString(m_function_name.c_str());
+sstr.PutCString(m_python_script.c_str());
 }
 return sstr.GetString();
-
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D16703: Fix TestDataFormatterScript for Linux.

2016-01-28 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: granata.enrico.
chaoren added a subscriber: lldb-commits.

m_function_name will contain a dummy name for the auto-generated function from
the python script on Linux. Check for script name first.

http://reviews.llvm.org/D16703

Files:
  source/DataFormatters/TypeSummary.cpp

Index: source/DataFormatters/TypeSummary.cpp
===
--- source/DataFormatters/TypeSummary.cpp
+++ source/DataFormatters/TypeSummary.cpp
@@ -263,21 +263,20 @@
  SkipsPointers() ? " (skip pointers)" : "",
  SkipsReferences() ? " (skip references)" : "",
  HideNames(nullptr) ? " (hide member names)" : "");
-if (m_function_name.empty())
+if (m_python_script.empty())
 {
-if (m_python_script.empty())
+if (m_function_name.empty())
 {
 sstr.PutCString("no backing script");
 }
 else
 {
-sstr.PutCString(m_python_script.c_str());
+sstr.PutCString(m_function_name.c_str());
 }
 }
 else
 {
-sstr.PutCString(m_function_name.c_str());
+sstr.PutCString(m_python_script.c_str());
 }
 return sstr.GetString();
-
 }


Index: source/DataFormatters/TypeSummary.cpp
===
--- source/DataFormatters/TypeSummary.cpp
+++ source/DataFormatters/TypeSummary.cpp
@@ -263,21 +263,20 @@
  SkipsPointers() ? " (skip pointers)" : "",
  SkipsReferences() ? " (skip references)" : "",
  HideNames(nullptr) ? " (hide member names)" : "");
-if (m_function_name.empty())
+if (m_python_script.empty())
 {
-if (m_python_script.empty())
+if (m_function_name.empty())
 {
 sstr.PutCString("no backing script");
 }
 else
 {
-sstr.PutCString(m_python_script.c_str());
+sstr.PutCString(m_function_name.c_str());
 }
 }
 else
 {
-sstr.PutCString(m_function_name.c_str());
+sstr.PutCString(m_python_script.c_str());
 }
 return sstr.GetString();
-
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r259086 - Fix build after rL259070.

2016-01-28 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Jan 28 14:25:46 2016
New Revision: 259086

URL: http://llvm.org/viewvc/llvm-project?rev=259086&view=rev
Log:
Fix build after rL259070.

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=259086&r1=259085&r2=259086&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Thu Jan 
28 14:25:46 2016
@@ -1378,7 +1378,7 @@ FindObjCPropertyAndIvarDeclsWithOrigin (
 StringRef name(name_str.c_str());
 IdentifierInfo 
&name_identifier(origin_iface_decl->getASTContext().Idents.get(name));
 
-DeclFromUser 
origin_property_decl(origin_iface_decl->FindPropertyDeclaration(&name_identifier,
 ObjCPropertyDecl::OBJC_PR_query_instance));
+DeclFromUser 
origin_property_decl(origin_iface_decl->FindPropertyDeclaration(&name_identifier,
 ObjCPropertyQueryKind::OBJC_PR_query_instance));
 
 bool found = false;
 


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


Re: [Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

2015-11-06 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252391: Fix TestThreadSpecificBreakpoint.py on Linux after 
rL252355. (authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D14472?vs=39615&id=39616#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14472

Files:
  lldb/trunk/source/Target/ThreadList.cpp

Index: lldb/trunk/source/Target/ThreadList.cpp
===
--- lldb/trunk/source/Target/ThreadList.cpp
+++ lldb/trunk/source/Target/ThreadList.cpp
@@ -262,7 +262,11 @@
 // This is an optimization...  If we didn't let a thread run in 
between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just 
leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, 
it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional 
expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it 
hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || 
thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 


Index: lldb/trunk/source/Target/ThreadList.cpp
===
--- lldb/trunk/source/Target/ThreadList.cpp
+++ lldb/trunk/source/Target/ThreadList.cpp
@@ -262,7 +262,11 @@
 // This is an optimization...  If we didn't let a thread run in between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252391 - Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

2015-11-06 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Fri Nov  6 20:16:31 2015
New Revision: 252391

URL: http://llvm.org/viewvc/llvm-project?rev=252391&view=rev
Log:
Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

Summary:
On Linux, if a thread-specific conditional breakpoint was hit, it
won't necessarily be the thread that hit the breakpoint itself that
evaluates the conditional expression, so the thread that hit the
breakpoint could still be asked to stop, even though it hasn't been
allowed to run since the previous stop.

Reviewers: sivachandra, jingham

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Target/ThreadList.cpp

Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=252391&r1=252390&r2=252391&view=diff
==
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Fri Nov  6 20:16:31 2015
@@ -262,7 +262,11 @@ ThreadList::ShouldStop (Event *event_ptr
 // This is an optimization...  If we didn't let a thread run in 
between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just 
leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, 
it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional 
expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it 
hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || 
thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 


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


[Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

2015-11-06 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: sivachandra, jingham.
chaoren added a subscriber: lldb-commits.

On Linux, if a thread-specific conditional breakpoint was hit, it
won't necessarily be the thread that hit the breakpoint itself that
evaluates the conditional expression, so the thread that hit the
breakpoint could still be asked to stop, even though it hasn't been
allowed to run since the previous stop.

http://reviews.llvm.org/D14472

Files:
  source/Target/ThreadList.cpp

Index: source/Target/ThreadList.cpp
===
--- source/Target/ThreadList.cpp
+++ source/Target/ThreadList.cpp
@@ -262,7 +262,11 @@
 // This is an optimization...  If we didn't let a thread run in 
between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just 
leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, 
it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional 
expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it 
hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || 
thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 


Index: source/Target/ThreadList.cpp
===
--- source/Target/ThreadList.cpp
+++ source/Target/ThreadList.cpp
@@ -262,7 +262,11 @@
 // This is an optimization...  If we didn't let a thread run in between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252353 - Fix Linux tests after r252348.

2015-11-06 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Fri Nov  6 16:30:30 2015
New Revision: 252353

URL: http://llvm.org/viewvc/llvm-project?rev=252353&view=rev
Log:
Fix Linux tests after r252348.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252353&r1=252352&r2=252353&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Nov  6 16:30:30 2015
@@ -1727,6 +1727,7 @@ def run_suite():
 if iterArchs or iterCompilers:
 # Translate ' ' to '-' for pathname component.
 if six.PY2:
+import string
 tbl = string.maketrans(' ', '-')
 else:
 tbl = str.maketrans(' ', '-')


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


[Lldb-commits] [lldb] r252230 - Another import fix for OS X.

2015-11-05 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Nov  5 17:19:27 2015
New Revision: 252230

URL: http://llvm.org/viewvc/llvm-project?rev=252230&view=rev
Log:
Another import fix for OS X.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252230&r1=252229&r2=252230&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Nov  5 17:19:27 2015
@@ -364,7 +364,7 @@ o GDB_REMOTE_LOG: if defined, specifies
 
 
 def setCrashInfoHook_Mac(text):
-import crashinfo
+from . import crashinfo
 crashinfo.setCrashReporterDescription(text)
 
 # implement this in some suitable way for your platform, and then bind it


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


Re: [Lldb-commits] [lldb] r252191 - Python 3 - Turn on absolute imports, and fix existing imports.

2015-11-05 Thread Chaoren Lin via lldb-commits
rL252218 should hopefully fix it.

On Thu, Nov 5, 2015 at 1:53 PM, Chaoren Lin  wrote:

> Hi, I think this changed caused all of the OS X tests to fail:
>
>
> http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/6969/steps/test1/logs/stdio
>
> with this error:
>
> Traceback (most recent call last):
>   File "/Users/lldb_build/lldbSlave/buildDir/scripts/../lldb/test/dotest.py", 
> line 7, in 
> lldbsuite.test.run_suite()
>   File 
> "/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py",
>  line 1487, in run_suite
> setupCrashInfoHook()
>   File 
> "/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py",
>  line 390, in setupCrashInfoHook
> import lock
> ImportError: No module named lock
>
>
> On Thu, Nov 5, 2015 at 11:22 AM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Author: zturner
>> Date: Thu Nov  5 13:22:28 2015
>> New Revision: 252191
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=252191&view=rev
>> Log:
>> Python 3 - Turn on absolute imports, and fix existing imports.
>>
>> Absolute imports were introduced in Python 2.5 as a feature
>> (e.g. from __future__ import absolute_import), and made default
>> in Python 3.
>>
>> When absolute imports are enabled, the import system changes in
>> a couple of ways:
>>
>> 1) The `import foo` syntax will *only* search sys.path.  If `foo`
>>isn't in sys.path, it won't be found.  Period.  Without absolute
>>imports, the import system will also search the same directory
>>that the importing file resides in, so that you can easily
>>import from the same folder.
>>
>> 2) From inside a package, you can use a dot syntax to refer to higher
>>levels of the current package.  For example, if you are in the
>>package lldbsuite.test.utility, then ..foo refers to
>>lldbsuite.test.foo.  You can use this notation with the
>>`from X import Y` syntax to write intra-package references.  For
>>example, using the previous locationa s a starting point, writing
>>`from ..support import seven` would import lldbsuite.support.seven
>>
>> Since this is now the default behavior in Python 3, this means that
>> importing from the same directory with `import foo` *no longer works*.
>> As a result, the only way to have portable code is to force absolute
>> imports for all versions of Python.
>>
>> See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more
>> information about absolute and relative imports.
>>
>> Differential Revision: http://reviews.llvm.org/D14342
>> Reviewed By: Todd Fiala
>>
>> Modified:
>> lldb/trunk/packages/Python/lldbsuite/test/__init__.py
>> lldb/trunk/packages/Python/lldbsuite/test/bench.py
>> lldb/trunk/packages/Python/lldbsuite/test/curses_results.py
>> lldb/trunk/packages/Python/lldbsuite/test/dosep.py
>> lldb/trunk/packages/Python/lldbsuite/test/dotest.py
>> lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
>> lldb/trunk/packages/Python/lldbsuite/test/dotest_channels.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldb_pylint_helper.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldbbench.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldbcurses.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldbpexpect.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
>> lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py
>> lldb/trunk/packages/Python/lldbsuite/test/test_categories.py
>> lldb/trunk/packages/Python/lldbsuite/test/test_results.py
>>
>> Modified: lldb/trunk/packages/Python/lldbsuite/test/__init__.py
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/__init__.py?rev=252191&r1=252190&r2=252191&view=diff
>>
>> ==
>> --- lldb/trunk/packages/Python/lldbsuite/test/__init__.py (original)
>> +++ lldb/trunk/packages/Python/lldbsuite/test/__init__.py Thu Nov  5
>> 13:22:28 2015
>> @@ -1,4 +1,6 @@
>>  # Module level initialization for the `lldbsuite.test` module.
>>
>> -import dotest
>> +from __future__ import absolute_import
>> +
>> +from . import dotest
>>  run_suite = dotest.run_suite
>>
>> Modified: lldb/trunk/packages/Python/lldbsuite/test/bench.py
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/bench.py?rev=252191&r1=252190&r2=252191&view=diff
>>
>> ==
>> --- lldb/trunk/packages/Python/lldbsuite/test/bench.py (original)
>> +++ lldb/trunk/packages/Python/lldbsuite/test/bench.py Thu Nov  5
>> 13:22:28 2015
>> @@ -15,6 +15,7 @@ See also bench-history.
>>  """
>>
>>  from __future__ import print_function
>> +from __future__ import absolute_import
>>
>>  import os, sys
>>  imp

[Lldb-commits] [lldb] r252218 - Fix OS X tests.

2015-11-05 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Nov  5 16:00:47 2015
New Revision: 252218

URL: http://llvm.org/viewvc/llvm-project?rev=252218&view=rev
Log:
Fix OS X tests.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252218&r1=252217&r2=252218&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Nov  5 16:00:47 2015
@@ -387,7 +387,7 @@ def setupCrashInfoHook():
 global setCrashInfoHook
 setCrashInfoHook = setCrashInfoHook_NonMac # safe default
 if platform.system() == "Darwin":
-import lock
+from . import lock
 test_dir = os.environ['LLDB_TEST']
 if not test_dir or not os.path.exists(test_dir):
 return


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


Re: [Lldb-commits] [lldb] r252191 - Python 3 - Turn on absolute imports, and fix existing imports.

2015-11-05 Thread Chaoren Lin via lldb-commits
Hi, I think this changed caused all of the OS X tests to fail:

http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/6969/steps/test1/logs/stdio

with this error:

Traceback (most recent call last):
  File "/Users/lldb_build/lldbSlave/buildDir/scripts/../lldb/test/dotest.py",
line 7, in 
lldbsuite.test.run_suite()
  File 
"/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py",
line 1487, in run_suite
setupCrashInfoHook()
  File 
"/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py",
line 390, in setupCrashInfoHook
import lock
ImportError: No module named lock


On Thu, Nov 5, 2015 at 11:22 AM, Zachary Turner via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: zturner
> Date: Thu Nov  5 13:22:28 2015
> New Revision: 252191
>
> URL: http://llvm.org/viewvc/llvm-project?rev=252191&view=rev
> Log:
> Python 3 - Turn on absolute imports, and fix existing imports.
>
> Absolute imports were introduced in Python 2.5 as a feature
> (e.g. from __future__ import absolute_import), and made default
> in Python 3.
>
> When absolute imports are enabled, the import system changes in
> a couple of ways:
>
> 1) The `import foo` syntax will *only* search sys.path.  If `foo`
>isn't in sys.path, it won't be found.  Period.  Without absolute
>imports, the import system will also search the same directory
>that the importing file resides in, so that you can easily
>import from the same folder.
>
> 2) From inside a package, you can use a dot syntax to refer to higher
>levels of the current package.  For example, if you are in the
>package lldbsuite.test.utility, then ..foo refers to
>lldbsuite.test.foo.  You can use this notation with the
>`from X import Y` syntax to write intra-package references.  For
>example, using the previous locationa s a starting point, writing
>`from ..support import seven` would import lldbsuite.support.seven
>
> Since this is now the default behavior in Python 3, this means that
> importing from the same directory with `import foo` *no longer works*.
> As a result, the only way to have portable code is to force absolute
> imports for all versions of Python.
>
> See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more
> information about absolute and relative imports.
>
> Differential Revision: http://reviews.llvm.org/D14342
> Reviewed By: Todd Fiala
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/__init__.py
> lldb/trunk/packages/Python/lldbsuite/test/bench.py
> lldb/trunk/packages/Python/lldbsuite/test/curses_results.py
> lldb/trunk/packages/Python/lldbsuite/test/dosep.py
> lldb/trunk/packages/Python/lldbsuite/test/dotest.py
> lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
> lldb/trunk/packages/Python/lldbsuite/test/dotest_channels.py
> lldb/trunk/packages/Python/lldbsuite/test/lldb_pylint_helper.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbbench.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbcurses.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbpexpect.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py
> lldb/trunk/packages/Python/lldbsuite/test/test_categories.py
> lldb/trunk/packages/Python/lldbsuite/test/test_results.py
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/__init__.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/__init__.py?rev=252191&r1=252190&r2=252191&view=diff
>
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/__init__.py (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/__init__.py Thu Nov  5
> 13:22:28 2015
> @@ -1,4 +1,6 @@
>  # Module level initialization for the `lldbsuite.test` module.
>
> -import dotest
> +from __future__ import absolute_import
> +
> +from . import dotest
>  run_suite = dotest.run_suite
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/bench.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/bench.py?rev=252191&r1=252190&r2=252191&view=diff
>
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/bench.py (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/bench.py Thu Nov  5 13:22:28
> 2015
> @@ -15,6 +15,7 @@ See also bench-history.
>  """
>
>  from __future__ import print_function
> +from __future__ import absolute_import
>
>  import os, sys
>  import re
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/curses_results.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/curses_results.py?rev=252191&r1=252190&r2=252191&view=diff

[Lldb-commits] [lldb] r252205 - Completely avoid building Apple simulator on non-Darwin platforms.

2015-11-05 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Nov  5 14:45:29 2015
New Revision: 252205

URL: http://llvm.org/viewvc/llvm-project?rev=252205&view=rev
Log:
Completely avoid building Apple simulator on non-Darwin platforms.

Summary:
This is a resubmission of r252179, but correctly ignores the source
files for other platforms.

Reviewers: granata.enrico, tberghammer, zturner, jingham

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Initialization/SystemInitializerCommon.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt

Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=252205&r1=252204&r2=252205&view=diff
==
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Thu Nov  5 
14:45:29 2015
@@ -31,13 +31,13 @@
 #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h"
 #include "Plugins/Platform/Kalimba/PlatformKalimba.h"
 #include "Plugins/Platform/Linux/PlatformLinux.h"
-#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
 #include "Plugins/Platform/Windows/PlatformWindows.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 
 #if defined(__APPLE__)
+#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
 #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
@@ -130,9 +130,9 @@ SystemInitializerCommon::Initialize()
 
 PlatformRemoteiOS::Initialize();
 PlatformMacOSX::Initialize();
-PlatformiOSSimulator::Initialize();
 
 #if defined(__APPLE__)
+PlatformiOSSimulator::Initialize();
 DynamicLoaderDarwinKernel::Initialize();
 PlatformDarwinKernel::Initialize();
 ObjectFileMachO::Initialize();
@@ -168,7 +168,6 @@ SystemInitializerCommon::Terminate()
 ObjectContainerUniversalMachO::Terminate();
 PlatformMacOSX::Terminate();
 PlatformRemoteiOS::Terminate();
-PlatformiOSSimulator::Terminate();
 
 ClangASTContext::Terminate();
 GoASTContext::Terminate();
@@ -178,6 +177,7 @@ SystemInitializerCommon::Terminate()
 EmulateInstructionMIPS64::Terminate();
 
 #if defined(__APPLE__)
+PlatformiOSSimulator::Terminate();
 DynamicLoaderDarwinKernel::Terminate();
 ObjectFileMachO::Terminate();
 PlatformDarwinKernel::Terminate();

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=252205&r1=252204&r2=252205&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 Thu Nov  5 14:45:29 2015
@@ -60,7 +60,9 @@
 #include "AppleObjCDeclVendor.h"
 #include "AppleObjCTrampolineHandler.h"
 
+#if defined(__APPLE__)
 #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
+#endif
 
 using namespace lldb;
 using namespace lldb_private;
@@ -1765,7 +1767,8 @@ AppleObjCRuntimeV2::WarnIfNoClassesCache
 {
 if (m_noclasses_warning_emitted)
 return;
-
+
+#if defined(__APPLE__)
 if (m_process &&
 m_process->GetTarget().GetPlatform() &&
 m_process->GetTarget().GetPlatform()->GetPluginName() == 
PlatformiOSSimulator::GetPluginNameStatic())
@@ -1775,7 +1778,8 @@ AppleObjCRuntimeV2::WarnIfNoClassesCache
 m_noclasses_warning_emitted = true;
 return;
 }
-
+#endif
+
 Debugger &debugger(GetProcess()->GetTarget().GetDebugger());
 
 if (debugger.GetAsyncOutputStream())

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252205&r1=252204&r2=252205&view=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Thu Nov  5 
14:45:29 2015
@@ -1,16 +1,22 @@
 list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
-  PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
-  PlatformiOSSimulator.cpp
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
 
-if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+list(APPEND PLUGIN

Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.

2015-11-05 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252205: Completely avoid building Apple simulator on 
non-Darwin platforms. (authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D14389?vs=39394&id=39402#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14389

Files:
  lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
  
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt

Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
===
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
@@ -31,13 +31,13 @@
 #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h"
 #include "Plugins/Platform/Kalimba/PlatformKalimba.h"
 #include "Plugins/Platform/Linux/PlatformLinux.h"
-#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
 #include "Plugins/Platform/Windows/PlatformWindows.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 
 #if defined(__APPLE__)
+#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
 #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
@@ -130,9 +130,9 @@
 
 PlatformRemoteiOS::Initialize();
 PlatformMacOSX::Initialize();
-PlatformiOSSimulator::Initialize();
 
 #if defined(__APPLE__)
+PlatformiOSSimulator::Initialize();
 DynamicLoaderDarwinKernel::Initialize();
 PlatformDarwinKernel::Initialize();
 ObjectFileMachO::Initialize();
@@ -168,7 +168,6 @@
 ObjectContainerUniversalMachO::Terminate();
 PlatformMacOSX::Terminate();
 PlatformRemoteiOS::Terminate();
-PlatformiOSSimulator::Terminate();
 
 ClangASTContext::Terminate();
 GoASTContext::Terminate();
@@ -178,6 +177,7 @@
 EmulateInstructionMIPS64::Terminate();
 
 #if defined(__APPLE__)
+PlatformiOSSimulator::Terminate();
 DynamicLoaderDarwinKernel::Terminate();
 ObjectFileMachO::Terminate();
 PlatformDarwinKernel::Terminate();
Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
===
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -60,7 +60,9 @@
 #include "AppleObjCDeclVendor.h"
 #include "AppleObjCTrampolineHandler.h"
 
+#if defined(__APPLE__)
 #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
+#endif
 
 using namespace lldb;
 using namespace lldb_private;
@@ -1765,7 +1767,8 @@
 {
 if (m_noclasses_warning_emitted)
 return;
-
+
+#if defined(__APPLE__)
 if (m_process &&
 m_process->GetTarget().GetPlatform() &&
 m_process->GetTarget().GetPlatform()->GetPluginName() == PlatformiOSSimulator::GetPluginNameStatic())
@@ -1775,7 +1778,8 @@
 m_noclasses_warning_emitted = true;
 return;
 }
-
+#endif
+
 Debugger &debugger(GetProcess()->GetTarget().GetDebugger());
 
 if (debugger.GetAsyncOutputStream())
Index: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
===
--- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -1,16 +1,22 @@
 list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
-  PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
-  PlatformiOSSimulator.cpp
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
 
-if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+list(APPEND PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES
+  PlatformAppleSimulator.cpp
+  PlatformiOSSimulator.cpp
   PlatformiOSSimulatorCoreSimulatorSupport.mm
   )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+  list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES})
+else()
+  list(APPEND LLVM_OPTIONAL_SOURCES
+${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES})
 endif()
 
 add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.

2015-11-05 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

I haven't seen anything else that uses LLVM_OPTIONAL_SOURCES, but it's 
conceivable that there might be items in the list already, and I would like to 
avoid doing anything to it besides just appending.


http://reviews.llvm.org/D14389



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


Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.

2015-11-05 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

It's not actually CMake complaining but the LLVM cmake scripts.


http://reviews.llvm.org/D14389



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


Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.

2015-11-05 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

LLVM_OPTIONAL_SOURCES should avoid that.


http://reviews.llvm.org/D14389



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


[Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.

2015-11-05 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: granata.enrico, tberghammer, zturner, jingham.
chaoren added a subscriber: lldb-commits.

This is a resubmission of r252179, but correctly ignores the source
files for other platforms.

http://reviews.llvm.org/D14389

Files:
  source/Initialization/SystemInitializerCommon.cpp
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  source/Plugins/Platform/MacOSX/CMakeLists.txt

Index: source/Plugins/Platform/MacOSX/CMakeLists.txt
===
--- source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -1,16 +1,22 @@
 list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
-  PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
-  PlatformiOSSimulator.cpp
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
 
-if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+list(APPEND PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES
+  PlatformAppleSimulator.cpp
+  PlatformiOSSimulator.cpp
   PlatformiOSSimulatorCoreSimulatorSupport.mm
   )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+  list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES})
+else()
+  list(APPEND LLVM_OPTIONAL_SOURCES
+${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES})
 endif()
 
 add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})
Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
===
--- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -60,7 +60,9 @@
 #include "AppleObjCDeclVendor.h"
 #include "AppleObjCTrampolineHandler.h"
 
+#if defined(__APPLE__)
 #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
+#endif
 
 using namespace lldb;
 using namespace lldb_private;
@@ -1765,7 +1767,8 @@
 {
 if (m_noclasses_warning_emitted)
 return;
-
+
+#if defined(__APPLE__)
 if (m_process &&
 m_process->GetTarget().GetPlatform() &&
 m_process->GetTarget().GetPlatform()->GetPluginName() == PlatformiOSSimulator::GetPluginNameStatic())
@@ -1775,7 +1778,8 @@
 m_noclasses_warning_emitted = true;
 return;
 }
-
+#endif
+
 Debugger &debugger(GetProcess()->GetTarget().GetDebugger());
 
 if (debugger.GetAsyncOutputStream())
Index: source/Initialization/SystemInitializerCommon.cpp
===
--- source/Initialization/SystemInitializerCommon.cpp
+++ source/Initialization/SystemInitializerCommon.cpp
@@ -31,13 +31,13 @@
 #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h"
 #include "Plugins/Platform/Kalimba/PlatformKalimba.h"
 #include "Plugins/Platform/Linux/PlatformLinux.h"
-#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
 #include "Plugins/Platform/Windows/PlatformWindows.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 
 #if defined(__APPLE__)
+#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
 #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
@@ -130,9 +130,9 @@
 
 PlatformRemoteiOS::Initialize();
 PlatformMacOSX::Initialize();
-PlatformiOSSimulator::Initialize();
 
 #if defined(__APPLE__)
+PlatformiOSSimulator::Initialize();
 DynamicLoaderDarwinKernel::Initialize();
 PlatformDarwinKernel::Initialize();
 ObjectFileMachO::Initialize();
@@ -168,7 +168,6 @@
 ObjectContainerUniversalMachO::Terminate();
 PlatformMacOSX::Terminate();
 PlatformRemoteiOS::Terminate();
-PlatformiOSSimulator::Terminate();
 
 ClangASTContext::Terminate();
 GoASTContext::Terminate();
@@ -178,6 +177,7 @@
 EmulateInstructionMIPS64::Terminate();
 
 #if defined(__APPLE__)
+PlatformiOSSimulator::Terminate();
 DynamicLoaderDarwinKernel::Terminate();
 ObjectFileMachO::Terminate();
 PlatformDarwinKernel::Terminate();
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252182 - Revert "Do not build any of the simulator material on non-Darwin"

2015-11-05 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Nov  5 12:49:02 2015
New Revision: 252182

URL: http://llvm.org/viewvc/llvm-project?rev=252182&view=rev
Log:
Revert "Do not build any of the simulator material on non-Darwin"

This breaks the cmake build on all non-darwin platforms.

This reverts commit ff6cc332dd6654620e3408d06f8f49a0c9b3cd41.

rL252179

Modified:
lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252182&r1=252181&r2=252182&view=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Thu Nov  5 
12:49:02 2015
@@ -1,15 +1,15 @@
 list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+  PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
+  PlatformiOSSimulator.cpp
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
-  PlatformAppleSimulator.cpp
   PlatformiOSSimulatorCoreSimulatorSupport.mm
-  PlatformiOSSimulator.cpp
   )
 endif()
 


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


[Lldb-commits] [lldb] r252183 - Use lldb::pid_t instead of pid_t.

2015-11-05 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Nov  5 12:49:03 2015
New Revision: 252183

URL: http://llvm.org/viewvc/llvm-project?rev=252183&view=rev
Log:
Use lldb::pid_t instead of pid_t.

Reviewers: granata.enrico

Subscribers: lldb-commits

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

Modified:

lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h

lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Modified: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h?rev=252183&r1=252182&r2=252183&view=diff
==
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
 (original)
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
 Thu Nov  5 12:49:03 2015
@@ -36,7 +36,7 @@ namespace CoreSimulatorSupport
 class Process
 {
 public:
-pid_t
+lldb::pid_t
 GetPID ()
 {
 return m_pid;
@@ -54,13 +54,13 @@ namespace CoreSimulatorSupport
 }
 
 private:
-Process (pid_t p);
+Process (lldb::pid_t p);
 
 Process(lldb_private::Error error);
 
-Process (pid_t p, lldb_private::Error error);
+Process (lldb::pid_t p, lldb_private::Error error);
 
-pid_t m_pid;
+lldb::pid_t m_pid;
 lldb_private::Error m_error;
 
 friend class Device;

Modified: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252183&r1=252182&r2=252183&view=diff
==
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 (original)
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 Thu Nov  5 12:49:03 2015
@@ -47,10 +47,10 @@ using namespace lldb_utility;
 - (NSUInteger) state;
 - (BOOL) shutdownWithError:(NSError **)error;
 - (NSUUID *) UDID;
-- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
+- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
 @end
 
-CoreSimulatorSupport::Process::Process (pid_t p) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p) :
 m_pid (p),
 m_error ()
 {
@@ -62,7 +62,7 @@ CoreSimulatorSupport::Process::Process(E
 {
 }
 
-CoreSimulatorSupport::Process::Process (pid_t p, Error error) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) :
 m_pid (p),
 m_error (error)
 {
@@ -661,7 +661,7 @@ CoreSimulatorSupport::Device::Spawn (Pro
 
 NSError* nserror;
 
-pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
+lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
  options: options
   terminationHandler: nil
error: &nserror];


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


Re: [Lldb-commits] [PATCH] D14388: Use lldb::pid_t instead of pid_t.

2015-11-05 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252183: Use lldb::pid_t instead of pid_t. (authored by 
chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D14388?vs=39384&id=39387#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14388

Files:
  
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
  
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Index: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -47,10 +47,10 @@
 - (NSUInteger) state;
 - (BOOL) shutdownWithError:(NSError **)error;
 - (NSUUID *) UDID;
-- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
+- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
 @end
 
-CoreSimulatorSupport::Process::Process (pid_t p) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p) :
 m_pid (p),
 m_error ()
 {
@@ -62,7 +62,7 @@
 {
 }
 
-CoreSimulatorSupport::Process::Process (pid_t p, Error error) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) :
 m_pid (p),
 m_error (error)
 {
@@ -661,7 +661,7 @@
 
 NSError* nserror;
 
-pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
+lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
  options: options
   terminationHandler: nil
error: &nserror];
Index: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
===
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
@@ -36,7 +36,7 @@
 class Process
 {
 public:
-pid_t
+lldb::pid_t
 GetPID ()
 {
 return m_pid;
@@ -54,13 +54,13 @@
 }
 
 private:
-Process (pid_t p);
+Process (lldb::pid_t p);
 
 Process(lldb_private::Error error);
 
-Process (pid_t p, lldb_private::Error error);
+Process (lldb::pid_t p, lldb_private::Error error);
 
-pid_t m_pid;
+lldb::pid_t m_pid;
 lldb_private::Error m_error;
 
 friend class Device;


Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -47,10 +47,10 @@
 - (NSUInteger) state;
 - (BOOL) shutdownWithError:(NSError **)error;
 - (NSUUID *) UDID;
-- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error;
+- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error;
 @end
 
-CoreSimulatorSupport::Process::Process (pid_t p) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p) :
 m_pid (p),
 m_error ()
 {
@@ -62,7 +62,7 @@
 {
 }
 
-CoreSimulatorSupport::Process::Process (pid_t p, Error error) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) :
 m_pid (p),
 m_error (error)
 {
@@ -661,7 +661,7 @@
 
 NSError* nserror;
 
-pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()]
+lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()]
  options: options
   terminationHandler: nil
error: &nserror];
Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
===
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
@@ -36,7 +36,7 @@
 class Process
 {
 public:
-pid_t
+lldb::pid_t
   

[Lldb-commits] [PATCH] D14388: Use lldb::pid_t instead of pid_t.

2015-11-05 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: granata.enrico.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D14388

Files:
  source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
  source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Index: 
source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -47,10 +47,10 @@
 - (NSUInteger) state;
 - (BOOL) shutdownWithError:(NSError **)error;
 - (NSUUID *) UDID;
-- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
+- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
 @end
 
-CoreSimulatorSupport::Process::Process (pid_t p) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p) :
 m_pid (p),
 m_error ()
 {
@@ -62,7 +62,7 @@
 {
 }
 
-CoreSimulatorSupport::Process::Process (pid_t p, Error error) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) :
 m_pid (p),
 m_error (error)
 {
@@ -661,7 +661,7 @@
 
 NSError* nserror;
 
-pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
+lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
  options: options
   terminationHandler: nil
error: &nserror];
Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
===
--- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
+++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
@@ -36,7 +36,7 @@
 class Process
 {
 public:
-pid_t
+lldb::pid_t
 GetPID ()
 {
 return m_pid;
@@ -54,13 +54,13 @@
 }
 
 private:
-Process (pid_t p);
+Process (lldb::pid_t p);
 
 Process(lldb_private::Error error);
 
-Process (pid_t p, lldb_private::Error error);
+Process (lldb::pid_t p, lldb_private::Error error);
 
-pid_t m_pid;
+lldb::pid_t m_pid;
 lldb_private::Error m_error;
 
 friend class Device;


Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -47,10 +47,10 @@
 - (NSUInteger) state;
 - (BOOL) shutdownWithError:(NSError **)error;
 - (NSUUID *) UDID;
-- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error;
+- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error;
 @end
 
-CoreSimulatorSupport::Process::Process (pid_t p) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p) :
 m_pid (p),
 m_error ()
 {
@@ -62,7 +62,7 @@
 {
 }
 
-CoreSimulatorSupport::Process::Process (pid_t p, Error error) :
+CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) :
 m_pid (p),
 m_error (error)
 {
@@ -661,7 +661,7 @@
 
 NSError* nserror;
 
-pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()]
+lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()]
  options: options
   terminationHandler: nil
error: &nserror];
Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
===
--- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
+++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
@@ -36,7 +36,7 @@
 class Process
 {
 public:
-pid_t
+lldb::pid_t
 GetPID ()
 {
 return m_pid;
@@ -54,13 +54,13 @@
 }
 
 private:
-Process (pid_t p);
+Process (lldb::pid_t p);
 
 Process(lldb_private::Error error);
 
-Process (pid_t p, lldb_private::Error error);
+Process (lldb::pi

[Lldb-commits] [lldb] r252143 - Fix build for platforms without ObjC++.

2015-11-04 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Wed Nov  4 21:30:45 2015
New Revision: 252143

URL: http://llvm.org/viewvc/llvm-project?rev=252143&view=rev
Log:
Fix build for platforms without ObjC++.

Reviewers: jingham, jasonmolenda

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt

lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252143&r1=252142&r2=252143&view=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Wed Nov  4 
21:30:45 2015
@@ -1,9 +1,16 @@
-add_lldb_library(lldbPluginPlatformMacOSX
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
   PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
   PlatformiOSSimulator.cpp
-  PlatformiOSSimulatorCoreSimulatorSupport.mm
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+  PlatformiOSSimulatorCoreSimulatorSupport.mm
+  )
+endif()
+
+add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})

Modified: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252143&r1=252142&r2=252143&view=diff
==
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 (original)
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 Wed Nov  4 21:30:45 2015
@@ -9,8 +9,6 @@
 
 #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
 
-#if defined (__APPLE__)  // This Plugin uses the Mac-specific 
source/Host/macosx/cfcpp utilities
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
@@ -773,5 +771,3 @@ CoreSimulatorSupport::DeviceSet::GetFanc
 
 return dev;
 }
-
-#endif // __APPLE__


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


Re: [Lldb-commits] [PATCH] D14365: Fix build for platforms without ObjC++.

2015-11-04 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252143: Fix build for platforms without ObjC++. (authored by 
chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D14365?vs=39305&id=39309#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14365

Files:
  lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
  
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Index: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -9,8 +9,6 @@
 
 #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
 
-#if defined (__APPLE__)  // This Plugin uses the Mac-specific 
source/Host/macosx/cfcpp utilities
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
@@ -773,5 +771,3 @@
 
 return dev;
 }
-
-#endif // __APPLE__
Index: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
===
--- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -1,9 +1,16 @@
-add_lldb_library(lldbPluginPlatformMacOSX
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
   PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
   PlatformiOSSimulator.cpp
-  PlatformiOSSimulatorCoreSimulatorSupport.mm
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+  PlatformiOSSimulatorCoreSimulatorSupport.mm
+  )
+endif()
+
+add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})


Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -9,8 +9,6 @@
 
 #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
 
-#if defined (__APPLE__)  // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
@@ -773,5 +771,3 @@
 
 return dev;
 }
-
-#endif // __APPLE__
Index: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
===
--- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -1,9 +1,16 @@
-add_lldb_library(lldbPluginPlatformMacOSX
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
   PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
   PlatformiOSSimulator.cpp
-  PlatformiOSSimulatorCoreSimulatorSupport.mm
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+  PlatformiOSSimulatorCoreSimulatorSupport.mm
+  )
+endif()
+
+add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D14365: Fix build for platforms without ObjC++.

2015-11-04 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: jingham, jasonmolenda.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D14365

Files:
  source/Plugins/Platform/MacOSX/CMakeLists.txt
  source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Index: 
source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -9,8 +9,6 @@
 
 #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
 
-#if defined (__APPLE__)  // This Plugin uses the Mac-specific 
source/Host/macosx/cfcpp utilities
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
@@ -773,5 +771,3 @@
 
 return dev;
 }
-
-#endif // __APPLE__
Index: source/Plugins/Platform/MacOSX/CMakeLists.txt
===
--- source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -1,9 +1,16 @@
-add_lldb_library(lldbPluginPlatformMacOSX
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
   PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
   PlatformiOSSimulator.cpp
-  PlatformiOSSimulatorCoreSimulatorSupport.mm
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+  PlatformiOSSimulatorCoreSimulatorSupport.mm
+  )
+endif()
+
+add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})


Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
===
--- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -9,8 +9,6 @@
 
 #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
 
-#if defined (__APPLE__)  // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
@@ -773,5 +771,3 @@
 
 return dev;
 }
-
-#endif // __APPLE__
Index: source/Plugins/Platform/MacOSX/CMakeLists.txt
===
--- source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -1,9 +1,16 @@
-add_lldb_library(lldbPluginPlatformMacOSX
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
   PlatformAppleSimulator.cpp
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
   PlatformiOSSimulator.cpp
-  PlatformiOSSimulatorCoreSimulatorSupport.mm
   PlatformMacOSX.cpp
   PlatformRemoteiOS.cpp
   )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
+  PlatformiOSSimulatorCoreSimulatorSupport.mm
+  )
+endif()
+
+add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r252124 - Fix build on Linux.

2015-11-04 Thread Chaoren Lin via lldb-commits
Yeah, it fails to build if we don't have objc too. I'll upload an update.

On Wed, Nov 4, 2015 at 6:12 PM, Jim Ingham  wrote:

> Yeah, sure.  But I bet you could figure out something to put in
> PlatformiOSSimulatorCoreSimulatorSupport.h that would cause this to fail to
> link except on OS X.  Not that that's likely, but as a general strategy it
> seems wrong.
>
> Jim
>
> > On Nov 4, 2015, at 6:09 PM, Chaoren Lin  wrote:
> >
> > There's no simulator support outside of Darwin, so none of it should get
> used anyway.
> >
> > On Wed, Nov 4, 2015 at 6:08 PM, Jim Ingham  wrote:
> > In this case it's even a little weirder, 'cause we compile a source file
> that contains a class declaration (since the #if defined is after the
> #include), but not the methods that aren't inlined.  Then presumably link
> in the .o file containing whatever was the result of that compilation.
> That seems potentially harmful.
> >
> > Jim
> >
> >
> > > On Nov 4, 2015, at 6:02 PM, Jason Molenda  wrote:
> > >
> > > You're making a valid point.  I was only noting that this is not the
> first instance where've conditionally compiled mac platform files.
> > >
> > > J
> > >
> > >> On Nov 4, 2015, at 6:00 PM, Jim Ingham  wrote:
> > >>
> > >> Why?
> > >>
> > >> Jim
> > >>
> > >>> On Nov 4, 2015, at 5:43 PM, Jason Molenda 
> wrote:
> > >>>
> > >>> We do the same thing in other MacOSX platform files where they
> depend on Apple specific libraries.
> > >>>
> > >>>
> > >>>> On Nov 4, 2015, at 5:39 PM, Jim Ingham via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> > >>>>
> > >>>> Why are we trying to build this at all on Linux?  Seems odd to
> build an empty file rather than just not build it.
> > >>>>
> > >>>> Jim
> > >>>>
> > >>>>> On Nov 4, 2015, at 5:23 PM, Chaoren Lin via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> > >>>>>
> > >>>>> Author: chaoren
> > >>>>> Date: Wed Nov  4 19:23:19 2015
> > >>>>> New Revision: 252124
> > >>>>>
> > >>>>> URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev
> > >>>>> Log:
> > >>>>> Fix build on Linux.
> > >>>>>
> > >>>>> Modified:
> > >>>>>
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> > >>>>>
> > >>>>> Modified:
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> > >>>>> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff
> > >>>>>
> ==
> > >>>>> ---
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> (original)
> > >>>>> +++
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> Wed Nov  4 19:23:19 2015
> > >>>>> @@ -9,6 +9,8 @@
> > >>>>>
> > >>>>> #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
> > >>>>>
> > >>>>> +#if defined (__APPLE__)  // This Plugin uses the Mac-specific
> source/Host/macosx/cfcpp utilities
> > >>>>> +
> > >>>>> // C Includes
> > >>>>> // C++ Includes
> > >>>>> // Other libraries and framework includes
> > >>>>> @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc
> > >>>>>
> > >>>>> return dev;
> > >>>>> }
> > >>>>> +
> > >>>>> +#endif // __APPLE__
> > >>>>>
> > >>>>>
> > >>>>> ___
> > >>>>> 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
> > >>>
> > >>
> > >
> >
> >
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252133 - Fix TestGoFormatters.py.

2015-11-04 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Wed Nov  4 20:17:21 2015
New Revision: 252133

URL: http://llvm.org/viewvc/llvm-project?rev=252133&view=rev
Log:
Fix TestGoFormatters.py.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py?rev=252133&r1=252132&r2=252133&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py
 Wed Nov  4 20:17:21 2015
@@ -3,14 +3,13 @@
 import os, time
 import unittest2
 import lldb
-import lldbutil
-from lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
 
 class TestGoLanguage(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
-@python_api_test
 @skipIfFreeBSD # llvm.org/pr24895 triggers assertion failure
 @skipIfRemote # Not remote test suite ready
 @no_debug_info_test


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


Re: [Lldb-commits] [lldb] r252124 - Fix build on Linux.

2015-11-04 Thread Chaoren Lin via lldb-commits
There's no simulator support outside of Darwin, so none of it should get
used anyway.

On Wed, Nov 4, 2015 at 6:08 PM, Jim Ingham  wrote:

> In this case it's even a little weirder, 'cause we compile a source file
> that contains a class declaration (since the #if defined is after the
> #include), but not the methods that aren't inlined.  Then presumably link
> in the .o file containing whatever was the result of that compilation.
> That seems potentially harmful.
>
> Jim
>
>
> > On Nov 4, 2015, at 6:02 PM, Jason Molenda  wrote:
> >
> > You're making a valid point.  I was only noting that this is not the
> first instance where've conditionally compiled mac platform files.
> >
> > J
> >
> >> On Nov 4, 2015, at 6:00 PM, Jim Ingham  wrote:
> >>
> >> Why?
> >>
> >> Jim
> >>
> >>> On Nov 4, 2015, at 5:43 PM, Jason Molenda  wrote:
> >>>
> >>> We do the same thing in other MacOSX platform files where they depend
> on Apple specific libraries.
> >>>
> >>>
> >>>> On Nov 4, 2015, at 5:39 PM, Jim Ingham via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >>>>
> >>>> Why are we trying to build this at all on Linux?  Seems odd to build
> an empty file rather than just not build it.
> >>>>
> >>>> Jim
> >>>>
> >>>>> On Nov 4, 2015, at 5:23 PM, Chaoren Lin via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >>>>>
> >>>>> Author: chaoren
> >>>>> Date: Wed Nov  4 19:23:19 2015
> >>>>> New Revision: 252124
> >>>>>
> >>>>> URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev
> >>>>> Log:
> >>>>> Fix build on Linux.
> >>>>>
> >>>>> Modified:
> >>>>>
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> >>>>>
> >>>>> Modified:
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> >>>>> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff
> >>>>>
> ==
> >>>>> ---
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> (original)
> >>>>> +++
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> Wed Nov  4 19:23:19 2015
> >>>>> @@ -9,6 +9,8 @@
> >>>>>
> >>>>> #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
> >>>>>
> >>>>> +#if defined (__APPLE__)  // This Plugin uses the Mac-specific
> source/Host/macosx/cfcpp utilities
> >>>>> +
> >>>>> // C Includes
> >>>>> // C++ Includes
> >>>>> // Other libraries and framework includes
> >>>>> @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc
> >>>>>
> >>>>> return dev;
> >>>>> }
> >>>>> +
> >>>>> +#endif // __APPLE__
> >>>>>
> >>>>>
> >>>>> ___
> >>>>> 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
> >>>
> >>
> >
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r252124 - Fix build on Linux.

2015-11-04 Thread Chaoren Lin via lldb-commits
Yeah, I just looked at PlatformDarwinKernel.cpp as example for a quick fix.
I agree that kind of logic probably belongs in the CMakeLists.txt.

On Wed, Nov 4, 2015 at 6:02 PM, Jason Molenda  wrote:

> You're making a valid point.  I was only noting that this is not the first
> instance where've conditionally compiled mac platform files.
>
> J
>
> > On Nov 4, 2015, at 6:00 PM, Jim Ingham  wrote:
> >
> > Why?
> >
> > Jim
> >
> >> On Nov 4, 2015, at 5:43 PM, Jason Molenda  wrote:
> >>
> >> We do the same thing in other MacOSX platform files where they depend
> on Apple specific libraries.
> >>
> >>
> >>> On Nov 4, 2015, at 5:39 PM, Jim Ingham via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >>>
> >>> Why are we trying to build this at all on Linux?  Seems odd to build
> an empty file rather than just not build it.
> >>>
> >>> Jim
> >>>
> >>>> On Nov 4, 2015, at 5:23 PM, Chaoren Lin via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >>>>
> >>>> Author: chaoren
> >>>> Date: Wed Nov  4 19:23:19 2015
> >>>> New Revision: 252124
> >>>>
> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev
> >>>> Log:
> >>>> Fix build on Linux.
> >>>>
> >>>> Modified:
> >>>>
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> >>>>
> >>>> Modified:
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> >>>> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff
> >>>>
> ==
> >>>> ---
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> (original)
> >>>> +++
> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> Wed Nov  4 19:23:19 2015
> >>>> @@ -9,6 +9,8 @@
> >>>>
> >>>> #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
> >>>>
> >>>> +#if defined (__APPLE__)  // This Plugin uses the Mac-specific
> source/Host/macosx/cfcpp utilities
> >>>> +
> >>>> // C Includes
> >>>> // C++ Includes
> >>>> // Other libraries and framework includes
> >>>> @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc
> >>>>
> >>>>  return dev;
> >>>> }
> >>>> +
> >>>> +#endif // __APPLE__
> >>>>
> >>>>
> >>>> ___
> >>>> 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
> >>
> >
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.

2015-11-04 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

Yeah, it seems like it's been passing for gcc-4.9 for a while now. Thanks
for checking!


Repository:
  rL LLVM

http://reviews.llvm.org/D12115



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


Re: [Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.

2015-11-04 Thread Chaoren Lin via lldb-commits
Yeah, it seems like it's been passing for gcc-4.9 for a while now. Thanks
for checking!

On Wed, Nov 4, 2015 at 5:15 PM, Dawn Perchik  wrote:

> dawn marked an inline comment as done.
> dawn added a comment.
>
> In http://reviews.llvm.org/D12115#248069, @chaoren wrote:
>
> > Could you please take a look at these issues?
> >
> > TestMiSymbol started to fail on Linux with gcc-4.9:
> >
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/6387
>
>
> Hi Chaoren,
> I believe the issue with gcc was fixed for gcc a while back.  Just
> checking to make sure you're no longer seeing the failure.  Let me know
> otherwise.
>
>
> 
> Comment at: lldb/trunk/tools/lldb-mi/MIUtilParse.h:13
> @@ +12,3 @@
> +// Third party headers:
> +#include "../lib/Support/regex_impl.h"
> +
> 
> chaoren wrote:
> > This caused a build failure on OS X:
> > http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/5801
> This was fixed by Sean - the XCode build wasn't including the full set of
> include paths when building lldb-mi.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D12115
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252124 - Fix build on Linux.

2015-11-04 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Wed Nov  4 19:23:19 2015
New Revision: 252124

URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev
Log:
Fix build on Linux.

Modified:

lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Modified: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff
==
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 (original)
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 Wed Nov  4 19:23:19 2015
@@ -9,6 +9,8 @@
 
 #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
 
+#if defined (__APPLE__)  // This Plugin uses the Mac-specific 
source/Host/macosx/cfcpp utilities
+
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
@@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc
 
 return dev;
 }
+
+#endif // __APPLE__


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


Re: [Lldb-commits] [PATCH] D14166: Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.

2015-10-28 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251589: Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR. 
(authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D14166?vs=38700&id=38702#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14166

Files:
  lldb/trunk/cmake/modules/LLDBConfig.cmake

Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -194,7 +194,11 @@
   add_definitions( -DLLDB_DISABLE_PYTHON )
 endif()
 
-include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
+  include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include)
+else ()
+  include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+endif ()
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
 
 # Disable GCC warnings


Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -194,7 +194,11 @@
   add_definitions( -DLLDB_DISABLE_PYTHON )
 endif()
 
-include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
+  include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include)
+else ()
+  include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+endif ()
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
 
 # Disable GCC warnings
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251589 - Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.

2015-10-28 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Wed Oct 28 19:48:38 2015
New Revision: 251589

URL: http://llvm.org/viewvc/llvm-project?rev=251589&view=rev
Log:
Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.

Reviewers: sas, ovyalov

Subscribers: lldb-commits

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

Modified:
lldb/trunk/cmake/modules/LLDBConfig.cmake

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=251589&r1=251588&r2=251589&view=diff
==
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Wed Oct 28 19:48:38 2015
@@ -194,7 +194,11 @@ if (LLDB_DISABLE_PYTHON)
   add_definitions( -DLLDB_DISABLE_PYTHON )
 endif()
 
-include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
+  include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include)
+else ()
+  include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+endif ()
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
 
 # Disable GCC warnings


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


Re: [Lldb-commits] [PATCH] D13819: LLDBStandalone: Report nice errors on missing vars

2015-10-28 Thread Chaoren Lin via lldb-commits
chaoren resigned from this revision.
chaoren removed a reviewer: chaoren.
chaoren added a comment.

Seems legit. But I've never built standalone, so I probably shouldn't be a 
reviewer for this.


http://reviews.llvm.org/D13819



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


[Lldb-commits] [PATCH] D14166: Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.

2015-10-28 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: sas, ovyalov.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D14166

Files:
  cmake/modules/LLDBConfig.cmake

Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -194,7 +194,11 @@
   add_definitions( -DLLDB_DISABLE_PYTHON )
 endif()
 
-include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
+  include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include)
+else ()
+  include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+endif ()
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
 
 # Disable GCC warnings


Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -194,7 +194,11 @@
   add_definitions( -DLLDB_DISABLE_PYTHON )
 endif()
 
-include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
+  include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include)
+else ()
+  include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
+endif ()
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
 
 # Disable GCC warnings
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14127: Use accept4 workaround for MIPS Android build.

2015-10-27 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251439: Use accept4 workaround for MIPS Android build. 
(authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D14127?vs=38581&id=38582#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14127

Files:
  lldb/trunk/cmake/platforms/Android.cmake
  lldb/trunk/source/Host/common/Socket.cpp

Index: lldb/trunk/source/Host/common/Socket.cpp
===
--- lldb/trunk/source/Host/common/Socket.cpp
+++ lldb/trunk/source/Host/common/Socket.cpp
@@ -40,11 +40,11 @@
 #include 
 #include 
 #include 
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 #include 
 #include 
 #include 
-#endif // ANDROID_ARM_BUILD_STATIC
+#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC
 #endif // __ANDROID_NDK__
 
 using namespace lldb;
@@ -457,7 +457,7 @@
  Error& error)
 {
 error.Clear();
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 // Temporary workaround for statically linking Android lldb-server with the
 // latest API.
 int fd = syscall(__NR_accept, sockfd, addr, addrlen);
Index: lldb/trunk/cmake/platforms/Android.cmake
===
--- lldb/trunk/cmake/platforms/Android.cmake
+++ lldb/trunk/cmake/platforms/Android.cmake
@@ -115,6 +115,10 @@
   list( APPEND LLDB_SYSTEM_LIBS atomic )
   set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
  endif()
+ if( LLVM_BUILD_STATIC )
+  # Temporary workaround for static linking with the latest API.
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" )
+ endif()
 endif()
 
 if( NOT LLVM_BUILD_STATIC )


Index: lldb/trunk/source/Host/common/Socket.cpp
===
--- lldb/trunk/source/Host/common/Socket.cpp
+++ lldb/trunk/source/Host/common/Socket.cpp
@@ -40,11 +40,11 @@
 #include 
 #include 
 #include 
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 #include 
 #include 
 #include 
-#endif // ANDROID_ARM_BUILD_STATIC
+#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC
 #endif // __ANDROID_NDK__
 
 using namespace lldb;
@@ -457,7 +457,7 @@
  Error& error)
 {
 error.Clear();
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 // Temporary workaround for statically linking Android lldb-server with the
 // latest API.
 int fd = syscall(__NR_accept, sockfd, addr, addrlen);
Index: lldb/trunk/cmake/platforms/Android.cmake
===
--- lldb/trunk/cmake/platforms/Android.cmake
+++ lldb/trunk/cmake/platforms/Android.cmake
@@ -115,6 +115,10 @@
   list( APPEND LLDB_SYSTEM_LIBS atomic )
   set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
  endif()
+ if( LLVM_BUILD_STATIC )
+  # Temporary workaround for static linking with the latest API.
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" )
+ endif()
 endif()
 
 if( NOT LLVM_BUILD_STATIC )
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251439 - Use accept4 workaround for MIPS Android build.

2015-10-27 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Oct 27 14:17:35 2015
New Revision: 251439

URL: http://llvm.org/viewvc/llvm-project?rev=251439&view=rev
Log:
Use accept4 workaround for MIPS Android build.

Summary: Similar to http://reviews.llvm.org/rL242319, which was for ARM.

Reviewers: chying, ovyalov

Subscribers: aemerson, tberghammer, danalbert, srhines, lldb-commits

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

Modified:
lldb/trunk/cmake/platforms/Android.cmake
lldb/trunk/source/Host/common/Socket.cpp

Modified: lldb/trunk/cmake/platforms/Android.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/platforms/Android.cmake?rev=251439&r1=251438&r2=251439&view=diff
==
--- lldb/trunk/cmake/platforms/Android.cmake (original)
+++ lldb/trunk/cmake/platforms/Android.cmake Tue Oct 27 14:17:35 2015
@@ -115,6 +115,10 @@ elseif( ANDROID_ABI STREQUAL "mips" )
   list( APPEND LLDB_SYSTEM_LIBS atomic )
   set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
  endif()
+ if( LLVM_BUILD_STATIC )
+  # Temporary workaround for static linking with the latest API.
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" )
+ endif()
 endif()
 
 if( NOT LLVM_BUILD_STATIC )

Modified: lldb/trunk/source/Host/common/Socket.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Socket.cpp?rev=251439&r1=251438&r2=251439&view=diff
==
--- lldb/trunk/source/Host/common/Socket.cpp (original)
+++ lldb/trunk/source/Host/common/Socket.cpp Tue Oct 27 14:17:35 2015
@@ -40,11 +40,11 @@
 #include 
 #include 
 #include 
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 #include 
 #include 
 #include 
-#endif // ANDROID_ARM_BUILD_STATIC
+#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC
 #endif // __ANDROID_NDK__
 
 using namespace lldb;
@@ -457,7 +457,7 @@ Socket::AcceptSocket(NativeSocket sockfd
  Error& error)
 {
 error.Clear();
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 // Temporary workaround for statically linking Android lldb-server with the
 // latest API.
 int fd = syscall(__NR_accept, sockfd, addr, addrlen);


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


[Lldb-commits] [PATCH] D14127: Use accept4 workaround for MIPS Android build.

2015-10-27 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: chying, ovyalov.
chaoren added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer, aemerson.

Similar to http://reviews.llvm.org/rL242319, which was for ARM.

http://reviews.llvm.org/D14127

Files:
  cmake/platforms/Android.cmake
  source/Host/common/Socket.cpp

Index: source/Host/common/Socket.cpp
===
--- source/Host/common/Socket.cpp
+++ source/Host/common/Socket.cpp
@@ -40,11 +40,11 @@
 #include 
 #include 
 #include 
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 #include 
 #include 
 #include 
-#endif // ANDROID_ARM_BUILD_STATIC
+#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC
 #endif // __ANDROID_NDK__
 
 using namespace lldb;
@@ -457,7 +457,7 @@
  Error& error)
 {
 error.Clear();
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 // Temporary workaround for statically linking Android lldb-server with the
 // latest API.
 int fd = syscall(__NR_accept, sockfd, addr, addrlen);
Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -115,6 +115,10 @@
   list( APPEND LLDB_SYSTEM_LIBS atomic )
   set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
  endif()
+ if( LLVM_BUILD_STATIC )
+  # Temporary workaround for static linking with the latest API.
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" )
+ endif()
 endif()
 
 if( NOT LLVM_BUILD_STATIC )


Index: source/Host/common/Socket.cpp
===
--- source/Host/common/Socket.cpp
+++ source/Host/common/Socket.cpp
@@ -40,11 +40,11 @@
 #include 
 #include 
 #include 
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 #include 
 #include 
 #include 
-#endif // ANDROID_ARM_BUILD_STATIC
+#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC
 #endif // __ANDROID_NDK__
 
 using namespace lldb;
@@ -457,7 +457,7 @@
  Error& error)
 {
 error.Clear();
-#if defined(ANDROID_ARM_BUILD_STATIC)
+#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC)
 // Temporary workaround for statically linking Android lldb-server with the
 // latest API.
 int fd = syscall(__NR_accept, sockfd, addr, addrlen);
Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -115,6 +115,10 @@
   list( APPEND LLDB_SYSTEM_LIBS atomic )
   set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
  endif()
+ if( LLVM_BUILD_STATIC )
+  # Temporary workaround for static linking with the latest API.
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" )
+ endif()
 endif()
 
 if( NOT LLVM_BUILD_STATIC )
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r249486 - Fix Android build.

2015-10-06 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Oct  6 19:01:06 2015
New Revision: 249486

URL: http://llvm.org/viewvc/llvm-project?rev=249486&view=rev
Log:
Fix Android build.

Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/cmake/platforms/Android.cmake
lldb/trunk/source/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=249486&r1=249485&r2=249486&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Tue Oct  6 19:01:06 2015
@@ -4,6 +4,12 @@ include(cmake/modules/LLDBStandalone.cma
 include(cmake/modules/LLDBConfig.cmake)
 include(cmake/modules/AddLLDB.cmake)
 
+if (__ANDROID_NDK__ OR (CMAKE_SYSTEM_NAME MATCHES "Windows"))
+  set(LLDB_DEFAULT_DISABLE_LIBEDIT 1)
+else()
+  set(LLDB_DEFAULT_DISABLE_LIBEDIT 0)
+endif ()
+
 # We need libedit support to go down both the source and
 # the scripts directories.
 set(LLDB_DISABLE_LIBEDIT ${LLDB_DEFAULT_DISABLE_LIBEDIT} CACHE BOOL "Disables 
the use of editline.")

Modified: lldb/trunk/cmake/platforms/Android.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/platforms/Android.cmake?rev=249486&r1=249485&r2=249486&view=diff
==
--- lldb/trunk/cmake/platforms/Android.cmake (original)
+++ lldb/trunk/cmake/platforms/Android.cmake Tue Oct  6 19:01:06 2015
@@ -37,6 +37,7 @@ remove_definitions( -DANDROID -D__ANDROI
 add_definitions( -DANDROID -D__ANDROID_NDK__ -DLLDB_DISABLE_LIBEDIT )
 set( ANDROID True )
 set( __ANDROID_NDK__ True )
+set( LLDB_DEFAULT_DISABLE_LIBEDIT True )
 
 # linking lldb-server statically for Android avoids the need to ship two
 # binaries (pie for API 21+ and non-pie for API 16-). It's possible to use

Modified: lldb/trunk/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=249486&r1=249485&r2=249486&view=diff
==
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Tue Oct  6 19:01:06 2015
@@ -1,11 +1,5 @@
 include_directories(.)
 
-if (__ANDROID_NDK__ OR (CMAKE_SYSTEM_NAME MATCHES "Windows"))
-  set(LLDB_DEFAULT_DISABLE_LIBEDIT 1)
-else()
-  set(LLDB_DEFAULT_DISABLE_LIBEDIT 0)
-endif ()
-
 if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
 include_directories(
   Plugins/Process/Linux


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


Re: [Lldb-commits] [lldb] r248846 - Skipping TestAttachDenied.py on Linux as it is hanging on a buildbot after r248834.

2015-09-29 Thread Chaoren Lin via lldb-commits
Does timeout not work?

On Tue, Sep 29, 2015 at 4:06 PM, Todd Fiala via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: tfiala
> Date: Tue Sep 29 18:06:56 2015
> New Revision: 248846
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248846&view=rev
> Log:
> Skipping TestAttachDenied.py on Linux as it is hanging on a buildbot after
> r248834.
>
> I'll track down what is happening here.
>
> Modified:
>
> lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
>
> Modified:
> lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py?rev=248846&r1=248845&r2=248846&view=diff
>
> ==
> ---
> lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
> (original)
> +++
> lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
> Tue Sep 29 18:06:56 2015
> @@ -21,6 +21,7 @@ class AttachDeniedTestCase(TestBase):
>  return (err, shell_command.GetStatus(), shell_command.GetOutput())
>
>  @skipIfWindows
> +@skipIfLinux # hanging after reviews D13124 change went in
>  def test_attach_to_process_by_id_denied(self):
>  """Test attach by process id denied"""
>
>
>
> ___
> 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


[Lldb-commits] [lldb] r248301 - Update TestChangeProcessGroup to remove obsolete workaround.

2015-09-22 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Sep 22 12:37:34 2015
New Revision: 248301

URL: http://llvm.org/viewvc/llvm-project?rev=248301&view=rev
Log:
Update TestChangeProcessGroup to remove obsolete workaround.

Expression evaluation in syscalls should work now.

Reviewers: labath

Subscribers: lldb-commits

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

Modified:
lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py

Modified: 
lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py?rev=248301&r1=248300&r2=248301&view=diff
==
--- lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py 
(original)
+++ lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py Tue 
Sep 22 12:37:34 2015
@@ -89,9 +89,6 @@ class ChangeProcessGroupTestCase(TestBas
 lldbutil.run_break_set_by_file_and_line(self, 'main.c', self.line, 
num_expected_locations=-1)
 
 thread = process.GetSelectedThread()
-# this gives a chance for the thread to exit the sleep syscall and 
sidesteps
-#  on linux
-thread.StepInstruction(False)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])


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


Re: [Lldb-commits] [PATCH] D12976: Update TestChangeProcessGroup to remove obsolete workaround.

2015-09-22 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248301: Update TestChangeProcessGroup to remove obsolete 
workaround. (authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D12976?vs=35304&id=35391#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12976

Files:
  lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py

Index: lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
===
--- lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
+++ lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
@@ -89,9 +89,6 @@
 lldbutil.run_break_set_by_file_and_line(self, 'main.c', self.line, 
num_expected_locations=-1)
 
 thread = process.GetSelectedThread()
-# this gives a chance for the thread to exit the sleep syscall and 
sidesteps
-#  on linux
-thread.StepInstruction(False)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])


Index: lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
===
--- lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
+++ lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
@@ -89,9 +89,6 @@
 lldbutil.run_break_set_by_file_and_line(self, 'main.c', self.line, num_expected_locations=-1)
 
 thread = process.GetSelectedThread()
-# this gives a chance for the thread to exit the sleep syscall and sidesteps
-#  on linux
-thread.StepInstruction(False)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12976: Fix TestChangeProcessGroup to properly step out of sleep.

2015-09-21 Thread Chaoren Lin via lldb-commits
chaoren updated this revision to Diff 35304.
chaoren added a comment.

Remove existing workaround.


http://reviews.llvm.org/D12976

Files:
  test/functionalities/process_group/TestChangeProcessGroup.py

Index: test/functionalities/process_group/TestChangeProcessGroup.py
===
--- test/functionalities/process_group/TestChangeProcessGroup.py
+++ test/functionalities/process_group/TestChangeProcessGroup.py
@@ -89,9 +89,6 @@
 lldbutil.run_break_set_by_file_and_line(self, 'main.c', self.line, 
num_expected_locations=-1)
 
 thread = process.GetSelectedThread()
-# this gives a chance for the thread to exit the sleep syscall and 
sidesteps
-#  on linux
-thread.StepInstruction(False)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])


Index: test/functionalities/process_group/TestChangeProcessGroup.py
===
--- test/functionalities/process_group/TestChangeProcessGroup.py
+++ test/functionalities/process_group/TestChangeProcessGroup.py
@@ -89,9 +89,6 @@
 lldbutil.run_break_set_by_file_and_line(self, 'main.c', self.line, num_expected_locations=-1)
 
 thread = process.GetSelectedThread()
-# this gives a chance for the thread to exit the sleep syscall and sidesteps
-#  on linux
-thread.StepInstruction(False)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12976: Fix TestChangeProcessGroup to properly step out of sleep.

2015-09-21 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

Do we still need the original stepInstruction?


http://reviews.llvm.org/D12976



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


[Lldb-commits] [lldb] r248075 - Fix Linux bot.

2015-09-18 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Fri Sep 18 19:57:11 2015
New Revision: 248075

URL: http://llvm.org/viewvc/llvm-project?rev=248075&view=rev
Log:
Fix Linux bot.

Modified:
lldb/trunk/test/dosep.py

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=248075&r1=248074&r2=248075&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Fri Sep 18 19:57:11 2015
@@ -1169,7 +1169,8 @@ def main(print_details_on_success, num_t
 global output_on_success, RESULTS_FORMATTER, output_lock
 output_on_success = print_details_on_success
 RESULTS_FORMATTER = results_formatter
-RESULTS_FORMATTER.set_lock(output_lock)
+if RESULTS_FORMATTER is not None:
+RESULTS_FORMATTER.set_lock(output_lock)
 
 # We can't use sys.path[0] to determine the script directory
 # because it doesn't work under a debugger


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


Re: [Lldb-commits] [PATCH] D12976: Fix TestChangeProcessGroup to properly step out of sleep.

2015-09-18 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

I thought this was supposed to be fixed, but TestChangeProcessGroup, 
TestExpressionInSyscall, and TestRegisters just started failing for me recently 
because of this.


http://reviews.llvm.org/D12976



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


Re: [Lldb-commits] [PATCH] D12976: Fix TestChangeProcessGroup to properly step out of sleep.

2015-09-18 Thread Chaoren Lin via lldb-commits
chaoren updated this revision to Diff 35113.
chaoren added a comment.

Remove old line.


http://reviews.llvm.org/D12976

Files:
  test/functionalities/process_group/TestChangeProcessGroup.py

Index: test/functionalities/process_group/TestChangeProcessGroup.py
===
--- test/functionalities/process_group/TestChangeProcessGroup.py
+++ test/functionalities/process_group/TestChangeProcessGroup.py
@@ -91,7 +91,11 @@
 thread = process.GetSelectedThread()
 # this gives a chance for the thread to exit the sleep syscall and 
sidesteps
 #  on linux
-thread.StepInstruction(False)
+while True:
+frame = thread.GetSelectedFrame()
+if frame.GetFunctionName() == 'main':
+break
+thread.StepOutOfFrame(frame)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])


Index: test/functionalities/process_group/TestChangeProcessGroup.py
===
--- test/functionalities/process_group/TestChangeProcessGroup.py
+++ test/functionalities/process_group/TestChangeProcessGroup.py
@@ -91,7 +91,11 @@
 thread = process.GetSelectedThread()
 # this gives a chance for the thread to exit the sleep syscall and sidesteps
 #  on linux
-thread.StepInstruction(False)
+while True:
+frame = thread.GetSelectedFrame()
+if frame.GetFunctionName() == 'main':
+break
+thread.StepOutOfFrame(frame)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D12976: Fix TestChangeProcessGroup to properly step out of sleep.

2015-09-18 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: labath.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D12976

Files:
  test/functionalities/process_group/TestChangeProcessGroup.py

Index: test/functionalities/process_group/TestChangeProcessGroup.py
===
--- test/functionalities/process_group/TestChangeProcessGroup.py
+++ test/functionalities/process_group/TestChangeProcessGroup.py
@@ -91,7 +91,12 @@
 thread = process.GetSelectedThread()
 # this gives a chance for the thread to exit the sleep syscall and 
sidesteps
 #  on linux
-thread.StepInstruction(False)
+# thread.StepInstruction(False)
+while True:
+frame = thread.GetSelectedFrame()
+if frame.GetFunctionName() == 'main':
+break
+thread.StepOutOfFrame(frame)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])


Index: test/functionalities/process_group/TestChangeProcessGroup.py
===
--- test/functionalities/process_group/TestChangeProcessGroup.py
+++ test/functionalities/process_group/TestChangeProcessGroup.py
@@ -91,7 +91,12 @@
 thread = process.GetSelectedThread()
 # this gives a chance for the thread to exit the sleep syscall and sidesteps
 #  on linux
-thread.StepInstruction(False)
+# thread.StepInstruction(False)
+while True:
+frame = thread.GetSelectedFrame()
+if frame.GetFunctionName() == 'main':
+break
+thread.StepOutOfFrame(frame)
 
 # release the child from its loop
 self.expect("expr release_child_flag = 1", substrs = ["= 1"])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247914 - Fix TestMiSymbol for gcc-4.9 test.

2015-09-17 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Sep 17 13:38:55 2015
New Revision: 247914

URL: http://llvm.org/viewvc/llvm-project?rev=247914&view=rev
Log:
Fix TestMiSymbol for gcc-4.9 test.

Modified:
lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py

Modified: lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py?rev=247914&r1=247913&r2=247914&view=diff
==
--- lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py (original)
+++ lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py Thu Sep 17 13:38:55 
2015
@@ -45,7 +45,7 @@ class MiSymbolTestCase(lldbmi_testcase.M
 sline = line_number('symbol_list_lines_inline_test2.cpp', '// 
FUNC_gfunc2')
 eline = line_number('symbol_list_lines_inline_test2.cpp', '// 
END_gfunc2')
 self.runCmd("-symbol-list-lines symbol_list_lines_inline_test2.cpp")
-
self.expect("\^done,lines=\[\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"3\d\"\})*,\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}\]"
 % (sline, eline))
+
self.expect("\^done,lines=\[\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"3\d\"\})*,\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"3\d\"\})*\]"
 % (sline, eline))
 ##FIXME: This doesn't work for symbol_list_lines_inline_test.cpp due 
to clang bug llvm.org/pr24716
 ##sline = line_number('symbol_list_lines_inline_test.cpp', '// 
FUNC_gfunc')
 ##eline = line_number('symbol_list_lines_inline_test.cpp', '// 
STRUCT_s')


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


Re: [Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.

2015-09-17 Thread Chaoren Lin via lldb-commits
chaoren added a subscriber: chaoren.
chaoren added a comment.

Could you please take a look at these issues?

TestMiSymbol started to fail on Linux with gcc-4.9:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/6387



Comment at: lldb/trunk/tools/lldb-mi/MIUtilParse.h:13
@@ +12,3 @@
+// Third party headers:
+#include "../lib/Support/regex_impl.h"
+

This caused a build failure on OS X:
http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/5801


Repository:
  rL LLVM

http://reviews.llvm.org/D12115



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


[Lldb-commits] [lldb] r247863 - XFAIL TestCppNsImport for gcc-4.9 inclusive.

2015-09-16 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Wed Sep 16 18:36:41 2015
New Revision: 247863

URL: http://llvm.org/viewvc/llvm-project?rev=247863&view=rev
Log:
XFAIL TestCppNsImport for gcc-4.9 inclusive.

Modified:
lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py

Modified: lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py?rev=247863&r1=247862&r2=247863&view=diff
==
--- lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py (original)
+++ lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py Wed Sep 16 18:36:41 
2015
@@ -17,7 +17,7 @@ class TestCppNsImport(TestBase):
 self.check()
 
 @dwarf_test
-@expectedFailureGcc(None, ['>', '4.9.0'])
+@expectedFailureGcc(None, ['>=', '4.9'])
 def test_with_dwarf_and_run_command(self):
 """Tests imported namespaces in C++."""
 self.buildDwarf()


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


Re: [Lldb-commits] [PATCH] D12909: Fix Makefile for Windows to Android tests.

2015-09-16 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247857: Fix Makefile for Windows to Android tests. (authored 
by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D12909?vs=34905&id=34929#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12909

Files:
  lldb/trunk/test/make/Makefile.rules

Index: lldb/trunk/test/make/Makefile.rules
===
--- lldb/trunk/test/make/Makefile.rules
+++ lldb/trunk/test/make/Makefile.rules
@@ -73,11 +73,12 @@
 # tests from Visual Studio, the environment variable isn't inherited
 # all the way down to the process spawned for make.
 #--
-ifeq "$(OS)" ""
-   OS = $(shell uname -s)
+HOST_OS = $(shell uname -s)
+ifeq "$(HOST_OS)" "windows32"
+   HOST_OS = Windows_NT
 endif
-ifeq "$(OS)" "windows32"
-   OS = Windows_NT
+ifeq "$(OS)" ""
+   OS = $(HOST_OS)
 endif
 
 #--
@@ -485,7 +486,7 @@
 # the compiler -MM option. The -M option will list all system headers,
 # and the -MM option will list all non-system dependencies.
 #--
-ifeq "$(OS)" "Windows_NT"
+ifeq "$(HOST_OS)" "Windows_NT"
JOIN_CMD = &
QUOTE = "
 else


Index: lldb/trunk/test/make/Makefile.rules
===
--- lldb/trunk/test/make/Makefile.rules
+++ lldb/trunk/test/make/Makefile.rules
@@ -73,11 +73,12 @@
 # tests from Visual Studio, the environment variable isn't inherited
 # all the way down to the process spawned for make.
 #--
-ifeq "$(OS)" ""
-	OS = $(shell uname -s)
+HOST_OS = $(shell uname -s)
+ifeq "$(HOST_OS)" "windows32"
+	HOST_OS = Windows_NT
 endif
-ifeq "$(OS)" "windows32"
-	OS = Windows_NT
+ifeq "$(OS)" ""
+	OS = $(HOST_OS)
 endif
 
 #--
@@ -485,7 +486,7 @@
 # the compiler -MM option. The -M option will list all system headers,
 # and the -MM option will list all non-system dependencies.
 #--
-ifeq "$(OS)" "Windows_NT"
+ifeq "$(HOST_OS)" "Windows_NT"
 	JOIN_CMD = &
 	QUOTE = "
 else
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247857 - Fix Makefile for Windows to Android tests.

2015-09-16 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Wed Sep 16 16:51:51 2015
New Revision: 247857

URL: http://llvm.org/viewvc/llvm-project?rev=247857&view=rev
Log:
Fix Makefile for Windows to Android tests.

Reviewers: zturner

Subscribers: tberghammer, lldb-commits, danalbert

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

Modified:
lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/test/make/Makefile.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=247857&r1=247856&r2=247857&view=diff
==
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Wed Sep 16 16:51:51 2015
@@ -73,11 +73,12 @@ endif
 # tests from Visual Studio, the environment variable isn't inherited
 # all the way down to the process spawned for make.
 #--
-ifeq "$(OS)" ""
-   OS = $(shell uname -s)
+HOST_OS = $(shell uname -s)
+ifeq "$(HOST_OS)" "windows32"
+   HOST_OS = Windows_NT
 endif
-ifeq "$(OS)" "windows32"
-   OS = Windows_NT
+ifeq "$(OS)" ""
+   OS = $(HOST_OS)
 endif
 
 #--
@@ -485,7 +486,7 @@ endif
 # the compiler -MM option. The -M option will list all system headers,
 # and the -MM option will list all non-system dependencies.
 #--
-ifeq "$(OS)" "Windows_NT"
+ifeq "$(HOST_OS)" "Windows_NT"
JOIN_CMD = &
QUOTE = "
 else


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


[Lldb-commits] [lldb] r247855 - XFAIL TestCppNsImport for gcc-4.9.

2015-09-16 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Wed Sep 16 16:32:48 2015
New Revision: 247855

URL: http://llvm.org/viewvc/llvm-project?rev=247855&view=rev
Log:
XFAIL TestCppNsImport for gcc-4.9.

Works for gcc-4.8. A bug in gcc perhaps.

Modified:
lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py

Modified: lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py?rev=247855&r1=247854&r2=247855&view=diff
==
--- lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py (original)
+++ lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py Wed Sep 16 16:32:48 
2015
@@ -17,6 +17,7 @@ class TestCppNsImport(TestBase):
 self.check()
 
 @dwarf_test
+@expectedFailureGcc(None, ['>', '4.9.0'])
 def test_with_dwarf_and_run_command(self):
 """Tests imported namespaces in C++."""
 self.buildDwarf()


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


[Lldb-commits] [PATCH] D12909: Fix Makefile for Windows to Android tests.

2015-09-16 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: zturner.
chaoren added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer.

http://reviews.llvm.org/D12909

Files:
  test/make/Makefile.rules

Index: test/make/Makefile.rules
===
--- test/make/Makefile.rules
+++ test/make/Makefile.rules
@@ -73,11 +73,12 @@
 # tests from Visual Studio, the environment variable isn't inherited
 # all the way down to the process spawned for make.
 #--
-ifeq "$(OS)" ""
-   OS = $(shell uname -s)
+HOST_OS = $(shell uname -s)
+ifeq "$(HOST_OS)" "windows32"
+   HOST_OS = Windows_NT
 endif
-ifeq "$(OS)" "windows32"
-   OS = Windows_NT
+ifeq "$(OS)" ""
+   OS = $(HOST_OS)
 endif
 
 #--
@@ -485,7 +486,7 @@
 # the compiler -MM option. The -M option will list all system headers,
 # and the -MM option will list all non-system dependencies.
 #--
-ifeq "$(OS)" "Windows_NT"
+ifeq "$(HOST_OS)" "Windows_NT"
JOIN_CMD = &
QUOTE = "
 else


Index: test/make/Makefile.rules
===
--- test/make/Makefile.rules
+++ test/make/Makefile.rules
@@ -73,11 +73,12 @@
 # tests from Visual Studio, the environment variable isn't inherited
 # all the way down to the process spawned for make.
 #--
-ifeq "$(OS)" ""
-	OS = $(shell uname -s)
+HOST_OS = $(shell uname -s)
+ifeq "$(HOST_OS)" "windows32"
+	HOST_OS = Windows_NT
 endif
-ifeq "$(OS)" "windows32"
-	OS = Windows_NT
+ifeq "$(OS)" ""
+	OS = $(HOST_OS)
 endif
 
 #--
@@ -485,7 +486,7 @@
 # the compiler -MM option. The -M option will list all system headers,
 # and the -MM option will list all non-system dependencies.
 #--
-ifeq "$(OS)" "Windows_NT"
+ifeq "$(HOST_OS)" "Windows_NT"
 	JOIN_CMD = &
 	QUOTE = "
 else
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247766 - Fix off-by-one size check.

2015-09-15 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Sep 15 20:20:34 2015
New Revision: 247766

URL: http://llvm.org/viewvc/llvm-project?rev=247766&view=rev
Log:
Fix off-by-one size check.

Modified:
lldb/trunk/source/Expression/IRInterpreter.cpp

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=247766&r1=247765&r2=247766&view=diff
==
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Tue Sep 15 20:20:34 2015
@@ -655,7 +655,7 @@ IRInterpreter::Interpret (llvm::Module &
  ai != ae;
  ++ai, ++arg_index)
 {
-if (args.size() < static_cast(arg_index))
+if (args.size() <= static_cast(arg_index))
 {
 error.SetErrorString ("Not enough arguments passed in to 
function");
 return false;


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


[Lldb-commits] [lldb] r247648 - Revert "Fixup XFAIL marking on TestConstVariables for clang version"

2015-09-14 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Mon Sep 14 19:52:00 2015
New Revision: 247648

URL: http://llvm.org/viewvc/llvm-project?rev=247648&view=rev
Log:
Revert "Fixup XFAIL marking on TestConstVariables for clang version"

Summary:
Linux with ToT clang (3.8) fails.

This reverts commit r247633.

Reviewers: tfiala

Subscribers: lldb-commits

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

Modified:
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=247648&r1=247647&r2=247648&view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Mon Sep 14 
19:52:00 2015
@@ -16,9 +16,7 @@ class ConstVariableTestCase(TestBase):
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")


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


Re: [Lldb-commits] [PATCH] D12868: Revert "Fixup XFAIL marking on TestConstVariables for clang version"

2015-09-14 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247648: Revert "Fixup XFAIL marking on TestConstVariables 
for clang version" (authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D12868?vs=34764&id=34766#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12868

Files:
  lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Index: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
===
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
@@ -16,9 +16,7 @@
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")


Index: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
===
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
@@ -16,9 +16,7 @@
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using platform-specific names like `getpid` in tests")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


  1   2   >