Re: [Lldb-commits] [PATCH] D28666: Fix TestRegisterVariables for linux arm/arm64 gcc ver > 5

2017-01-13 Thread Todd Fiala via lldb-commits
LGTM.

Jim and I also thought this test was incredibly brittle. You really want
assembly or something that guarantees that variables will be in registers.

On Fri, Jan 13, 2017 at 1:43 AM Pavel Labath via Phabricator <
revi...@reviews.llvm.org> wrote:

> labath accepted this revision.
>
> labath added a comme
>
> This revision is now accepted and ready to land.
>
>
>
> Seems reasonable. Maybe add a comment explaining why is that macro defined.
>
>
>
> This test is incredibly brittle. I think we should find a better way to
> test the feature, but I don't really have a good idea so far...
>
>
>
>
>
> https://reviews.llvm.org/D28666
>
>
>
>
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r289479 - Removing myself from code ownership file

2016-12-12 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Dec 12 16:42:00 2016
New Revision: 289479

URL: http://llvm.org/viewvc/llvm-project?rev=289479=rev
Log:
Removing myself from code ownership file

I'm transitioning away from my current employer, and I do not foresee myself
spending much time on LLDB in the near future. Ideally somebody on the Google
Android team takes over the gdb-remote protocol tests, and somebody with decent
familiarity with the test suite infrastructure takes over the parallel test
runner and test event stream portions of the Python test suite.

Modified:
lldb/trunk/CODE_OWNERS.txt

Modified: lldb/trunk/CODE_OWNERS.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CODE_OWNERS.txt?rev=289479=289478=289479=diff
==
--- lldb/trunk/CODE_OWNERS.txt (original)
+++ lldb/trunk/CODE_OWNERS.txt Mon Dec 12 16:42:00 2016
@@ -49,8 +49,3 @@ D: Test suite
 N: Pavel Labath
 E: lab...@google.com
 D: Linux, Android
-
-N: Todd Fiala
-E: todd.fi...@gmail.com
-D: Test Suite, esp. subsystems (concurrent test runners, test events, 
TestResults system), gdb-remote protocol tests
-


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


Re: [Lldb-commits] [lldb] r288044 - fix up Xcode build for r287916

2016-11-28 Thread Todd Fiala via lldb-commits
Sure thing :-)

On Mon, Nov 28, 2016 at 1:17 PM, Tim Hammerquist <pen...@gmail.com> wrote:

> Thanks, Todd!
>
> On Mon, Nov 28, 2016 at 9:19 AM, Todd Fiala via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Author: tfiala
>> Date: Mon Nov 28 11:19:03 2016
>> New Revision: 288044
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=288044=rev
>> Log:
>> fix up Xcode build for r287916
>>
>> Modified:
>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>>
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodepro
>> j/project.pbxproj?rev=288044=288043=288044=diff
>> 
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Nov 28 11:19:03 2016
>> @@ -69,6 +69,7 @@
>> 236124A51986B4E2004EFC37 /* Socket.cpp in Sources */ =
>> {isa = PBXBuildFile; fileRef = 236124A31986B4E2004EFC37 /* Socket.cpp */; };
>> 2374D7531D4BB2FF005C9575 /* GDBRemoteClientBase.cpp in
>> Sources */ = {isa = PBXBuildFile; fileRef = 2374D74E1D4BB299005C9575 /*
>> GDBRemoteClientBase.cpp */; };
>> 2377C2F819E613C100737875 /* PipePosix.cpp in Sources */ =
>> {isa = PBXBuildFile; fileRef = 2377C2F719E613C100737875 /* PipePosix.cpp
>> */; };
>> +   237A8BAF1DEC9C7800CEBAFF /* RegisterInfoPOSIX_arm64.cpp
>> in Sources */ = {isa = PBXBuildFile; fileRef = 237A8BAB1DEC9BBC00CEBAFF /*
>> RegisterInfoPOSIX_arm64.cpp */; };
>> 238F2B9E1D2C82D0001FF92A /* StructuredDataPlugin.cpp in
>> Sources */ = {isa = PBXBuildFile; fileRef = 238F2B9D1D2C82D0001FF92A /*
>> StructuredDataPlugin.cpp */; };
>> 238F2BA11D2C835A001FF92A /* StructuredDataPlugin.h in
>> Headers */ = {isa = PBXBuildFile; fileRef = 238F2B9F1D2C835A001FF92A /*
>> StructuredDataPlugin.h */; };
>> 238F2BA21D2C835A001FF92A /* SystemRuntime.h in Headers */
>> = {isa = PBXBuildFile; fileRef = 238F2BA01D2C835A001FF92A /*
>> SystemRuntime.h */; };
>> @@ -917,7 +918,6 @@
>> AF1FA88A1A60A69500272AFC /* RegisterNumber.cpp in Sources
>> */ = {isa = PBXBuildFile; fileRef = AF1FA8891A60A69500272AFC /*
>> RegisterNumber.cpp */; };
>> AF20F7661AF18F8500751A6E /* ABISysV_arm.cpp in Sources */
>> = {isa = PBXBuildFile; fileRef = AF20F7641AF18F8500751A6E /*
>> ABISysV_arm.cpp */; };
>> AF20F76A1AF18F9000751A6E /* ABISysV_arm64.cpp in Sources
>> */ = {isa = PBXBuildFile; fileRef = AF20F7681AF18F9000751A6E /*
>> ABISysV_arm64.cpp */; };
>> -   AF20F7701AF1902900751A6E /*
>> RegisterContextLinux_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef
>> = AF20F76E1AF1902900751A6E /* RegisterContextLinux_arm64.cpp */; };
>> AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources
>> */ = {isa = PBXBuildFile; fileRef = AF23B4D919009C66003E2A58 /*
>> FreeBSDSignals.cpp */; };
>> AF248A4D1DA71C77000B814D /* TestArm64InstEmulation.cpp in
>> Sources */ = {isa = PBXBuildFile; fileRef = AF248A4C1DA71C77000B814D /*
>> TestArm64InstEmulation.cpp */; };
>> AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in
>> Sources */ = {isa = PBXBuildFile; fileRef = AF254E2F170CCC33007AE5C9 /*
>> PlatformDarwinKernel.cpp */; };
>> @@ -980,7 +980,6 @@
>> E769331C1A94D15400C73337 /* lldb-gdbserver.cpp in Sources
>> */ = {isa = PBXBuildFile; fileRef = 26D6F3F4183E7F9300194858 /*
>> lldb-gdbserver.cpp */; };
>> E769331E1A94D18100C73337 /* lldb-server.cpp in Sources */
>> = {isa = PBXBuildFile; fileRef = E769331D1A94D18100C73337 /*
>> lldb-server.cpp */; };
>> E7723D441AC4A7FB002BA082 /* 
>> RegisterContextPOSIXCore_arm64.cpp
>> in Sources */ = {isa = PBXBuildFile; fileRef = E7723D421AC4A7FB002BA082 /*
>> RegisterContextPOSIXCore_arm64.cpp */; };
>> -   E7723D481AC4A8C8002BA082 /* RegisterContextFreeBSD_arm64.cpp
>> in Sources */ = {isa = PBXBuildFile; fileRef = E7723D461AC4A8C8002BA082 /*
>> RegisterContextFreeBSD_arm64.cpp */; };
>> E7723D4C1AC4A944002BA082 /*
>> RegisterContextPOSIX_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef
>> = E7723D4A1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp */; };
>> E778E9A21B062D1700247609 /* EmulateInstructionMIPS.cpp in
>> Sources */ 

[Lldb-commits] [lldb] r288044 - fix up Xcode build for r287916

2016-11-28 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Nov 28 11:19:03 2016
New Revision: 288044

URL: http://llvm.org/viewvc/llvm-project?rev=288044=rev
Log:
fix up Xcode build for r287916

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=288044=288043=288044=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Nov 28 11:19:03 2016
@@ -69,6 +69,7 @@
236124A51986B4E2004EFC37 /* Socket.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 236124A31986B4E2004EFC37 /* Socket.cpp */; };
2374D7531D4BB2FF005C9575 /* GDBRemoteClientBase.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 2374D74E1D4BB299005C9575 /* 
GDBRemoteClientBase.cpp */; };
2377C2F819E613C100737875 /* PipePosix.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 2377C2F719E613C100737875 /* PipePosix.cpp */; };
+   237A8BAF1DEC9C7800CEBAFF /* RegisterInfoPOSIX_arm64.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 237A8BAB1DEC9BBC00CEBAFF /* 
RegisterInfoPOSIX_arm64.cpp */; };
238F2B9E1D2C82D0001FF92A /* StructuredDataPlugin.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 238F2B9D1D2C82D0001FF92A /* 
StructuredDataPlugin.cpp */; };
238F2BA11D2C835A001FF92A /* StructuredDataPlugin.h in Headers 
*/ = {isa = PBXBuildFile; fileRef = 238F2B9F1D2C835A001FF92A /* 
StructuredDataPlugin.h */; };
238F2BA21D2C835A001FF92A /* SystemRuntime.h in Headers */ = 
{isa = PBXBuildFile; fileRef = 238F2BA01D2C835A001FF92A /* SystemRuntime.h */; 
};
@@ -917,7 +918,6 @@
AF1FA88A1A60A69500272AFC /* RegisterNumber.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF1FA8891A60A69500272AFC /* RegisterNumber.cpp 
*/; };
AF20F7661AF18F8500751A6E /* ABISysV_arm.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF20F7641AF18F8500751A6E /* ABISysV_arm.cpp */; 
};
AF20F76A1AF18F9000751A6E /* ABISysV_arm64.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp 
*/; };
-   AF20F7701AF1902900751A6E /* RegisterContextLinux_arm64.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = AF20F76E1AF1902900751A6E /* 
RegisterContextLinux_arm64.cpp */; };
AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp 
*/; };
AF248A4D1DA71C77000B814D /* TestArm64InstEmulation.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = AF248A4C1DA71C77000B814D /* 
TestArm64InstEmulation.cpp */; };
AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = AF254E2F170CCC33007AE5C9 /* 
PlatformDarwinKernel.cpp */; };
@@ -980,7 +980,6 @@
E769331C1A94D15400C73337 /* lldb-gdbserver.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 26D6F3F4183E7F9300194858 /* lldb-gdbserver.cpp 
*/; };
E769331E1A94D18100C73337 /* lldb-server.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = E769331D1A94D18100C73337 /* lldb-server.cpp */; 
};
E7723D441AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp 
in Sources */ = {isa = PBXBuildFile; fileRef = E7723D421AC4A7FB002BA082 /* 
RegisterContextPOSIXCore_arm64.cpp */; };
-   E7723D481AC4A8C8002BA082 /* RegisterContextFreeBSD_arm64.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = E7723D461AC4A8C8002BA082 /* 
RegisterContextFreeBSD_arm64.cpp */; };
E7723D4C1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = E7723D4A1AC4A944002BA082 /* 
RegisterContextPOSIX_arm64.cpp */; };
E778E9A21B062D1700247609 /* EmulateInstructionMIPS.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = E778E99F1B062D1700247609 /* 
EmulateInstructionMIPS.cpp */; };
E7E94ABC1B54961F00D0AE30 /* GDBRemoteSignals.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = E73A15A41B548EC500786197 /* 
GDBRemoteSignals.cpp */; };
@@ -1268,6 +1267,8 @@
2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = GDBRemoteClientBase.cpp; sourceTree = ""; };
2374D74F1D4BB299005C9575 /* GDBRemoteClientBase.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
GDBRemoteClientBase.h; sourceTree = ""; };
2377C2F719E613C100737875 /* PipePosix.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = PipePosix.cpp; sourceTree = ""; };
+   237A8BAB1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.cpp */ = 
{isa 

[Lldb-commits] [PATCH] D26721: Make AutoComplete code use StringRef

2016-11-16 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.

LGTM!  All tests passed on macOS 10.12.2 public beta with Xcode 8.1.


https://reviews.llvm.org/D26721



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


Re: [Lldb-commits] [PATCH] D26721: Make AutoComplete code use StringRef

2016-11-16 Thread Todd Fiala via lldb-commits
Great.  Back soon...

On Wed, Nov 16, 2016 at 3:50 PM, Zachary Turner  wrote:

> No you can go ahead.  The new changes I found are not specific to Mac, I
> should find problems if there's any with the additional changes.
>
> On Wed, Nov 16, 2016 at 3:42 PM Todd Fiala  wrote:
>
>> Okay cool.  I'm building against this now.  Should I hold off testing?
>>
>> On Wed, Nov 16, 2016 at 3:41 PM, Zachary Turner 
>> wrote:
>>
>> It's no problem, I actually found a few functions I forgot to convert, so
>> I'm making some additional changes.  Nothing that requires additional
>> testing, but at the very least I won't be able to get this in until
>> tomorrow at the earliest, so it's no biggie.
>>
>> On Wed, Nov 16, 2016 at 3:17 PM Todd Fiala  wrote:
>>
>> Hey Zachary,
>>
>> I had to run home unexpectedly. The build worked but I left before the
>> test results came out.
>>
>> If you ran it on Linux and the Linux tests passed, we can address issues
>> that show up on the macOS side.
>>
>> I will also try it at home on macOS, but I don't think you need to hold
>> up with the aforementioned caveat on running the Linux tests.
>>
>>
>> On Wednesday, November 16, 2016, Zachary Turner 
>> wrote:
>>
>> Hey Todd, Did you run the tests earlier?  If so what was the result?  No
>> worries if you didn't run them yet, but it sounded like you were already
>> kicking it off at 11:30.  Just want to make sure you didn't finish and
>> forget to update with the result :)
>>
>> On Wed, Nov 16, 2016 at 12:38 PM Todd Fiala  wrote:
>>
>> Yep - I followed that.  I'm just doing the "build + test" verification on
>> macOS.
>>
>>
>> On Wed, Nov 16, 2016 at 11:41 AM, Zachary Turner 
>> wrote:
>>
>> BTW, I would still like to get Chris to take a look at my usage of
>> llvm::Twine.  Even if it works, I'm not sure if I used it correctly.
>>
>> On Wed, Nov 16, 2016 at 11:36 AM Zachary Turner 
>> wrote:
>>
>> Either way is fine, I think you might have hit a merge conflict if you
>> stacked them, but if you've already worked through it, then no big deal.
>>
>> On Wed, Nov 16, 2016 at 11:30 AM Todd Fiala  wrote:
>>
>> tfiala added a comment.
>>
>> I'm going to test this one now, stacked on top of the final macOS-working
>> version of https://reviews.llvm.org/D26698.  Tell me now if you want it
>> tested independently of https://reviews.llvm.org/D26698.
>>
>>
>> https://reviews.llvm.org/D26721
>>
>>
>>
>>
>>
>>
>> --
>> -Todd
>>
>>
>>
>> --
>> -Todd
>>
>>
>>
>>
>> --
>> -Todd
>>
>


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


Re: [Lldb-commits] [PATCH] D26721: Make AutoComplete code use StringRef

2016-11-16 Thread Todd Fiala via lldb-commits
Okay cool.  I'm building against this now.  Should I hold off testing?

On Wed, Nov 16, 2016 at 3:41 PM, Zachary Turner  wrote:

> It's no problem, I actually found a few functions I forgot to convert, so
> I'm making some additional changes.  Nothing that requires additional
> testing, but at the very least I won't be able to get this in until
> tomorrow at the earliest, so it's no biggie.
>
> On Wed, Nov 16, 2016 at 3:17 PM Todd Fiala  wrote:
>
>> Hey Zachary,
>>
>> I had to run home unexpectedly. The build worked but I left before the
>> test results came out.
>>
>> If you ran it on Linux and the Linux tests passed, we can address issues
>> that show up on the macOS side.
>>
>> I will also try it at home on macOS, but I don't think you need to hold
>> up with the aforementioned caveat on running the Linux tests.
>>
>>
>> On Wednesday, November 16, 2016, Zachary Turner 
>> wrote:
>>
>> Hey Todd, Did you run the tests earlier?  If so what was the result?  No
>> worries if you didn't run them yet, but it sounded like you were already
>> kicking it off at 11:30.  Just want to make sure you didn't finish and
>> forget to update with the result :)
>>
>> On Wed, Nov 16, 2016 at 12:38 PM Todd Fiala  wrote:
>>
>> Yep - I followed that.  I'm just doing the "build + test" verification on
>> macOS.
>>
>>
>> On Wed, Nov 16, 2016 at 11:41 AM, Zachary Turner 
>> wrote:
>>
>> BTW, I would still like to get Chris to take a look at my usage of
>> llvm::Twine.  Even if it works, I'm not sure if I used it correctly.
>>
>> On Wed, Nov 16, 2016 at 11:36 AM Zachary Turner 
>> wrote:
>>
>> Either way is fine, I think you might have hit a merge conflict if you
>> stacked them, but if you've already worked through it, then no big deal.
>>
>> On Wed, Nov 16, 2016 at 11:30 AM Todd Fiala  wrote:
>>
>> tfiala added a comment.
>>
>> I'm going to test this one now, stacked on top of the final macOS-working
>> version of https://reviews.llvm.org/D26698.  Tell me now if you want it
>> tested independently of https://reviews.llvm.org/D26698.
>>
>>
>> https://reviews.llvm.org/D26721
>>
>>
>>
>>
>>
>>
>> --
>> -Todd
>>
>>
>>
>> --
>> -Todd
>>
>>


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


Re: [Lldb-commits] [PATCH] D26721: Make AutoComplete code use StringRef

2016-11-16 Thread Todd Fiala via lldb-commits
Hey Zachary,

I had to run home unexpectedly. The build worked but I left before the test
results came out.

If you ran it on Linux and the Linux tests passed, we can address issues
that show up on the macOS side.

I will also try it at home on macOS, but I don't think you need to hold up
with the aforementioned caveat on running the Linux tests.

On Wednesday, November 16, 2016, Zachary Turner  wrote:

> Hey Todd, Did you run the tests earlier?  If so what was the result?  No
> worries if you didn't run them yet, but it sounded like you were already
> kicking it off at 11:30.  Just want to make sure you didn't finish and
> forget to update with the result :)
>
> On Wed, Nov 16, 2016 at 12:38 PM Todd Fiala  > wrote:
>
>> Yep - I followed that.  I'm just doing the "build + test" verification on
>> macOS.
>>
>>
>> On Wed, Nov 16, 2016 at 11:41 AM, Zachary Turner > > wrote:
>>
>>> BTW, I would still like to get Chris to take a look at my usage of
>>> llvm::Twine.  Even if it works, I'm not sure if I used it correctly.
>>>
>>> On Wed, Nov 16, 2016 at 11:36 AM Zachary Turner >> > wrote:
>>>
 Either way is fine, I think you might have hit a merge conflict if you
 stacked them, but if you've already worked through it, then no big deal.

 On Wed, Nov 16, 2016 at 11:30 AM Todd Fiala > wrote:

> tfiala added a comment.
>
> I'm going to test this one now, stacked on top of the final
> macOS-working version of https://reviews.llvm.org/D26698.  Tell me
> now if you want it tested independently of https://reviews.llvm.org/
> D26698.
>
>
> https://reviews.llvm.org/D26721
>
>
>
>
>>
>>
>> --
>> -Todd
>>
>

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


Re: [Lldb-commits] [PATCH] D26721: Make AutoComplete code use StringRef

2016-11-16 Thread Todd Fiala via lldb-commits
Yep - I followed that.  I'm just doing the "build + test" verification on
macOS.


On Wed, Nov 16, 2016 at 11:41 AM, Zachary Turner  wrote:

> BTW, I would still like to get Chris to take a look at my usage of
> llvm::Twine.  Even if it works, I'm not sure if I used it correctly.
>
> On Wed, Nov 16, 2016 at 11:36 AM Zachary Turner 
> wrote:
>
>> Either way is fine, I think you might have hit a merge conflict if you
>> stacked them, but if you've already worked through it, then no big deal.
>>
>> On Wed, Nov 16, 2016 at 11:30 AM Todd Fiala  wrote:
>>
>> tfiala added a comment.
>>
>> I'm going to test this one now, stacked on top of the final macOS-working
>> version of https://reviews.llvm.org/D26698.  Tell me now if you want it
>> tested independently of https://reviews.llvm.org/D26698.
>>
>>
>> https://reviews.llvm.org/D26721
>>
>>
>>
>>


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


[Lldb-commits] [PATCH] D26721: Make AutoComplete code use StringRef

2016-11-16 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I'm going to test this one now, stacked on top of the final macOS-working 
version of https://reviews.llvm.org/D26698.  Tell me now if you want it tested 
independently of https://reviews.llvm.org/D26698.


https://reviews.llvm.org/D26721



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


[Lldb-commits] [PATCH] D26698: Remove SBStream accessor that lets you manipulate the internal buffer.

2016-11-16 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

Here is the adjusted patch that fixes the issue I was seeing on 
TestTerminal.py.  My first set of changes had a lifetime issue where I needed a 
const char* that was synthesized on the fly and went away by the time I needed 
it.

LGTM on macOS with this patch applied:
F2590224: D26698_macos_build_fixes_v2.diff 


https://reviews.llvm.org/D26698



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


[Lldb-commits] [PATCH] D26698: Remove SBStream accessor that lets you manipulate the internal buffer.

2016-11-16 Thread Todd Fiala via lldb-commits
tfiala added a comment.

TestTerminal.py's test_launch_in_terminal() is timing out consistently with the 
current change + my diff attached above.

I'm looking into it now.  (It quite possibly is due to the build fixes I did 
above).

I'm attaching the 'sample' (callstack sampling) from the failure here.   
F2590212: TestTerminal.py-58148.sample.zip 


https://reviews.llvm.org/D26698



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


[Lldb-commits] [PATCH] D26721: Make AutoComplete code use StringRef

2016-11-15 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I can give this one a run though on macOS in the morning.


https://reviews.llvm.org/D26721



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


[Lldb-commits] [PATCH] D26698: Remove SBStream accessor that lets you manipulate the internal buffer.

2016-11-15 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I can run this through in the morning on macOS.


https://reviews.llvm.org/D26698



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


[Lldb-commits] [PATCH] D26618: Make some code not manipulate the underlying buffer of a StreamString

2016-11-14 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.  Built and passed all existing tests.


https://reviews.llvm.org/D26618



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


[Lldb-commits] [PATCH] D26553: Remove weak-linked symbols for SBBreakpointListImpl

2016-11-11 Thread Todd Fiala via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286631: Remove weak-linked symbols for SBBreakpointListImpl 
(authored by tfiala).

Changed prior to commit:
  https://reviews.llvm.org/D26553?vs=77639=77662#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26553

Files:
  lldb/trunk/include/lldb/API/SBBreakpoint.h
  lldb/trunk/include/lldb/API/SBTarget.h
  lldb/trunk/source/API/SBBreakpoint.cpp


Index: lldb/trunk/source/API/SBBreakpoint.cpp
===
--- lldb/trunk/source/API/SBBreakpoint.cpp
+++ lldb/trunk/source/API/SBBreakpoint.cpp
@@ -712,11 +712,11 @@
 }
 
 // This is simple collection of breakpoint id's and their target.
-class lldb::SBBreakpointListImpl {
+class SBBreakpointListImpl {
 public:
-  SBBreakpointListImpl(SBTarget ) : m_target_wp() {
-if (target.IsValid())
-  m_target_wp = target.GetSP();
+  SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() {
+if (target_sp && target_sp->IsValid())
+  m_target_wp = target_sp;
   }
 
   ~SBBreakpointListImpl() = default;
@@ -796,7 +796,7 @@
 };
 
 SBBreakpointList::SBBreakpointList(SBTarget )
-: m_opaque_sp(new lldb::SBBreakpointListImpl(target)) {}
+: m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {}
 
 SBBreakpointList::~SBBreakpointList() {}
 
Index: lldb/trunk/include/lldb/API/SBTarget.h
===
--- lldb/trunk/include/lldb/API/SBTarget.h
+++ lldb/trunk/include/lldb/API/SBTarget.h
@@ -819,7 +819,7 @@
 protected:
   friend class SBAddress;
   friend class SBBlock;
-  friend class SBBreakpointListImpl;
+  friend class SBBreakpointList;
   friend class SBDebugger;
   friend class SBExecutionContext;
   friend class SBFunction;
Index: lldb/trunk/include/lldb/API/SBBreakpoint.h
===
--- lldb/trunk/include/lldb/API/SBBreakpoint.h
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class SBBreakpointListImpl;
+
 namespace lldb {
 
 class LLDB_API SBBreakpoint {
@@ -146,8 +148,6 @@
   lldb::BreakpointSP m_opaque_sp;
 };
 
-class SBBreakpointListImpl;
-
 class LLDB_API SBBreakpointList {
 public:
   SBBreakpointList(SBTarget );


Index: lldb/trunk/source/API/SBBreakpoint.cpp
===
--- lldb/trunk/source/API/SBBreakpoint.cpp
+++ lldb/trunk/source/API/SBBreakpoint.cpp
@@ -712,11 +712,11 @@
 }
 
 // This is simple collection of breakpoint id's and their target.
-class lldb::SBBreakpointListImpl {
+class SBBreakpointListImpl {
 public:
-  SBBreakpointListImpl(SBTarget ) : m_target_wp() {
-if (target.IsValid())
-  m_target_wp = target.GetSP();
+  SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() {
+if (target_sp && target_sp->IsValid())
+  m_target_wp = target_sp;
   }
 
   ~SBBreakpointListImpl() = default;
@@ -796,7 +796,7 @@
 };
 
 SBBreakpointList::SBBreakpointList(SBTarget )
-: m_opaque_sp(new lldb::SBBreakpointListImpl(target)) {}
+: m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {}
 
 SBBreakpointList::~SBBreakpointList() {}
 
Index: lldb/trunk/include/lldb/API/SBTarget.h
===
--- lldb/trunk/include/lldb/API/SBTarget.h
+++ lldb/trunk/include/lldb/API/SBTarget.h
@@ -819,7 +819,7 @@
 protected:
   friend class SBAddress;
   friend class SBBlock;
-  friend class SBBreakpointListImpl;
+  friend class SBBreakpointList;
   friend class SBDebugger;
   friend class SBExecutionContext;
   friend class SBFunction;
Index: lldb/trunk/include/lldb/API/SBBreakpoint.h
===
--- lldb/trunk/include/lldb/API/SBBreakpoint.h
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class SBBreakpointListImpl;
+
 namespace lldb {
 
 class LLDB_API SBBreakpoint {
@@ -146,8 +148,6 @@
   lldb::BreakpointSP m_opaque_sp;
 };
 
-class SBBreakpointListImpl;
-
 class LLDB_API SBBreakpointList {
 public:
   SBBreakpointList(SBTarget );
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r286631 - Remove weak-linked symbols for SBBreakpointListImpl

2016-11-11 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Fri Nov 11 15:06:40 2016
New Revision: 286631

URL: http://llvm.org/viewvc/llvm-project?rev=286631=rev
Log:
Remove weak-linked symbols for SBBreakpointListImpl

Summary:
Similar to SBStructuredData's Impl class, SBBreakpointListImpl was
getting weak-link exported in the lldb namespace. This change list fixes
that by moving out of the lldb public namespace, which removes it from
public export visibility.

Fixes:
rdar://28960344

Reviewers: jingham

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D26553

Modified:
lldb/trunk/include/lldb/API/SBBreakpoint.h
lldb/trunk/include/lldb/API/SBTarget.h
lldb/trunk/source/API/SBBreakpoint.cpp

Modified: lldb/trunk/include/lldb/API/SBBreakpoint.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpoint.h?rev=286631=286630=286631=diff
==
--- lldb/trunk/include/lldb/API/SBBreakpoint.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h Fri Nov 11 15:06:40 2016
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class SBBreakpointListImpl;
+
 namespace lldb {
 
 class LLDB_API SBBreakpoint {
@@ -146,8 +148,6 @@ private:
   lldb::BreakpointSP m_opaque_sp;
 };
 
-class SBBreakpointListImpl;
-
 class LLDB_API SBBreakpointList {
 public:
   SBBreakpointList(SBTarget );

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=286631=286630=286631=diff
==
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Fri Nov 11 15:06:40 2016
@@ -819,7 +819,7 @@ public:
 protected:
   friend class SBAddress;
   friend class SBBlock;
-  friend class SBBreakpointListImpl;
+  friend class SBBreakpointList;
   friend class SBDebugger;
   friend class SBExecutionContext;
   friend class SBFunction;

Modified: lldb/trunk/source/API/SBBreakpoint.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpoint.cpp?rev=286631=286630=286631=diff
==
--- lldb/trunk/source/API/SBBreakpoint.cpp (original)
+++ lldb/trunk/source/API/SBBreakpoint.cpp Fri Nov 11 15:06:40 2016
@@ -712,11 +712,11 @@ SBBreakpoint::GetNumBreakpointLocationsF
 }
 
 // This is simple collection of breakpoint id's and their target.
-class lldb::SBBreakpointListImpl {
+class SBBreakpointListImpl {
 public:
-  SBBreakpointListImpl(SBTarget ) : m_target_wp() {
-if (target.IsValid())
-  m_target_wp = target.GetSP();
+  SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() {
+if (target_sp && target_sp->IsValid())
+  m_target_wp = target_sp;
   }
 
   ~SBBreakpointListImpl() = default;
@@ -796,7 +796,7 @@ private:
 };
 
 SBBreakpointList::SBBreakpointList(SBTarget )
-: m_opaque_sp(new lldb::SBBreakpointListImpl(target)) {}
+: m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {}
 
 SBBreakpointList::~SBBreakpointList() {}
 


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


[Lldb-commits] [PATCH] D26553: Remove weak-linked symbols for SBBreakpointListImpl

2016-11-11 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added a reviewer: jingham.
tfiala added a subscriber: lldb-commits.

Similar to SBStructuredData's Impl class, SBBreakpointListImpl was getting 
weak-link exported in the lldb namespace.  This change list fixes that by 
moving out of the lldb public namespace, which removes it from public export 
visibility.


https://reviews.llvm.org/D26553

Files:
  API/SBBreakpoint.cpp
  lldb/API/SBBreakpoint.h
  lldb/API/SBTarget.h


Index: API/SBBreakpoint.cpp
===
--- API/SBBreakpoint.cpp
+++ API/SBBreakpoint.cpp
@@ -712,11 +712,11 @@
 }
 
 // This is simple collection of breakpoint id's and their target.
-class lldb::SBBreakpointListImpl {
+class SBBreakpointListImpl {
 public:
-  SBBreakpointListImpl(SBTarget ) : m_target_wp() {
-if (target.IsValid())
-  m_target_wp = target.GetSP();
+  SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() {
+if (target_sp && target_sp->IsValid())
+  m_target_wp = target_sp;
   }
 
   ~SBBreakpointListImpl() = default;
@@ -796,7 +796,7 @@
 };
 
 SBBreakpointList::SBBreakpointList(SBTarget )
-: m_opaque_sp(new lldb::SBBreakpointListImpl(target)) {}
+: m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {}
 
 SBBreakpointList::~SBBreakpointList() {}
 
Index: lldb/API/SBTarget.h
===
--- lldb/API/SBTarget.h
+++ lldb/API/SBTarget.h
@@ -819,7 +819,7 @@
 protected:
   friend class SBAddress;
   friend class SBBlock;
-  friend class SBBreakpointListImpl;
+  friend class SBBreakpointList;
   friend class SBDebugger;
   friend class SBExecutionContext;
   friend class SBFunction;
Index: lldb/API/SBBreakpoint.h
===
--- lldb/API/SBBreakpoint.h
+++ lldb/API/SBBreakpoint.h
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class SBBreakpointListImpl;
+
 namespace lldb {
 
 class LLDB_API SBBreakpoint {
@@ -146,8 +148,6 @@
   lldb::BreakpointSP m_opaque_sp;
 };
 
-class SBBreakpointListImpl;
-
 class LLDB_API SBBreakpointList {
 public:
   SBBreakpointList(SBTarget );


Index: API/SBBreakpoint.cpp
===
--- API/SBBreakpoint.cpp
+++ API/SBBreakpoint.cpp
@@ -712,11 +712,11 @@
 }
 
 // This is simple collection of breakpoint id's and their target.
-class lldb::SBBreakpointListImpl {
+class SBBreakpointListImpl {
 public:
-  SBBreakpointListImpl(SBTarget ) : m_target_wp() {
-if (target.IsValid())
-  m_target_wp = target.GetSP();
+  SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() {
+if (target_sp && target_sp->IsValid())
+  m_target_wp = target_sp;
   }
 
   ~SBBreakpointListImpl() = default;
@@ -796,7 +796,7 @@
 };
 
 SBBreakpointList::SBBreakpointList(SBTarget )
-: m_opaque_sp(new lldb::SBBreakpointListImpl(target)) {}
+: m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {}
 
 SBBreakpointList::~SBBreakpointList() {}
 
Index: lldb/API/SBTarget.h
===
--- lldb/API/SBTarget.h
+++ lldb/API/SBTarget.h
@@ -819,7 +819,7 @@
 protected:
   friend class SBAddress;
   friend class SBBlock;
-  friend class SBBreakpointListImpl;
+  friend class SBBreakpointList;
   friend class SBDebugger;
   friend class SBExecutionContext;
   friend class SBFunction;
Index: lldb/API/SBBreakpoint.h
===
--- lldb/API/SBBreakpoint.h
+++ lldb/API/SBBreakpoint.h
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class SBBreakpointListImpl;
+
 namespace lldb {
 
 class LLDB_API SBBreakpoint {
@@ -146,8 +148,6 @@
   lldb::BreakpointSP m_opaque_sp;
 };
 
-class SBBreakpointListImpl;
-
 class LLDB_API SBBreakpointList {
 public:
   SBBreakpointList(SBTarget );
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Todd Fiala via lldb-commits
Okay cool, thanks Chris!

-Todd

> On Nov 10, 2016, at 1:40 PM, Chris Bieneman  wrote:
> 
> I just pushed r286504, which expects the string to not be quoted. This should 
> solve the bot failures.
> 
> -Chris
> 
>> On Nov 10, 2016, at 1:30 PM, Todd Fiala > > wrote:
>> 
>> I'm at a point where I can look at it.
>> 
>> On Thu, Nov 10, 2016 at 12:17 PM, Tim Hammerquist > > wrote:
>> Looks like the quotes around the lldb version string aren't properly 
>> preserved in the xcodeproj file as they are in CMake.
>> 
>> Can any of the LLDB devs more comfortable with plumbing the depths of Xcode 
>> project configuration provide some guidance here?
>> 
>> http://lab.llvm.org:8080/green/job/lldb_build_test/21828/ 
>> 
>> 
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22: 
>> error: unexpected namespace name 'lldb': expected expression
>> g_version_str += LLDB_VERSION_STRING;
>>  ^
>> In file included from :356:
>> :4:29: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>> ^
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22: 
>> error: invalid suffix '.0' on floating constant
>> In file included from :356:
>> :4:40: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>>^
>> 2 errors generated.
>> 
>> 
>> On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits 
>> > wrote:
>> Author: cbieneman
>> Date: Thu Nov 10 11:33:19 2016
>> New Revision: 286479
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=286479=rev 
>> 
>> Log:
>> Unify Darwin and Non-Darwin printing of version output
>> 
>> Summary:
>> This change unifies and simplifies the code paths between the Darwin and 
>> non-Darwin code to print the LLDB version information.
>> 
>> It also introduces a new variable in CMake LLDB_VERSION_STRING which can be 
>> used to specify custom version information. On Darwin this value is 
>> implicitly set based on the resource/LLDB-Info.plist file.
>> 
>> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version 
>> output is:
>> 
>> > ./bin/lldb -version
>> lldb version 4.0.0 (lldb-360.99.0)
>>   clang revision 286264
>>   llvm revision 286265
>> 
>> This behavior is unified across all target platforms.
>> 
>> Reviewers: lldb-commits
>> 
>> Subscribers: mgorny, tfiala
>> 
>> Differential Revision: https://reviews.llvm.org/D26478 
>> 
>> 
>> Added:
>> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> Modified:
>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>> lldb/trunk/source/CMakeLists.txt
>> lldb/trunk/source/lldb.cpp
>> 
>> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/EmbedAppleVersion.cmake?rev=286479=auto
>>  
>> 
>> ==
>> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
>> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 11:33:19 2016
>> @@ -0,0 +1,11 @@
>> +execute_process(COMMAND /usr/libexec/PlistBuddy -c "Print:CFBundleVersion" 
>> ${LLDB_INFO_PLIST}
>> +OUTPUT_VARIABLE BundleVersion
>> +OUTPUT_STRIP_TRAILING_WHITESPACE)
>> +
>> +file(APPEND "${HEADER_FILE}.tmp"
>> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
>> +
>> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
>> +
>> +file(REMOVE "${HEADER_FILE}.tmp")
>> 
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=286479=286478=286479=diff
>>  
>> 
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
>> @@ -8775,6 +8775,20 @@
>> 
>> "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
>> );
>> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
>> +   GCC_PREPROCESSOR_DEFINITIONS = (
>> +   __STDC_CONSTANT_MACROS,
>> +   __STDC_LIMIT_MACROS,
>> +   

Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Todd Fiala via lldb-commits
I'm at a point where I can look at it.

On Thu, Nov 10, 2016 at 12:17 PM, Tim Hammerquist  wrote:

> Looks like the quotes around the lldb version string aren't properly
> preserved in the xcodeproj file as they are in CMake.
>
> Can any of the LLDB devs more comfortable with plumbing the depths of
> Xcode project configuration provide some guidance here?
>
> http://lab.llvm.org:8080/green/job/lldb_build_test/21828/
>
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
> error: unexpected namespace name 'lldb': expected expression
> g_version_str += LLDB_VERSION_STRING;
>  ^
> In file included from :356:
> :4:29: note: expanded from here
> #define LLDB_VERSION_STRING lldb-360.99.0
> ^
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
> error: invalid suffix '.0' on floating constant
> In file included from :356:
> :4:40: note: expanded from here
> #define LLDB_VERSION_STRING lldb-360.99.0
>^
> 2 errors generated.
>
>
> On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Author: cbieneman
>> Date: Thu Nov 10 11:33:19 2016
>> New Revision: 286479
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=286479=rev
>> Log:
>> Unify Darwin and Non-Darwin printing of version output
>>
>> Summary:
>> This change unifies and simplifies the code paths between the Darwin and
>> non-Darwin code to print the LLDB version information.
>>
>> It also introduces a new variable in CMake LLDB_VERSION_STRING which can
>> be used to specify custom version information. On Darwin this value is
>> implicitly set based on the resource/LLDB-Info.plist file.
>>
>> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version
>> output is:
>>
>> > ./bin/lldb -version
>> lldb version 4.0.0 (lldb-360.99.0)
>>   clang revision 286264
>>   llvm revision 286265
>>
>> This behavior is unified across all target platforms.
>>
>> Reviewers: lldb-commits
>>
>> Subscribers: mgorny, tfiala
>>
>> Differential Revision: https://reviews.llvm.org/D26478
>>
>> Added:
>> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> Modified:
>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>> lldb/trunk/source/CMakeLists.txt
>> lldb/trunk/source/lldb.cpp
>>
>> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules
>> /EmbedAppleVersion.cmake?rev=286479=auto
>> 
>> ==
>> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
>> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 11:33:19
>> 2016
>> @@ -0,0 +1,11 @@
>> +execute_process(COMMAND /usr/libexec/PlistBuddy -c
>> "Print:CFBundleVersion" ${LLDB_INFO_PLIST}
>> +OUTPUT_VARIABLE BundleVersion
>> +OUTPUT_STRIP_TRAILING_WHITESPACE)
>> +
>> +file(APPEND "${HEADER_FILE}.tmp"
>> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
>> +
>> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
>> +
>> +file(REMOVE "${HEADER_FILE}.tmp")
>>
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodepro
>> j/project.pbxproj?rev=286479=286478=286479=diff
>> 
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
>> @@ -8775,6 +8775,20 @@
>> "\"$(SYSTEM_LIBRARY_DIR)/Priva
>> teFrameworks\"",
>> );
>> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
>> +   GCC_PREPROCESSOR_DEFINITIONS = (
>> +   __STDC_CONSTANT_MACROS,
>> +   __STDC_LIMIT_MACROS,
>> +   LLDB_CONFIGURATION_DEBUG,
>> +   "LLDB_VERSION_STRING=\"lldb-$
>> {CURRENT_PROJECT_VERSION}\"",
>> +   );
>> +   "GCC_PREPROCESSOR_
>> DEFINITIONS[sdk=iphoneos*][arch=*]" = (
>> +   __STDC_CONSTANT_MACROS,
>> +   __STDC_LIMIT_MACROS,
>> +   LLDB_CONFIGURATION_DEBUG,
>> +   LLDB_DISABLE_PYTHON,
>> +   NO_XPC_SERVICES,
>> +   "LLDB_VERSION_STRING=\"lldb-$
>> {CURRENT_PROJECT_VERSION}\"",
>> +   );
>> HEADER_SEARCH_PATHS =
>> /usr/include/libxml2;
>> 

[Lldb-commits] [PATCH] D26513: [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities

2016-11-10 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Looks fine to me pending that one question on the TSAN check (i.e. if the 
existing TSAN check is as good as your new ASAN check, LGTM).




Comment at: 
packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py:23
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):

Seems fine as long as @skipUnlessThreadSanitizer is doing the right type of 
check like you added for @skipUnlessAddressSanitizer.


https://reviews.llvm.org/D26513



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


[Lldb-commits] [PATCH] D26470: Fix weak symbol linkage in SBStructuredData, update docs.

2016-11-09 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Thanks, Jim!


https://reviews.llvm.org/D26470



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


[Lldb-commits] [PATCH] D26478: Unify Darwin and Non-Darwin printing of version output

2016-11-09 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a reviewer: tfiala.
tfiala added a comment.
This revision is now accepted and ready to land.

Looks good, @beanz!


https://reviews.llvm.org/D26478



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


[Lldb-commits] [PATCH] D26470: Fix weak symbol linkage in SBStructuredData, update docs.

2016-11-09 Thread Todd Fiala via lldb-commits
tfiala updated this revision to Diff 77405.
tfiala added a comment.

Adjusted web docs.


https://reviews.llvm.org/D26470

Files:
  API/SBStructuredData.cpp
  SB-api-coding-rules.html
  lldb/API/SBStructuredData.h

Index: SB-api-coding-rules.html
===
--- SB-api-coding-rules.html
+++ SB-api-coding-rules.html
@@ -36,7 +36,7 @@
 
   You also need to choose the ivars for the class with care, since you can't add or remove ivars
 without breaking binary compatibility.  In some cases, the SB class is a thin wrapper around
-an interal lldb_private object.  In that case, the class can have a single ivar, which is 
+an internal lldb_private object.  In that case, the class can have a single ivar, which is
 either a pointer, shared_ptr or unique_ptr to the object in the lldb_private API.  All the
 lldb_private classes that get used this way are declared as opaque classes in lldb_forward.h,
 which is included in SBDefines.h.  So if you need an SB class to wrap an lldb_private class
@@ -47,8 +47,9 @@
 as a direct ivar in the SB Class.  Instead, make an Impl class in the SB's .cpp file, and then
 make the SB object hold a shared or unique pointer to the Impl object.  The theory behind this is
 that if you need more state in the SB object, those needs are likely to change over time, 
-and this way the impl class can pick up members without changing the size of the object.
-An example of this is the SBValue class.
+and this way the Impl class can pick up members without changing the size of the object.
+An example of this is the SBValue class.  Please note that you should not put this Impl class
+in the lldb namespace.  Failure to do so leads to leakage of weak-linked symbols in the SBAPI.
 
   In order to fit into the Python API's, we need to be able to default construct all the SB objects.
 Since the ivars of the classes are all pointers of one sort or other, this can easily be done, but
Index: API/SBStructuredData.cpp
===
--- API/SBStructuredData.cpp
+++ API/SBStructuredData.cpp
@@ -20,66 +20,62 @@
 using namespace lldb_private;
 
 #pragma mark--
-#pragma mark Impl
+#pragma mark StructuredDataImpl
 
-class SBStructuredData::Impl {
+class StructuredDataImpl {
 public:
-  Impl() : m_plugin_wp(), m_data_sp() {}
+  StructuredDataImpl() : m_plugin_wp(), m_data_sp() {}
 
-  Impl(const Impl ) = default;
+  StructuredDataImpl(const StructuredDataImpl ) = default;
 
-  Impl(const EventSP _sp)
+  StructuredDataImpl(const EventSP _sp)
   : m_plugin_wp(
 EventDataStructuredData::GetPluginFromEvent(event_sp.get())),
 m_data_sp(EventDataStructuredData::GetObjectFromEvent(event_sp.get())) {
   }
 
-  ~Impl() = default;
+  ~StructuredDataImpl() = default;
 
-  Impl =(const Impl ) = default;
+  StructuredDataImpl =(const StructuredDataImpl ) = default;
 
   bool IsValid() const { return m_data_sp.get() != nullptr; }
 
   void Clear() {
 m_plugin_wp.reset();
 m_data_sp.reset();
   }
 
-  SBError GetAsJSON(lldb::SBStream ) const {
+  SBError GetAsJSON(lldb_private::Stream ) const {
 SBError sb_error;
 
 if (!m_data_sp) {
   sb_error.SetErrorString("No structured data.");
   return sb_error;
 }
 
-m_data_sp->Dump(stream.ref());
+m_data_sp->Dump(stream);
 return sb_error;
   }
 
-  lldb::SBError GetDescription(lldb::SBStream ) const {
-SBError sb_error;
+  Error GetDescription(lldb_private::Stream ) const {
+Error error;
 
 if (!m_data_sp) {
-  sb_error.SetErrorString("Cannot pretty print structured data: "
-  "no data to print.");
-  return sb_error;
+  error.SetErrorString("Cannot pretty print structured data: "
+   "no data to print.");
+  return error;
 }
 
 // Grab the plugin.
 auto plugin_sp = StructuredDataPluginSP(m_plugin_wp);
 if (!plugin_sp) {
-  sb_error.SetErrorString("Cannot pretty print structured data: "
-  "plugin doesn't exist.");
-  return sb_error;
+  error.SetErrorString("Cannot pretty print structured data: "
+   "plugin doesn't exist.");
+  return error;
 }
 
 

[Lldb-commits] [PATCH] D26470: Fix weak symbol linkage in SBStructuredData, update docs.

2016-11-09 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Making changes to the text...




Comment at: SB-api-coding-rules.html:51-54
+An example of this is the SBValue 
class.  Please note it is necessary for the Impl class to
+not be a class embedded in the SB 
class, but rather should be a separate class that is not
+present in the public lldb namespace.  
Failure to do so leads to leakage of weak-linked symbols
+in the SBAPI.

jingham wrote:
> I think it's more straightforward to say:
> 
> Please note that you should not put this Impl class in the lldb namespace.  
> Failure to do so...
> 
> After all, it would be equally bad to have put it inside the "namespace lldb" 
> but not in the class.
> 
Okay, I can use your verbiage.   The end of one sentence did explicitly call 
out having it not be in the public lldb namespace:

"...but rather should be a separate class that is not present in the public 
lldb namespace."

but I think your prose is clearer, though.  Thank you!


https://reviews.llvm.org/D26470



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


[Lldb-commits] [PATCH] D26470: Fix weak symbol linkage in SBStructuredData, update docs.

2016-11-09 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added a reviewer: jingham.
tfiala added a subscriber: lldb-commits.

This change fixes an issue where I was leaking a weakly-linked symbol in the 
SBAPI.  It also updates the docs to call out what I did wrong.


https://reviews.llvm.org/D26470

Files:
  API/SBStructuredData.cpp
  SB-api-coding-rules.html
  lldb/API/SBStructuredData.h

Index: SB-api-coding-rules.html
===
--- SB-api-coding-rules.html
+++ SB-api-coding-rules.html
@@ -48,7 +48,10 @@
 make the SB object hold a shared or unique pointer to the Impl object.  The theory behind this is
 that if you need more state in the SB object, those needs are likely to change over time, 
 and this way the impl class can pick up members without changing the size of the object.
-An example of this is the SBValue class.
+An example of this is the SBValue class.  Please note it is necessary for the Impl class to
+not be a class embedded in the SB class, but rather should be a separate class that is not
+present in the public lldb namespace.  Failure to do so leads to leakage of weak-linked symbols
+in the SBAPI.
 
   In order to fit into the Python API's, we need to be able to default construct all the SB objects.
 Since the ivars of the classes are all pointers of one sort or other, this can easily be done, but
Index: API/SBStructuredData.cpp
===
--- API/SBStructuredData.cpp
+++ API/SBStructuredData.cpp
@@ -20,66 +20,62 @@
 using namespace lldb_private;
 
 #pragma mark--
-#pragma mark Impl
+#pragma mark StructuredDataImpl
 
-class SBStructuredData::Impl {
+class StructuredDataImpl {
 public:
-  Impl() : m_plugin_wp(), m_data_sp() {}
+  StructuredDataImpl() : m_plugin_wp(), m_data_sp() {}
 
-  Impl(const Impl ) = default;
+  StructuredDataImpl(const StructuredDataImpl ) = default;
 
-  Impl(const EventSP _sp)
+  StructuredDataImpl(const EventSP _sp)
   : m_plugin_wp(
 EventDataStructuredData::GetPluginFromEvent(event_sp.get())),
 m_data_sp(EventDataStructuredData::GetObjectFromEvent(event_sp.get())) {
   }
 
-  ~Impl() = default;
+  ~StructuredDataImpl() = default;
 
-  Impl =(const Impl ) = default;
+  StructuredDataImpl =(const StructuredDataImpl ) = default;
 
   bool IsValid() const { return m_data_sp.get() != nullptr; }
 
   void Clear() {
 m_plugin_wp.reset();
 m_data_sp.reset();
   }
 
-  SBError GetAsJSON(lldb::SBStream ) const {
+  SBError GetAsJSON(lldb_private::Stream ) const {
 SBError sb_error;
 
 if (!m_data_sp) {
   sb_error.SetErrorString("No structured data.");
   return sb_error;
 }
 
-m_data_sp->Dump(stream.ref());
+m_data_sp->Dump(stream);
 return sb_error;
   }
 
-  lldb::SBError GetDescription(lldb::SBStream ) const {
-SBError sb_error;
+  Error GetDescription(lldb_private::Stream ) const {
+Error error;
 
 if (!m_data_sp) {
-  sb_error.SetErrorString("Cannot pretty print structured data: "
-  "no data to print.");
-  return sb_error;
+  error.SetErrorString("Cannot pretty print structured data: "
+   "no data to print.");
+  return error;
 }
 
 // Grab the plugin.
 auto plugin_sp = StructuredDataPluginSP(m_plugin_wp);
 if (!plugin_sp) {
-  sb_error.SetErrorString("Cannot pretty print structured data: "
-  "plugin doesn't exist.");
-  return sb_error;
+  error.SetErrorString("Cannot pretty print structured data: "
+   "plugin doesn't exist.");
+  return error;
 }
 
 // Get the data's description.
-auto error = plugin_sp->GetDescription(m_data_sp, stream.ref());
-if (!error.Success())
-  sb_error.SetError(error);
-
-return sb_error;
+return plugin_sp->GetDescription(m_data_sp, stream);
   }
 
 private:
@@ -90,13 +86,13 @@
 #pragma mark--
 #pragma mark SBStructuredData
 
-SBStructuredData::SBStructuredData() : m_impl_up(new Impl()) {}
+SBStructuredData::SBStructuredData() : m_impl_up(new StructuredDataImpl()) {}
 
 SBStructuredData::SBStructuredData(const lldb::SBStructuredData )
-: m_impl_up(new Impl(*rhs.m_impl_up.get())) {}
+: m_impl_up(new StructuredDataImpl(*rhs.m_impl_up.get())) {}
 
 SBStructuredData::SBStructuredData(const lldb::EventSP _sp)
-: m_impl_up(new Impl(event_sp)) {}
+: m_impl_up(new StructuredDataImpl(event_sp)) {}
 
 SBStructuredData::~SBStructuredData() {}
 
@@ -111,9 

[Lldb-commits] [lldb] r285726 - change ProcessAttach test to no-debug-info

2016-11-01 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Nov  1 13:50:34 2016
New Revision: 285726

URL: http://llvm.org/viewvc/llvm-project?rev=285726=rev
Log:
change ProcessAttach test to no-debug-info

Fixes:
https://bugs.swift.org/browse/SR-3103

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py?rev=285726=285725=285726=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
 Tue Nov  1 13:50:34 2016
@@ -19,6 +19,8 @@ class ProcessAttachTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
+NO_DEBUG_INFO_TESTCASE = True
+
 @skipIfiOSSimulator
 def test_attach_to_process_by_id(self):
 """Test attach by process id"""


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


[Lldb-commits] [PATCH] D26188: [RFC] Solve linking inconsistency, proposal one

2016-11-01 Thread Todd Fiala via lldb-commits
tfiala added a comment.

> @zturner wrote:
>  Can I have some background? What is the linking problem?

Hi Zachary,

This review has comments that pretty much cover it exhaustively:
https://reviews.llvm.org/D26093

That'd be a good place to start.


https://reviews.llvm.org/D26188



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


[Lldb-commits] [PATCH] D26188: [RFC] Solve linking inconsistency, proposal one

2016-11-01 Thread Todd Fiala via lldb-commits
tfiala added inline comments.



Comment at: source/API/CMakeLists.txt:109
   else()
-# Don't use an explicit export.  Instead, tell the linker to
-# export all symbols.

> This does not affect affect the state of backtracing. The option to export 
> all symbols could still stay there, and maybe could even be the default. 

But you eliminate it here, don't you?  (Maybe you just missed that I was also 
exporting the lldb_private symbols in the case of 
"LLDB_EXPORT_ALL_SYMBOLS:BOOL=YES"?)


https://reviews.llvm.org/D26188



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


[Lldb-commits] [PATCH] D26188: [RFC] Solve linking inconsistency, proposal one

2016-11-01 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I'll let Greg comment on the public ABI expansion (i.e. including llvm of a 
specific version, which may differ from LLDB.framework clients that contain 
different versions of LLVM).  My guess is this is not going to work for us, 
since we have long-lived frameworks shipped with Xcode that get used by clients 
where we cannot assume what they are or are not using.  However, we could 
address that by adding the reverse flag, which would be "don't export LLVM", 
and have that be exported by default.

The bit I care about is the "modulo backtrace(3)..." part.  This change is 
taking away my ability to use log-based stacktraces on Linux if I read it 
right.  How were you envisioning I do that with this change?


https://reviews.llvm.org/D26188



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


[Lldb-commits] [PATCH] D26170: Find clang resource directory via *nix-style lookup

2016-10-31 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

Looks reasonable.




Comment at: source/Host/macosx/HostInfoMacOSX.mm:235-239
   size_t framework_pos = raw_path.find("LLDB.framework");
-  if (framework_pos != std::string::npos) {
-framework_pos += strlen("LLDB.framework");
-raw_path.resize(framework_pos);
-raw_path.append("/Resources/Clang");
-  }
+  if (framework_pos == std::string::npos)
+return HostInfoPosix::ComputeClangDirectory(file_spec);
+  
+  framework_pos += strlen("LLDB.framework");

We should have a const in place of the two uses of "LLDB.framework", but that 
can be a separate cleanup.


https://reviews.llvm.org/D26170



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


[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

2016-10-31 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In https://reviews.llvm.org/D26093#583358, @labath wrote:

> The snippets you showed are pretty-much expected behavior. The backtrace that 
> gets printed as a part of the log messages is coming from the backtrace(3) 
> library, which has pretty limited backtracing capabilities -- it only looks 
> at the symbols in the `.dynsym` section (because that's the only thing that 
> is loaded into memory). I am pretty sure you would have problems backtracing 
> if you compiled with -fomit-frame-pointer as well.
>
> I think you fix of just making sure that all symbols show up in the .dynsym 
> section would be fine, were it not for that fact that we have an inconsistent 
> linking policy, which means you get wildly different links depending on 
> whether you export something or not. If we get that straight that this would 
> just be a size optimization (that was the reason we introduced it), with no 
> impact on the behavior, that we could even consider turning off by default (I 
> personally have never used the -S option of logging, but I can see how it 
> could be useful in some workflows). I'll get back to the link policy in a 
> separate email.
>
> That said, you mentioned you also had some problems with setting breakpoints 
> and stuff. Now, if this was true, that would be extremely worrying, but am 
> not able to reproduce that on my side -- breakpoints everything else works 
> fine. The reason for that is that lldb reads the .symtab section (if it is 
> present, which it will be unless you strip the executable), and these linker 
> options do not affect that section. If that is not the case, then we 
> definitely need to figure that out (I suggest stepping through 
> ObjectFileELF::GetSymtab() to get an initial idea of what is going on).
>
> FWIW, this is how a debug session looks like for me. The backtrace() output 
> has addresses only, but lldb is able to symbolicate it with no problem:
>
>   $ bin/lldb -- bin/lldb /bin/ls
>   (lldb) target create "bin/lldb"
>   Current executable set to 'bin/lldb' (x86_64).
>   (lldb) settings set -- target.run-args  "/bin/ls"
>   (lldb) br set -n Log::VAPrintf
>   Breakpoint 1: no locations (pending).
>   WARNING:  Unable to resolve breakpoint to any actual locations.
>   (lldb) pr la
>   Process 87438 launched: 
> '/usr/local/google/home/labath/ll/build/dbg/bin/lldb' (x86_64)
>   1 location added to breakpoint 1
>   Process 87438 stopped and restarted: thread 1 received signal: SIGCHLD
>   (lldb) target create "/bin/ls"
>   Current executable set to '/bin/ls' (x86_64).
>   (lldb) log enable -S lldb process
>   (lldb) pr la
>   Process 87438 stopped
>   * thread #1: tid = 87438, 0x70d1cfeb 
> liblldb.so.40`lldb_private::Log::VAPrintf(this=0x0059a560, 
> format="ProcessLaunchInfo::%s at least one of stdin/stdout/stderr was not 
> set, evaluating default handling", args=0x7fffc1a0) + 27 at 
> Log.cpp:73, name = 'lldb', stop reason = breakpoint 1.1
>   frame #0: 0x70d1cfeb 
> liblldb.so.40`lldb_private::Log::VAPrintf(this=0x0059a560, 
> format="ProcessLaunchInfo::%s at least one of stdin/stdout/stderr was not 
> set, evaluating default handling", args=0x7fffc1a0) + 27 at Log.cpp:73
>  70   void Log::VAPrintf(const char *format, va_list args) {
>  71 // Make a copy of our stream shared pointer in case someone 
> disables our
>  72 // log while we are logging and releases the stream
>   -> 73 StreamSP stream_sp(m_stream_sp);
>  74 if (stream_sp) {
>  75   static uint32_t g_sequence_id = 0;
>  76   StreamString header;
>   (lldb) c
>   Process 87438 resuming
>   ProcessLaunchInfo::FinalizeFileActions at least one of stdin/stdout/stderr 
> was not set, evaluating default handling
>   0  liblldb.so.40 0x74d5a36f
>   1  liblldb.so.40 0x70d1d49f
>   2  liblldb.so.40 0x70d1cfbb
>   3  liblldb.so.40 0x70fff4c4
>   4  liblldb.so.40 0x7103ad63
>   5  liblldb.so.40 0x715c4f9f
>   6  liblldb.so.40 0x70e33fe0
>   7  liblldb.so.40 0x70e20317
>   8  liblldb.so.40 0x70e25c0d
>   9  liblldb.so.40 0x70e265a7
>   10 liblldb.so.40 0x70cf5a60
>   11 liblldb.so.40 0x70cb5c3c
>   12 liblldb.so.40 0x70e26fdf
>   13 liblldb.so.40 0x709d8d21 
> lldb::SBDebugger::RunCommandInterpreter(bool, bool) + 129
>   14 lldb  0x00407c15
>   15 lldb  0x00408257
>   16 libc.so.6 0x7fffeeeb8f45 __libc_start_main + 245
>   17 lldb  0x004038d9
>   Process 87438 stopped
>   * thread #1: tid = 87438, 0x70d1cfeb 
> liblldb.so.40`lldb_private::Log::VAPrintf(this=0x0059a560, 
> format="ProcessLaunchInfo::%s target stdin='%s', target stdout='%s', 
> stderr='%s'", args=0x7fffc1a0) + 27 at Log.cpp:73, name = 'lldb', 
> stop reason = breakpoint 1.1
>   frame #0: 0x70d1cfeb 

[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

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

Here's what you get with the same codebase, but using this cmake line instead:

  cmake -GNinja ../llvm -DCMAKE_BUILD_TYPE=Debug 
-DLLDB_EXPORT_ALL_SYMBOLS:BOOL=YES



  bin/lldb
  (lldb) log enable -S lldb process
  (lldb) target create /bin/ls
  Current executable set to '/bin/ls' (x86_64).
  (lldb) run
  ...
  Process::SetPublicState (state = launching, restarted = 0)
  0  liblldb.so.40 0x7f8f75b0c970
  1  liblldb.so.40 0x7f8f7214aac2 lldb_private::Log::VAPrintf(char const*, 
__va_list_tag*) + 712
  2  liblldb.so.40 0x7f8f7214a7df lldb_private::Log::Printf(char const*, 
...) + 195
  3  liblldb.so.40 0x7f8f7236c66e 
lldb_private::Process::SetPublicState(lldb::StateType, bool) + 100
  4  liblldb.so.40 0x7f8f72370ae5 
lldb_private::Process::Launch(lldb_private::ProcessLaunchInfo&) + 667
  5  liblldb.so.40 0x7f8f7262cbaf 
lldb_private::platform_linux::PlatformLinux::DebugProcess(lldb_private::ProcessLaunchInfo&,
 lldb_private::Debugger&, lldb_private::Target*, lldb_private::Error&) + 1839
  6  liblldb.so.40 0x7f8f723bd932 
lldb_private::Target::Launch(lldb_private::ProcessLaunchInfo&, 
lldb_private::Stream*) + 1288
  7  liblldb.so.40 0x7f8f7281ffd6
  8  liblldb.so.40 0x7f8f7221ffa0 
lldb_private::CommandObjectParsed::Execute(char const*, 
lldb_private::CommandReturnObject&) + 808
  9  liblldb.so.40 0x7f8f722102d2 
lldb_private::CommandInterpreter::HandleCommand(char const*, 
lldb_private::LazyBool, lldb_private::CommandReturnObject&, 
lldb_private::ExecutionContext*, bool, bool) + 2468
  10 liblldb.so.40 0x7f8f72214748 
lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&,
 std::__cxx11::basic_string&) + 324
  11 liblldb.so.40 0x7f8f7212b71d lldb_private::IOHandlerEditline::Run() + 
545
  12 liblldb.so.40 0x7f8f720fb32e 
lldb_private::Debugger::ExecuteIOHandlers() + 110
  13 liblldb.so.40 0x7f8f72215488 
lldb_private::CommandInterpreter::RunCommandInterpreter(bool, bool, 
lldb_private::CommandInterpreterRunOptions&) + 176
  14 liblldb.so.40 0x7f8f71eb314b 
lldb::SBDebugger::RunCommandInterpreter(bool, bool) + 117
  15 lldb  0x00407045
  16 lldb  0x00407408
  17 libc.so.6 0x7f8f7111f830 __libc_start_main + 240
  18 lldb  0x004038e9
  MonitorChildProcessThreadFunction (arg = 0x12883e0) thread starting...
  0  liblldb.so.40   0x7f8f75b0c970
  1  liblldb.so.40   0x7f8f7214aac2 lldb_private::Log::VAPrintf(char 
const*, __va_list_tag*) + 712
  2  liblldb.so.40   0x7f8f7214a7df lldb_private::Log::Printf(char const*, 
...) + 195
  3  liblldb.so.40   0x7f8f720b553f
  4  liblldb.so.40   0x7f8f720ce61e 
lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 236
  5  libpthread.so.0 0x7f8f79d3770a
  6  libc.so.6   0x7f8f7120582d clone + 109
  MonitorChildProcessThreadFunction ::waitpid (pid = 46995, , options = 
1073741824)...
  0  liblldb.so.40   0x7f8f75b0c970
  1  liblldb.so.40   0x7f8f7214aac2 lldb_private::Log::VAPrintf(char 
const*, __va_list_tag*) + 712
  2  liblldb.so.40   0x7f8f7214a7df lldb_private::Log::Printf(char const*, 
...) + 195
  3  liblldb.so.40   0x7f8f720b56a4
  4  liblldb.so.40   0x7f8f720ce61e 
lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 236
  5  libpthread.so.0 0x7f8f79d3770a
  6  libc.so.6   0x7f8f7120582d clone + 109
  started monitoring child process.
  0  liblldb.so.40   0x7f8f75b0c970
  1  liblldb.so.40   0x7f8f7214aac2 lldb_private::Log::VAPrintf(char 
const*, __va_list_tag*) + 712
  2  liblldb.so.40   0x7f8f7214a7df lldb_private::Log::Printf(char const*, 
...) + 195
  3  liblldb.so.40   0x7f8f720b553f
  4  liblldb.so.40   0x7f8f720ce61e 
lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 236
  5  libpthread.so.0 0x7f8f79d3770a
  6  libc.so.6   0x7f8f7120582d clone + 109
  7  libc.so.6   00 clone + 2397022272
  8  liblldb.so.40   0x7f8f725afe6c 
lldb_private::process_gdb_remote::ProcessGDBRemote::EstablishConnectionIfNeeded(lldb_private::ProcessInfo
 const&) + 212
  9  liblldb.so.40   0x7f8f725a4364 
lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(lldb_private::Module*,
 lldb_private::ProcessLaunchInfo&) + 1072
  10 liblldb.so.40   0x7f8f72370b3d 
lldb_private::Process::Launch(lldb_private::ProcessLaunchInfo&) + 755
  11 liblldb.so.40   0x7f8f7262cbaf 
lldb_private::platform_linux::PlatformLinux::DebugProcess(lldb_private::ProcessLaunchInfo&,
 lldb_private::Debugger&, lldb_private::Target*, lldb_private::Error&) + 1839
  12 liblldb.so.40   0x7f8f723bd932 
lldb_private::Target::Launch(lldb_private::ProcessLaunchInfo&, 
lldb_private::Stream*) + 1288
  13 liblldb.so.40   0x7f8f7281ffd6
  14 liblldb.so.40   0x7f8f7221ffa0 
lldb_private::CommandObjectParsed::Execute(char const*, 

[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

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

>> Could you elaborate on this?
> 
> Sure, I'll see if I can reproduce the lack of backtrace symbol lookup that I 
> was experiencing without exporting those symbols back in roughly Oct/Nov 
> 2015.  We've been using this flag ever since to address it.
> 
>> I've been debugging lldb without this switch and everything seems to work 
>> fine
> 
> That definitely was not my experience when I added the flag.  I am seeing if 
> the old scenario holds true on 16.04 x86_64 with the current LLDB codebase.  
> It is possible that the issue we saw manifest has been addressed.)  I will 
> make a best effort attempt this weekend, but it may be more like Monday when 
> I will have dedicated time to repro it.  If it is no longer an issue, I'd 
> consider this flag deprecated as its initial purpose is no longer valid.  If 
> it is still an issue, it could be a config difference between stock Ubuntu 
> and your setup (as we know is at least the case with kernel settings).
> 
>> (modulo problems evaluating fancy expressions, but I don't think that is 
>> related to this. Or is it?).
> 
> At the time the issue was symbol lookup - we were somewhere short-circuiting 
> so that we didn't consider debug symbols properly.  While I didn't try it at 
> the time as I wasn't aware of it, it is possible the issue may be related to 
> needing the -fno-limit-debug-info flag.  When I get to reproducing the 
> original issue, if it does surface, I will try adding that flag as a second 
> step to see if that addresses it.
> 
> For expressions that need to evaluate any symbols we were failing to resolve, 
> I could imagine that being at least one factor.  Not sure though without a 
> specific case to look at.
> 
> More later when I have some results.

Here is an example of where symbolic lookup of backtraces from within 
liblldb.so utterly fail without using this flag.  In the example below, I'm 
using:
(lldb) log enable -S lldb process
(lldb) target create /bin/ls
(lldb) run

And here is my output:

  Process::SetPublicState (exited) -- unlocking run lock
  0  liblldb.so.40   0x7fb6041f6cd0
  1  liblldb.so.40   0x7fb600834e22
  2  liblldb.so.40   0x7fb600834b3f
  3  liblldb.so.40   0x7fb600a5f601
  4  liblldb.so.40   0x7fb600a5f047
  5  liblldb.so.40   0x7fb6007b897e
  6  libpthread.so.0 0x7fb60841570a
  7  libc.so.6   0x7fb5ffa2882d clone + 109
  8  libc.so.6   00 clone + 6125632
  9  liblldb.so.40   0x7fb6007e7a68
  10 liblldb.so.40   0x7fb6007e7e96
  11 liblldb.so.40   0x7fb6007b897e
  12 libpthread.so.0 0x7fb60841570a
  13 libc.so.6   0x7fb5ffa2882d clone + 109
  Process 31919 exited with status = 0 (0x)
  Process::RunPrivateStateThread (arg = 0x1d05580, pid = 31919) thread 
exiting...
  0  liblldb.so.40   0x7fb6041f6cd0
  1  liblldb.so.40   0x7fb600834e22
  2  liblldb.so.40   0x7fb600834b3f
  3  liblldb.so.40   0x7fb600a5f601
  4  liblldb.so.40   0x7fb600a5f047
  5  liblldb.so.40   0x7fb6007b897e
  6  libpthread.so.0 0x7fb60841570a
  7  libc.so.6   0x7fb5ffa2882d clone + 109
  (lldb-superior) MonitorChildProcessThreadFunction (arg = 0x1d25390) thread 
exiting because pid received exit signal...
  0  liblldb.so.40   0x7fb6041f6cd0
  1  liblldb.so.40   0x7fb600834e22
  2  liblldb.so.40   0x7fb600834b3f
  3  liblldb.so.40   0x7fb60079fd23
  4  liblldb.so.40   0x7fb6007b897e
  5  libpthread.so.0 0x7fb60841570a
  6  libc.so.6   0x7fb5ffa2882d clone + 109
  ...

The exact cmake line was:

  cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ../llvm

where the build tree is a sibling directory to the llvm source root directory.

I see very similar behavior when trying to set breakpoints and step into lldb's 
internals with this same lldb.  Those all change to expected behavior when I 
build and run with the -DLLDB_EXPORT_ALL_SYMBOLS:BOOL=YES setting.

Let me know if you get different behavior without with the same setup.  If so, 
we should try to find out what about your Ubuntu load out is different than a 
stock Ubuntu, since this clearly affects LLDB developers using Linux.


Repository:
  rL LLVM

https://reviews.llvm.org/D26093



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


[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

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

In https://reviews.llvm.org/D26093#582825, @labath wrote:

> In https://reviews.llvm.org/D26093#582618, @tfiala wrote:
>
> > > If it unblocks something it might be ok, but it doesn't actually fix the 
> > > problem.
> >
> > It allows debugging of lldb with lldb on Ubuntu.  This broke recently, and 
> > the CL here re-enables the ability to do that.
>
>
> Could you elaborate on this?


Sure, I'll see if I can reproduce the lack of backtrace symbol lookup that I 
was experiencing without exporting those symbols back in roughly Oct/Nov 2015.  
We've been using this flag ever since to address it.

> I've been debugging lldb without this switch and everything seems to work fine

That definitely was not my experience when I added the flag.  I am seeing if 
the old scenario holds true on 16.04 x86_64 with the current LLDB codebase.  It 
is possible that the issue we saw manifest has been addressed.)  I will make a 
best effort attempt this weekend, but it may be more like Monday when I will 
have dedicated time to repro it.  If it is no longer an issue, I'd consider 
this flag deprecated as its initial purpose is no longer valid.  If it is still 
an issue, it could be a config difference between stock Ubuntu and your setup 
(as we know is at least the case with kernel settings).

> (modulo problems evaluating fancy expressions, but I don't think that is 
> related to this. Or is it?).

At the time the issue was symbol lookup - we were somewhere short-circuiting so 
that we didn't consider debug symbols properly.  While I didn't try it at the 
time as I wasn't aware of it, it is possible the issue may be related to 
needing the -fno-limit-debug-info flag.  When I get to reproducing the original 
issue, if it does surface, I will try adding that flag as a second step to see 
if that addresses it.

For expressions that need to evaluate any symbols we were failing to resolve, I 
could imagine that being at least one factor.  Not sure though without a 
specific case to look at.

More later when I have some results.


Repository:
  rL LLVM

https://reviews.llvm.org/D26093



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


[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

2016-10-28 Thread Todd Fiala via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL285484: Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbols 
(authored by tfiala).

Changed prior to commit:
  https://reviews.llvm.org/D26093?vs=76229=76282#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26093

Files:
  lldb/trunk/source/API/CMakeLists.txt
  lldb/trunk/source/API/liblldb-private.exports


Index: lldb/trunk/source/API/CMakeLists.txt
===
--- lldb/trunk/source/API/CMakeLists.txt
+++ lldb/trunk/source/API/CMakeLists.txt
@@ -103,16 +103,13 @@
 # If we're not exporting all symbols, we'll want to explicitly set
 # the exported symbols here.  This prevents 'log enable --stack ...'
 # from working on some systems but limits the liblldb size.
-MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols")
+MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb 
namespace")
 add_llvm_symbol_exports(liblldb 
${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
   else()
 # Don't use an explicit export.  Instead, tell the linker to
 # export all symbols.
-MESSAGE("-- Symbols (liblldb): exporting all symbols")
-# Darwin linker doesn't need this extra step.
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  lldb_append_link_flags(liblldb "-Wl,--export-dynamic")
-endif()
+MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and 
lldb_private namespaces")
+add_llvm_symbol_exports(liblldb 
${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
   endif()
 endif()
 
Index: lldb/trunk/source/API/liblldb-private.exports
===
--- lldb/trunk/source/API/liblldb-private.exports
+++ lldb/trunk/source/API/liblldb-private.exports
@@ -0,0 +1,6 @@
+_ZN4lldb*
+_ZNK4lldb*
+_ZN12lldb_private*
+_ZNK12lldb_private*
+init_lld*
+PyInit__lldb*


Index: lldb/trunk/source/API/CMakeLists.txt
===
--- lldb/trunk/source/API/CMakeLists.txt
+++ lldb/trunk/source/API/CMakeLists.txt
@@ -103,16 +103,13 @@
 # If we're not exporting all symbols, we'll want to explicitly set
 # the exported symbols here.  This prevents 'log enable --stack ...'
 # from working on some systems but limits the liblldb size.
-MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols")
+MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb namespace")
 add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
   else()
 # Don't use an explicit export.  Instead, tell the linker to
 # export all symbols.
-MESSAGE("-- Symbols (liblldb): exporting all symbols")
-# Darwin linker doesn't need this extra step.
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  lldb_append_link_flags(liblldb "-Wl,--export-dynamic")
-endif()
+MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
+add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
   endif()
 endif()
 
Index: lldb/trunk/source/API/liblldb-private.exports
===
--- lldb/trunk/source/API/liblldb-private.exports
+++ lldb/trunk/source/API/liblldb-private.exports
@@ -0,0 +1,6 @@
+_ZN4lldb*
+_ZNK4lldb*
+_ZN12lldb_private*
+_ZNK12lldb_private*
+init_lld*
+PyInit__lldb*
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r285484 - Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbols

2016-10-28 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Fri Oct 28 19:29:15 2016
New Revision: 285484

URL: http://llvm.org/viewvc/llvm-project?rev=285484=rev
Log:
Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbols

LLDB_EXPORT_ALL_SYMBOLS used to instruct the build to export all
the symbols in liblldb on CMake builds.  This change limits the
CMake define to only add in the lldb_private namespace to the
symbols that normally get exported, such that we export all the
symbols in the public lldb namespace and the lldb_private namespace.

This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=30822

Reviewers: labath, beanz

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D26093

Added:
lldb/trunk/source/API/liblldb-private.exports
Modified:
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=285484=285483=285484=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Fri Oct 28 19:29:15 2016
@@ -103,16 +103,13 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo
 # If we're not exporting all symbols, we'll want to explicitly set
 # the exported symbols here.  This prevents 'log enable --stack ...'
 # from working on some systems but limits the liblldb size.
-MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols")
+MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb 
namespace")
 add_llvm_symbol_exports(liblldb 
${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
   else()
 # Don't use an explicit export.  Instead, tell the linker to
 # export all symbols.
-MESSAGE("-- Symbols (liblldb): exporting all symbols")
-# Darwin linker doesn't need this extra step.
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  lldb_append_link_flags(liblldb "-Wl,--export-dynamic")
-endif()
+MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and 
lldb_private namespaces")
+add_llvm_symbol_exports(liblldb 
${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
   endif()
 endif()
 

Added: lldb/trunk/source/API/liblldb-private.exports
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/liblldb-private.exports?rev=285484=auto
==
--- lldb/trunk/source/API/liblldb-private.exports (added)
+++ lldb/trunk/source/API/liblldb-private.exports Fri Oct 28 19:29:15 2016
@@ -0,0 +1,6 @@
+_ZN4lldb*
+_ZNK4lldb*
+_ZN12lldb_private*
+_ZNK12lldb_private*
+init_lld*
+PyInit__lldb*


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


[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

2016-10-28 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In https://reviews.llvm.org/D26093#582659, @beanz wrote:

> In https://reviews.llvm.org/D26093#582618, @tfiala wrote:
>
> > The current usage of CommandLine via global static constructors in 
> > Debug.cpp seems like a poor choice, as it forces all users of llvm with 
> > NDEBUG not defined to get some command line behavior that they may never 
> > use.  Maybe some aspect of that can be made lazy?
>
>
> It can't be made lazy without completely re-designing how cl::opt works. 
> Which is something I've had lengthy discussions with Chandler about. 
> Currently the biggest issue with fixing it relates to how the new pass 
> manager works. Specifically in order to provide meaningful -help output we 
> need a way to register command line options in passes, which we have today, 
> but won't with the new pass manager.
>
> It is an open problem that we're trying to come up with a solution to.


Cool - glad to see some thought is going into it.

On other projects where there are firewalls between linkage domains, I've had 
one subsystem on one side to be initialized with a pointer to the storage 
location(s) on the other, by way of an init() routine that is called by a third 
party passing it over the barrier.

Something like this, in terms of our problem here (pseudo-code and maybe wrong 
naming convention!):

// in lldb-mi::main(), main binary
int main() {

  // Ask lldb-mi's local llvm's CommandLine to return a handle to its internal 
data structures,
  // and pass that to the agent that controls the llvm embedded in liblldb.
  liblldbInitCommandLine(cl::CommandLine::GetHandle());
  ...

}

// in liblldb so/dylib/dll, exported method:

void liblldbInitCommandLine(void *commandLineHandle) {

  // Pass the given opaque handle to the LLVM CommandLine embedded in liblldb.
  cl::CommandLine::SetHandle(commandLineHandle);

}

// in CommandLine

void *CommandLine::GetHandle() {

  return static_cast(my_internal_pimpl);

}

void CommandLine::SetHandle(void *external_pimpl_to_use_here) {

  // Make concurrency safe if desired...
  // Merge existing results with those present in the passed in version, if 
desired (see below)
  delete my_internal_pimpl;
  my_internal_pimpl = (some_type*)(external_pimpl_to_use_here);

}

The trick to this working, though, is to not have uncontrolled, global static 
initializers permuting these on both sides until after the dance of 
synchronizing their storage explicitly.  And that isn't the case here.  We can 
probably work around it with 'debug' since we know both sides will do it, and 
so there is no race to avoid.  But if other clients on either side do the same 
thing, we can lose them.  Unless, we have some kind of merge semantics on the 
SetHandle(void*) call, which I suppose could be done to collate any items that 
were initialized on either side.

Anyways, food for thought...  I'm not thrilled with the manual aspect of it, 
but I have used it in production.

>> Unless there is strong opposition, I'd like to put this in.
> 
> No objection from me.

Okay - Pavel seemed alright enough with it for the time being as well, so I'll 
put this in, with the one wording correction I called out above.


https://reviews.llvm.org/D26093



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


[Lldb-commits] [PATCH] D25830: Search for llvm-config in LLDB_PATH_TO_LLVM_BUILD first

2016-10-28 Thread Todd Fiala via lldb-commits
tfiala abandoned this revision.
tfiala added a comment.

I'm at a loss for the workflow to close this.  I originally commandeered it to 
do an abort on it, but that didn't work.  I'm going to abandon it, and see if I 
can kill it then.


Repository:
  rL LLVM

https://reviews.llvm.org/D25830



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


[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

2016-10-28 Thread Todd Fiala via lldb-commits
tfiala added inline comments.



Comment at: API/CMakeLists.txt:106
 # from working on some systems but limits the liblldb size.
-MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols")
+MESSAGE("-- Symbols (liblldb): only exporting symbols in lldb namespace")
 add_llvm_symbol_exports(liblldb 
${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)

I'll change this to:
-- Symbols (liblldb): exporting symbols in the lldb namespace

in the commit to normalize with the message I modified below.


https://reviews.llvm.org/D26093



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


[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

2016-10-28 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added reviewers: labath, tberghammer.
tfiala added a subscriber: lldb-commits.
Herald added a subscriber: mgorny.

My original implementation of this last year was to just export everything from 
liblldb.so.  As lldb-mi recently started including a separate copy of llvm, 
exporting everything from liblldb.so has the side effect of allowing the Linux 
dynamic linker to resolve liblldb.so and lldb-mi's two copies of llvm to the 
same underlying storage.  This means any global constructors in LLVM (e.g. the 
'debug' command line option that triggered this change when NDEBUG is not 
defined) have side-effects applied twice to the same underlying data.

This change adjusts the -DLLDB_EXPORT_ALL_SYMBOLS flag's implementation, 
limiting exports to the normal exports plus the lldb_private namespace symbols. 
 This filters out exporting any of the LLVM symbols for the copy inside 
liblldb.so, maintaining the firewall between the separate copies of llvm. 
preventing two sets of global constructors from both occurring on the same 
underlying data.


https://reviews.llvm.org/D26093

Files:
  API/CMakeLists.txt
  API/liblldb-private.exports


Index: API/liblldb-private.exports
===
--- /dev/null
+++ API/liblldb-private.exports
@@ -0,0 +1,6 @@
+_ZN4lldb*
+_ZNK4lldb*
+_ZN12lldb_private*
+_ZNK12lldb_private*
+init_lld*
+PyInit__lldb*
Index: API/CMakeLists.txt
===
--- API/CMakeLists.txt
+++ API/CMakeLists.txt
@@ -103,16 +103,13 @@
 # If we're not exporting all symbols, we'll want to explicitly set
 # the exported symbols here.  This prevents 'log enable --stack ...'
 # from working on some systems but limits the liblldb size.
-MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols")
+MESSAGE("-- Symbols (liblldb): only exporting symbols in lldb namespace")
 add_llvm_symbol_exports(liblldb 
${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
   else()
 # Don't use an explicit export.  Instead, tell the linker to
 # export all symbols.
-MESSAGE("-- Symbols (liblldb): exporting all symbols")
-# Darwin linker doesn't need this extra step.
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  lldb_append_link_flags(liblldb "-Wl,--export-dynamic")
-endif()
+MESSAGE("-- Symbols (liblldb): exporting symbols from lldb and 
lldb_private namespace")
+add_llvm_symbol_exports(liblldb 
${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
   endif()
 endif()
 


Index: API/liblldb-private.exports
===
--- /dev/null
+++ API/liblldb-private.exports
@@ -0,0 +1,6 @@
+_ZN4lldb*
+_ZNK4lldb*
+_ZN12lldb_private*
+_ZNK12lldb_private*
+init_lld*
+PyInit__lldb*
Index: API/CMakeLists.txt
===
--- API/CMakeLists.txt
+++ API/CMakeLists.txt
@@ -103,16 +103,13 @@
 # If we're not exporting all symbols, we'll want to explicitly set
 # the exported symbols here.  This prevents 'log enable --stack ...'
 # from working on some systems but limits the liblldb size.
-MESSAGE("-- Symbols (liblldb): only exporting liblldb.exports symbols")
+MESSAGE("-- Symbols (liblldb): only exporting symbols in lldb namespace")
 add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
   else()
 # Don't use an explicit export.  Instead, tell the linker to
 # export all symbols.
-MESSAGE("-- Symbols (liblldb): exporting all symbols")
-# Darwin linker doesn't need this extra step.
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  lldb_append_link_flags(liblldb "-Wl,--export-dynamic")
-endif()
+MESSAGE("-- Symbols (liblldb): exporting symbols from lldb and lldb_private namespace")
+add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
   endif()
 endif()
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25922: Test infra: expose CFLAGS_NO_ARCH for use by test custom build rules

2016-10-25 Thread Todd Fiala via lldb-commits
tfiala added a comment.

> I am not that excited by this, but I don't see a much better way to achieve 
> the result. :)
>  Possibly I'd consider making the variable name positive (instead of 
> CFLAGS_NO_DEBUG, have a INCLUDES var, and then the test can use $(INCLUDES) 
> $(TRIPLE_CFLAGS)).

Jim and I tried a few different ways to skin this.  The actual problem shows up 
on some CI downstream from here, where we need (but fail to get) the isysroot 
settings.  Those are built with a few more variables that have not yet moved up 
into the Makefile rules in LLVM.org.

The other way to skin this, since it is a macOS only test, is to strip out the 
arch flags in the TestUniversal Makefile.  This approach would work both here 
and downstream since it doesn't require accessing Makefile variables that don't 
exist here.

I'll come back with something slightly different here.




Comment at: Python/lldbsuite/test/make/Makefile.rules:197
-ifeq "$(OS)" "Darwin"
-   CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) 
-I$(LLDB_BASE_DIR)include
-else

labath wrote:
> Are you sure this won't actually be missed on darwin for other tests? 
> `-archi386` does not seem to be a valid argument to clang (you need the space 
> here).
Hmm I ran it through x86_64 and that worked.  I didn't try i386.  I'll give 
that a shot.  If it blows up, I'll have a look at why a space is needed in one 
case and not the other on the macOS clang.  Thanks for highlighting.  (It 
looked like a meaningless divergence that I thought perhaps came from code 
motion over time).


https://reviews.llvm.org/D25922



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


[Lldb-commits] [lldb] r285032 - remove xfail from TestObjCNewSyntax.py test_expr_gmodules()

2016-10-24 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Oct 24 16:46:46 2016
New Revision: 285032

URL: http://llvm.org/viewvc/llvm-project?rev=285032=rev
Log:
remove xfail from TestObjCNewSyntax.py test_expr_gmodules()

Fixes:
rdar://27792848

Modified:

lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py?rev=285032=285031=285032=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
 Mon Oct 24 16:46:46 2016
@@ -33,10 +33,6 @@ class ObjCNewSyntaxTestCase(TestBase):
 compiler_version=[
 '<',
 '7.0.0'])
-@expectedFailureAll(
-oslist=['macosx'],
-debug_info=['gmodules'],
-bugnumber='rdar://27792848')
 @skipIf(macos_version=["<", "10.12"])
 @expectedFailureAll(archs=["i[3-6]86"])
 def test_expr(self):


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


[Lldb-commits] [PATCH] D25922: Test infra: expose CFLAGS_NO_ARCH for use by test custom build rules

2016-10-24 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added reviewers: jingham, labath.
tfiala added a subscriber: lldb-commits.

The TestUniversal.py test was attempting to build its own CFLAGS unreliably.  
Essentially it just wanted the prevailing CFLAGS without the arch spec.

This change does the following:

- introduces a new makefile variable CFLAGS_NO_ARCH, which custom build rules 
can use to grab the prevailing CFLAGS for the build without the arch-specific 
flags, and
- uses this new flag in TestUniversal.py's Makefile, eliminating the divergence 
it had from the CFLAGS used for standard test inferiors.


https://reviews.llvm.org/D25922

Files:
  Python/lldbsuite/test/macosx/universal/Makefile
  Python/lldbsuite/test/make/Makefile.rules


Index: Python/lldbsuite/test/make/Makefile.rules
===
--- Python/lldbsuite/test/make/Makefile.rules
+++ Python/lldbsuite/test/make/Makefile.rules
@@ -193,13 +193,10 @@
 DEBUG_INFO_FLAG ?= -g
 
 CFLAGS ?= $(DEBUG_INFO_FLAG) -O0 -fno-builtin
-ifeq "$(OS)" "Darwin"
-   CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) 
-I$(LLDB_BASE_DIR)include
-else
-   CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) 
-I$(LLDB_BASE_DIR)include
-endif
+CFLAGS += $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include 
-include $(THIS_FILE_DIR)test_common.h $(TRIPLE_CFLAGS)
+CFLAGS_NO_ARCH := $(CFLAGS)
 
-CFLAGS += -include $(THIS_FILE_DIR)test_common.h $(TRIPLE_CFLAGS)
+CFLAGS += $(ARCHFLAG)$(ARCH)
 
 # Use this one if you want to build one part of the result without debug 
information:
 ifeq "$(OS)" "Darwin"
Index: Python/lldbsuite/test/macosx/universal/Makefile
===
--- Python/lldbsuite/test/macosx/universal/Makefile
+++ Python/lldbsuite/test/macosx/universal/Makefile
@@ -1,5 +1,14 @@
 CC ?= clang
 
+all: testit
+
+LEVEL = ../../make
+
+C_SOURCES := main.c
+
+include $(LEVEL)/Makefile.rules
+
+
 testit: testit.i386 testit.x86_64
lipo -create -o testit testit.i386 testit.x86_64
 
@@ -10,10 +19,10 @@
$(CC) -arch x86_64 -o testit.x86_64 testit.x86_64.o
 
 testit.i386.o: main.c
-   $(CC) -g -O0 -arch i386 -c -o testit.i386.o main.c
+   $(CC) $(CFLAGS_NO_ARCH) -arch i386 -c -o testit.i386.o main.c
 
 testit.x86_64.o: main.c
-   $(CC) -g -O0 -arch x86_64 -c -o testit.x86_64.o main.c
+   $(CC) $(CFLAGS_NO_ARCH) -arch x86_64 -c -o testit.x86_64.o main.c
 
-clean:
+clean::
rm -rf $(wildcard testit* *~)


Index: Python/lldbsuite/test/make/Makefile.rules
===
--- Python/lldbsuite/test/make/Makefile.rules
+++ Python/lldbsuite/test/make/Makefile.rules
@@ -193,13 +193,10 @@
 DEBUG_INFO_FLAG ?= -g
 
 CFLAGS ?= $(DEBUG_INFO_FLAG) -O0 -fno-builtin
-ifeq "$(OS)" "Darwin"
-	CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
-else
-	CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
-endif
+CFLAGS += $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include -include $(THIS_FILE_DIR)test_common.h $(TRIPLE_CFLAGS)
+CFLAGS_NO_ARCH := $(CFLAGS)
 
-CFLAGS += -include $(THIS_FILE_DIR)test_common.h $(TRIPLE_CFLAGS)
+CFLAGS += $(ARCHFLAG)$(ARCH)
 
 # Use this one if you want to build one part of the result without debug information:
 ifeq "$(OS)" "Darwin"
Index: Python/lldbsuite/test/macosx/universal/Makefile
===
--- Python/lldbsuite/test/macosx/universal/Makefile
+++ Python/lldbsuite/test/macosx/universal/Makefile
@@ -1,5 +1,14 @@
 CC ?= clang
 
+all: testit
+
+LEVEL = ../../make
+
+C_SOURCES := main.c
+
+include $(LEVEL)/Makefile.rules
+
+
 testit: testit.i386 testit.x86_64
 	lipo -create -o testit testit.i386 testit.x86_64
 
@@ -10,10 +19,10 @@
 	$(CC) -arch x86_64 -o testit.x86_64 testit.x86_64.o
 
 testit.i386.o: main.c
-	$(CC) -g -O0 -arch i386 -c -o testit.i386.o main.c
+	$(CC) $(CFLAGS_NO_ARCH) -arch i386 -c -o testit.i386.o main.c
 
 testit.x86_64.o: main.c
-	$(CC) -g -O0 -arch x86_64 -c -o testit.x86_64.o main.c
+	$(CC) $(CFLAGS_NO_ARCH) -arch x86_64 -c -o testit.x86_64.o main.c
 
-clean:
+clean::
 	rm -rf $(wildcard testit* *~)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25886: [Test Suite] Properly respect --framework option

2016-10-21 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

Looks good.

I do wonder if we should have a general helper for lines like this:

  sys.platform.rstrip('0123456789') in ('freebsd', 'linux', 'netbsd', 'darwin')

but that doesn't have to be looked at here.


https://reviews.llvm.org/D25886



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


[Lldb-commits] [PATCH] D25887: [Test Suite] Pull generateSource into lldbtest

2016-10-21 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.


https://reviews.llvm.org/D25887



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


[Lldb-commits] [PATCH] D25830: Search for llvm-config in LLDB_PATH_TO_LLVM_BUILD first

2016-10-21 Thread Todd Fiala via lldb-commits
tfiala commandeered this revision.
tfiala edited reviewers, added: vivkong; removed: tfiala.
tfiala added a comment.

@beanz and I discussed.  This isn't needed here at all.  The issue is entirely 
in the current manifestation of the GitHub side of swift-lldb.

Closing this out, we'll resolve in GitHub.


Repository:
  rL LLVM

https://reviews.llvm.org/D25830



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


[Lldb-commits] [PATCH] D25830: Search for llvm-config in LLDB_PATH_TO_LLVM_BUILD first

2016-10-20 Thread Todd Fiala via lldb-commits
tfiala added inline comments.



Comment at: cmake/modules/LLDBStandalone.cmake:20
+  find_program(LLVM_CONFIG "llvm-config"
+HINTS ${FIND_PATHS})
   if(LLVM_CONFIG)

One question here would be what happens if FIND_PATHS stays "".  Does 
find_program deal with an empty HINTS?  If not, the HINTS clause itself might 
need to be conditionalized.


Repository:
  rL LLVM

https://reviews.llvm.org/D25830



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


[Lldb-commits] [PATCH] D25830: Search for llvm-config in LLDB_PATH_TO_LLVM_BUILD first

2016-10-20 Thread Todd Fiala via lldb-commits
tfiala added a comment.

(It would be good to wait for feedback from the others, though).


Repository:
  rL LLVM

https://reviews.llvm.org/D25830



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


[Lldb-commits] [PATCH] D25830: Search for llvm-config in LLDB_PATH_TO_LLVM_BUILD first

2016-10-20 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D25830



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


Re: [Lldb-commits] [PATCH] D25750: When invoking Terminal, don't assume the default shell

2016-10-18 Thread Todd Fiala via lldb-commits
Actually that's a good point. We can default to bash but add a setting to 
override. The issue we have to solve is that the current approach fails with 
non-POSIX shells.

-Todd

> On Oct 18, 2016, at 4:09 PM, Joerg Sonnenberger  wrote:
> 
> joerg added a comment.
> 
> OK, this is OSX specific, but I still think that hardcoding bash is a bad 
> idea. Does it need anything not in `/bin/sh`?
> 
> 
> https://reviews.llvm.org/D25750
> 
> 
> 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25714: [Test Suite] Allow overriding codesign identity

2016-10-18 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.


https://reviews.llvm.org/D25714



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


[Lldb-commits] [PATCH] D25745: [CMake] Rename lldb-launcher to darwin-debug

2016-10-18 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a subscriber: labath.
tfiala added a comment.
This revision is now accepted and ready to land.

This seems fine, but @labath might want to weigh in if Android tools have a 
hard-baked assumption anywhere on lldb-launcher.


https://reviews.llvm.org/D25745



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


[Lldb-commits] [PATCH] D25750: When invoking Terminal, don't assume the default shell

2016-10-18 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

Yep, looks right.  We shouldn't be assuming the shell.


https://reviews.llvm.org/D25750



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


[Lldb-commits] [PATCH] D25753: Use clang --driver-mode instead of guessing c++ compiler path

2016-10-18 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.


https://reviews.llvm.org/D25753



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


[Lldb-commits] [lldb] r284484 - xfail TestMiSyntax.py's test_lldbmi_output_grammar on macOS

2016-10-18 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Oct 18 10:15:24 2016
New Revision: 284484

URL: http://llvm.org/viewvc/llvm-project?rev=284484=rev
Log:
xfail TestMiSyntax.py's test_lldbmi_output_grammar on macOS

Needs to be investigated.  This is failing locally and on the
Xcode CI.

rdar://28805064

Modified:

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py?rev=284484=284483=284484=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py 
Tue Oct 18 10:15:24 2016
@@ -88,6 +88,7 @@ class MiSyntaxTestCase(lldbmi_testcase.M
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@expectedFailureAll(oslist=["macosx"], bugnumber="rdar://28805064")
 def test_lldbmi_output_grammar(self):
 """Test that 'lldb-mi --interpreter' uses standard output syntax."""
 


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


[Lldb-commits] [PATCH] D23977: Support of lldb on Kfreebsd

2016-10-13 Thread Todd Fiala via lldb-commits
tfiala requested changes to this revision.
tfiala added a comment.
This revision now requires changes to proceed.

Okay.  I think we need a minor tweak, to drop the REQUIRED on the Backtrace 
usage.


https://reviews.llvm.org/D23977



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


[Lldb-commits] [PATCH] D25570: [CMake] Populate LLDB.framework's headers directory

2016-10-13 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.


https://reviews.llvm.org/D25570



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


[Lldb-commits] [PATCH] D25490: [CMake] Cleanup check-lldb targets

2016-10-13 Thread Todd Fiala via lldb-commits
tfiala added a comment.

(Retro) Ah nice, I like the generator expression you put in there.


Repository:
  rL LLVM

https://reviews.llvm.org/D25490



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


[Lldb-commits] [PATCH] D25489: Use LLDB_SRC for relative paths

2016-10-13 Thread Todd Fiala via lldb-commits
tfiala added a comment.

(Retro) LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D25489



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


[Lldb-commits] [PATCH] D25488: Fix test suite lookup path for LLDB.h

2016-10-13 Thread Todd Fiala via lldb-commits
tfiala added a comment.

(Retro) LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D25488



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


[Lldb-commits] [PATCH] D25487: Fix building tests without system headers on Darwin

2016-10-13 Thread Todd Fiala via lldb-commits
tfiala added a comment.

(Retro) yep, this looked fine.


Repository:
  rL LLVM

https://reviews.llvm.org/D25487



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


[Lldb-commits] [lldb] r283497 - disable TSAN tests on macOS i386

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 16:30:33 2016
New Revision: 283497

URL: http://llvm.org/viewvc/llvm-project?rev=283497=rev
Log:
disable TSAN tests on macOS i386

These are erroring out on macOS i386.

Tracked by:
rdar://28659145

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

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=283497=283496=283497=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Thu Oct  6 16:30:33 
2016
@@ -5,6 +5,7 @@ from __future__ import print_function
 from distutils.version import LooseVersion, StrictVersion
 from functools import wraps
 import os
+import platform
 import re
 import sys
 import tempfile
@@ -667,6 +668,9 @@ def skipUnlessThreadSanitizer(func):
 compiler = os.path.basename(compiler_path)
 if not compiler.startswith("clang"):
 return "Test requires clang as compiler"
+# rdar://28659145 - TSAN tests don't look like they're supported on 
i386
+if self.getArchitecture() == 'i386' and platform.system() == 'Darwin':
+return "TSAN tests not compatible with i386 targets"
 f = tempfile.NamedTemporaryFile()
 cmd = "echo 'int main() {}' | %s -x c -o %s -" % (compiler_path, 
f.name)
 if os.popen(cmd).close() is not None:


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


[Lldb-commits] [lldb] r283493 - xfail TestReportData.py on i386

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 16:16:37 2016
New Revision: 283493

URL: http://llvm.org/viewvc/llvm-project?rev=283493=rev
Log:
xfail TestReportData.py on i386

Tracked by:
rdar://28658860

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py?rev=283493=283492=283493=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
 Thu Oct  6 16:16:37 2016
@@ -24,6 +24,7 @@ class AsanTestReportDataCase(TestBase):
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
 @skipUnlessCompilerRt
+@expectedFailureAll(archs=['i386'], bugnumber="rdar://28658860")
 def test(self):
 self.build()
 self.asan_tests()


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


[Lldb-commits] [lldb] r283492 - xfail TestQueues on macOS

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 16:07:45 2016
New Revision: 283492

URL: http://llvm.org/viewvc/llvm-project?rev=283492=rev
Log:
xfail TestQueues on macOS

This test is failing on CI.  I cannot get it to fail on my
local setup.

Tracked by:
rdar://28658529

Modified:
lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py?rev=283492=283491=283492=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py Thu 
Oct  6 16:07:45 2016
@@ -18,6 +18,7 @@ class TestQueues(TestBase):
 
 @skipUnlessDarwin
 @add_test_categories(['pyapi'])
+@expectedFailureAll(bugnumber="rdar://28658529")
 def test_with_python_api(self):
 """Test queues inspection SB APIs."""
 self.build()


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


[Lldb-commits] [lldb] r283484 - xfail TestSBTypeTypeClass.py on macOS i386

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 14:23:29 2016
New Revision: 283484

URL: http://llvm.org/viewvc/llvm-project?rev=283484=rev
Log:
xfail TestSBTypeTypeClass.py on macOS i386

Tracked by:
rdar://28656677

Modified:

lldb/trunk/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py?rev=283484=283483=283484=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py
 Thu Oct  6 14:23:29 2016
@@ -3,4 +3,8 @@ from lldbsuite.test import lldbinline
 
 lldbinline.MakeInlineTest(
 __file__, globals(), [
-decorators.skipIfFreeBSD, decorators.skipIfLinux, 
decorators.skipIfWindows])
+decorators.skipIfFreeBSD, decorators.skipIfLinux,
+decorators.skipIfWindows,
+decorators.expectedFailureAll(
+oslist=['macosx'], archs=['i386'],
+bugnumber='rdar://28656677')])


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


[Lldb-commits] [lldb] r283483 - xfail TestDataFormatterNSIndexPath.py on macOS i386

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 14:18:48 2016
New Revision: 283483

URL: http://llvm.org/viewvc/llvm-project?rev=283483=rev
Log:
xfail TestDataFormatterNSIndexPath.py on macOS i386

Tracked by:
rdar://28656605

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py?rev=283483=283482=283483=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py
 Thu Oct  6 14:18:48 2016
@@ -45,6 +45,7 @@ class NSIndexPathDataFormatterTestCase(T
 commands()
 
 @skipUnlessDarwin
+@expectedFailureAll(archs=['i386'], bugnumber="rdar://28656605")
 def test_nsindexpath_with_run_command(self):
 """Test formatters for NSIndexPath."""
 self.appkit_tester_impl(self.nsindexpath_data_formatter_commands)


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


[Lldb-commits] [lldb] r283482 - xfail TestExec.py on macOS i386

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 14:12:05 2016
New Revision: 283482

URL: http://llvm.org/viewvc/llvm-project?rev=283482=rev
Log:
xfail TestExec.py on macOS i386

Tracked by:
rdar://28656532

Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py?rev=283482=283481=283482=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py 
Thu Oct  6 14:12:05 2016
@@ -27,6 +27,7 @@ class ExecTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
+@expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532")
 def test(self):
 if self.getArchitecture() == 'x86_64':
 source = os.path.join(os.getcwd(), "main.cpp")


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


[Lldb-commits] [lldb] r283481 - xfail TestDiagnoseDereferenceFunctionReturn.py on macOS i386

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 14:04:58 2016
New Revision: 283481

URL: http://llvm.org/viewvc/llvm-project?rev=283481=rev
Log:
xfail TestDiagnoseDereferenceFunctionReturn.py on macOS i386

Tracked by:
rdar://28656408

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py?rev=283481=283480=283481=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
 Thu Oct  6 14:04:58 2016
@@ -15,6 +15,7 @@ class TestDiagnoseDereferenceFunctionRet
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
+@expectedFailureAll(oslist=['macosx'], archs=['i386'], 
bugnumber="rdar://28656408")
 def test_diagnose_dereference_function_return(self):
 TestBase.setUp(self)
 self.build()


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


[Lldb-commits] [lldb] r283477 - xfail TestDarwinLogBasic.py for i386 macOS

2016-10-06 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct  6 13:25:54 2016
New Revision: 283477

URL: http://llvm.org/viewvc/llvm-project?rev=283477=rev
Log:
xfail TestDarwinLogBasic.py for i386 macOS

Tracked by:
rdar://28655626

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py?rev=283477=283476=283477=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py
 Thu Oct  6 13:25:54 2016
@@ -21,6 +21,7 @@ class TestDarwinLogBasic(darwin_log.Darw
 
 @decorators.add_test_categories(['pyapi'])
 @decorators.skipUnlessDarwin
+@decorators.expectedFailureAll(archs=["i386"], bugnumber="rdar://28655626")
 def test_SBStructuredData_gets_broadcasted(self):
 """Exercise SBStructuredData API."""
 


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


[Lldb-commits] [PATCH] D24988: Improvements to testing blacklist

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I also just added a test case to validate we get a non-None answer to test 
instance self.id() calls.  We use it in several places, so might as well make 
that explicit.

That went in as r283156.


https://reviews.llvm.org/D24988



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


[Lldb-commits] [lldb] r283156 - add a simple test case to validate test id()

2016-10-03 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Oct  3 17:49:13 2016
New Revision: 283156

URL: http://llvm.org/viewvc/llvm-project?rev=283156=rev
Log:
add a simple test case to validate test id()

Since we count on it in a few places, the test verifies that the
test instance has an id() method that returns something non-None.

Added:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/testid/

lldb/trunk/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py?rev=283156=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py 
(added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py 
Mon Oct  3 17:49:13 2016
@@ -0,0 +1,17 @@
+"""
+Add a test to verify our test instance returns something non-None for
+an id(). Other parts of the test running infrastructure are counting on this.
+"""
+
+from __future__ import print_function
+from lldbsuite.test.lldbtest import TestBase
+
+class TestIdTestCase(TestBase):
+
+NO_DEBUG_INFO_TESTCASE = True
+
+mydir = TestBase.compute_mydir(__file__)
+
+def test_id_exists(self):
+self.assertIsNotNone(self.id(), "Test instance should have an id()")
+


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


[Lldb-commits] [PATCH] D24988: Improvements to testing blacklist

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

Much better.  I see you found test.id(), which gets as the 
module.class.test_method setup.  That will be unique.

Thanks!  LGTM.


https://reviews.llvm.org/D24988



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


[Lldb-commits] [PATCH] D24988: Improvements to testing blacklist

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In https://reviews.llvm.org/D24988#559314, @fjricci wrote:

> For an example of something that couldn't be disabled with the original 
> implementation, consider a test like:
>
> `CreateDuringStepTestCase.test_step_inst`
>
> Disabling by method name (`test_step_inst`) would also disable 
> `CreateDuringInstructionStepTestCase.test_step_inst`.


I see what you're saying there.

The part you're missing is that the Test Case class name itself does not have 
to be unique, either.  i.e. You *can* have two CreateDuringStepTestCase classes 
in different files.  Nothing uniquifies at that level.

You can convince yourself of this by doing what I just did:

$ cd packages/Python/lldbsuite/test
$ cp -r driver/batch_mode deleteme

now you have tests/deleteme with contents of batch_mode
===

$ cd deleteme
$ cp TestBatchMode.py TestBatchMode2.py

Now you have two files with the same exact contents, both of which will run 
just fine.  i.e. you're still not unique with test case names - they can be the 
same.
=

edit Makefile to fix the redirection back to the master makefile rules
==

run the test suite and tell it to run deleteme dir
==

test/dotest.py --test-subdir deleteme

You'll get results like this:

  $ test/dotest.py --executable `pwd`/build/Debug/lldb --test-subdir deleteme
  Testing: 2 test suites, 8 threads
  2 out of 2 test suites processed - TestBatchMode2.py
  ===
  Test Result Summary
  ===
  Test Methods: 18
  Reruns:0
  Success:  18
  Expected Failure:  0
  Failure:   0
  Error: 0
  Exceptional Exit:  0
  Unexpected Success:0
  Skip:  0
  Timeout:   0
  Expected Timeout:  0

That is why I'm saying you need to include the module name, which comes from 
the filename, or have it be something like FileBaseName:TestCase.test_method.  
I have to do this in the test runner architecture for this very reason.  And 
you will find at least some test cases that are cut and pasted and therefore 
have duplicate test case names (at least, they used to exist, and nothing 
enforces them being different in the runner logic).


https://reviews.llvm.org/D24988



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


[Lldb-commits] [PATCH] D25099: Refactor Args a different way

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

That works fine.

LGTM.


https://reviews.llvm.org/D25099



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


[Lldb-commits] [PATCH] D25099: Refactor Args a different way

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In https://reviews.llvm.org/D25099#559701, @zturner wrote:

> I know what this is.  It should be fixed in this patch, I guess I didn't have 
> the newest patch uploaded.


Okay, I'll give that a shot now.


https://reviews.llvm.org/D25099



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


[Lldb-commits] [PATCH] D25099: Refactor Args a different way

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I will test this on macOS.  I will have the results this afternoon.


https://reviews.llvm.org/D25099



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


Re: [Lldb-commits] [PATCH] D25099: Refactor Args a different way

2016-10-03 Thread Todd Fiala via lldb-commits
Yep I plan on doing that.

-Todd

> On Oct 3, 2016, at 10:29 AM, Zachary Turner  wrote:
> 
> He lgtm'ed my last patch, so I guess he's ok with the general concept.  
> Perhaps if someone could just run the test suite for me that would be good 
> enough.
> 
>> On Mon, Oct 3, 2016 at 10:25 AM Todd Fiala  wrote:
>> tfiala added a comment.
>> 
>> @zturner , Greg is out this week (and was last Friday as well).
>> 
>> I'll get somebody over here to review.
>> 
>> 
>> https://reviews.llvm.org/D25099
>> 
>> 
>> 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25099: Refactor Args a different way

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

@zturner , Greg is out this week (and was last Friday as well).

I'll get somebody over here to review.


https://reviews.llvm.org/D25099



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


[Lldb-commits] [PATCH] D24988: Improvements to testing blacklist

2016-10-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Hey @fjricci ,

What is the motivation for this change?  It looks like the existing code works 
based on file names, which are required to be unique in the system.  It looks 
like you're attempting to move it over to a classname.method scheme.  Is that 
right?  If so, classname.method is not guaranteed to be unique, either.  It 
would have to include the module name, which is essentially the file name, 
which is required to be unique.  (Maybe when you said ., 
your  element is fully qualified, including the module name?  If so, 
then that should be guaranteed to be unique).

All the same, I'd like to better understand what you're looking to accomplish, 
since what I'm reading in the description seems to be doing the opposite of 
what I think you're trying to do.  (I'm probably just misunderstanding).

Thanks!


https://reviews.llvm.org/D24988



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


[Lldb-commits] [lldb] r282990 - test infra: clear file-charged issues on rerun of file

2016-09-30 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Fri Sep 30 19:17:08 2016
New Revision: 282990

URL: http://llvm.org/viewvc/llvm-project?rev=282990=rev
Log:
test infra: clear file-charged issues on rerun of file

This change addresses the corner case bug in the test
infrastructure where a test file times out *outside*
of any running test method.  In those cases, the issue
was charged to the file, not to a test method within
the file.  When that file is re-run successfully,
none of the test-method-level successes would clear
the file-level issue.

This change fixes that: for all test files that are
getting rerun (whether by being marked flaky or
via the --rerun-all-issues flag), file-level test
issues are searched for in each of those files.  Each
file-level issue found in the rerun file list then
gets cleared.

A test of this feature is added to issue_verification,
using the technique there of moving the *.py.park file
to *.py to do an end-to-end validation.

This change also adds a .gitignore entry for pyenv
project-level files and fixes up a few minor pep8
formatting violations in files I touched.

Fixes:
llvm.org/pr27423

Added:

lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park
Modified:
lldb/trunk/.gitignore
lldb/trunk/packages/Python/lldbsuite/test/dosep.py

lldb/trunk/packages/Python/lldbsuite/test_event/formatter/results_formatter.py

Modified: lldb/trunk/.gitignore
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/.gitignore?rev=282990=282989=282990=diff
==
--- lldb/trunk/.gitignore (original)
+++ lldb/trunk/.gitignore Fri Sep 30 19:17:08 2016
@@ -16,6 +16,8 @@
 # Byte compiled python modules.
 *.pyc
 *.pyproj
+# pyenv settings
+.python-version
 *.sln
 *.suo
 # vim swap files

Modified: lldb/trunk/packages/Python/lldbsuite/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dosep.py?rev=282990=282989=282990=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dosep.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dosep.py Fri Sep 30 19:17:08 2016
@@ -1151,8 +1151,11 @@ def inprocess_exec_test_runner(test_work
runner_context)
 
 # We're always worker index 0
+def get_single_worker_index():
+return 0
+
 global GET_WORKER_INDEX
-GET_WORKER_INDEX = lambda: 0
+GET_WORKER_INDEX = get_single_worker_index
 
 # Run the listener and related channel maps in a separate thread.
 # global RUNNER_PROCESS_ASYNC_MAP
@@ -1443,7 +1446,8 @@ def adjust_inferior_options(dotest_argv)
 # every dotest invocation from creating its own directory
 import datetime
 # The windows platforms don't like ':' in the pathname.
-timestamp_started = 
datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
+timestamp_started = (datetime.datetime.now()
+ .strftime("%Y-%m-%d-%H_%M_%S"))
 dotest_argv.append('-s')
 dotest_argv.append(timestamp_started)
 dotest_options.s = timestamp_started
@@ -1627,7 +1631,8 @@ def main(num_threads, test_subdir, test_
 test_subdir = os.path.join(test_directory, test_subdir)
 if not os.path.isdir(test_subdir):
 print(
-'specified test subdirectory {} is not a valid 
directory\n'.format(test_subdir))
+'specified test subdirectory {} is not a valid directory\n'
+.format(test_subdir))
 else:
 test_subdir = test_directory
 
@@ -1696,6 +1701,12 @@ def main(num_threads, test_subdir, test_
 print("\n{} test files marked for rerun\n".format(
 rerun_file_count))
 
+# Clear errors charged to any of the files of the tests that
+# we are rerunning.
+# https://llvm.org/bugs/show_bug.cgi?id=27423
+results_formatter.clear_file_level_issues(tests_for_rerun,
+  sys.stdout)
+
 # Check if the number of files exceeds the max cutoff.  If so,
 # we skip the rerun step.
 if rerun_file_count > configuration.rerun_max_file_threshold:

Added: 
lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park?rev=282990=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park
 Fri Sep 30 19:17:08 2016
@@ -0,0 +1,33 @@
+"""Tests that a timeout is detected by the testbot."""
+from 

[Lldb-commits] [lldb] r282628 - use assertEquals in TestSBTypeClassMembers

2016-09-28 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Wed Sep 28 15:39:50 2016
New Revision: 282628

URL: http://llvm.org/viewvc/llvm-project?rev=282628=rev
Log:
use assertEquals in TestSBTypeClassMembers

This change replaces the self.assertTrue() calls with
self.assertEquals() so that test failures get more context on failure
values.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py?rev=282628=282627=282628=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
 Wed Sep 28 15:39:50 2016
@@ -62,39 +62,46 @@ class SBTypeMemberFunctionsTest(TestBase
 Derived = variable.GetType()
 Base = Derived.GetDirectBaseClassAtIndex(0).GetType()
 
-self.assertTrue(
-Derived.GetNumberOfMemberFunctions() == 2,
+self.assertEquals(2,
+Derived.GetNumberOfMemberFunctions(),
 "Derived declares two methods")
-self.assertTrue(Derived.GetMemberFunctionAtIndex(0).GetType(
-).GetFunctionReturnType().GetName() == "int", "Derived::dImpl returns 
int")
+self.assertEquals("int", Derived.GetMemberFunctionAtIndex(0).GetType(
+).GetFunctionReturnType().GetName(),
+"Derived::dImpl returns int")
 
-self.assertTrue(
-Base.GetNumberOfMemberFunctions() == 4,
+self.assertEquals(4,
+Base.GetNumberOfMemberFunctions(),
 "Base declares three methods")
-self.assertTrue(Base.GetMemberFunctionAtIndex(3).GetType(
-).GetFunctionArgumentTypes().GetSize() == 3, "Base::sfunc takes three 
arguments")
-self.assertTrue(Base.GetMemberFunctionAtIndex(
-3).GetName() == "sfunc", "Base::sfunc not found")
-self.assertTrue(Base.GetMemberFunctionAtIndex(3).GetKind(
-) == lldb.eMemberFunctionKindStaticMethod, "Base::sfunc is a static")
-self.assertTrue(Base.GetMemberFunctionAtIndex(2).GetType(
-).GetFunctionArgumentTypes().GetSize() == 0, "Base::dat takes no 
arguments")
-
self.assertTrue(Base.GetMemberFunctionAtIndex(1).GetType().GetFunctionArgumentTypes(
-).GetTypeAtIndex(1).GetName() == "char", "Base::bar takes a second 
'char' argument")
-self.assertTrue(Base.GetMemberFunctionAtIndex(
-1).GetName() == "bar", "Base::bar not found")
+self.assertEquals(3, Base.GetMemberFunctionAtIndex(3).GetType(
+).GetFunctionArgumentTypes().GetSize(),
+"Base::sfunc takes three arguments")
+self.assertEquals("sfunc", Base.GetMemberFunctionAtIndex(
+3).GetName(), "Base::sfunc not found")
+self.assertEquals(lldb.eMemberFunctionKindStaticMethod,
+Base.GetMemberFunctionAtIndex(3).GetKind(),
+"Base::sfunc is a static")
+self.assertEquals(0, Base.GetMemberFunctionAtIndex(2).GetType(
+).GetFunctionArgumentTypes().GetSize(),
+"Base::dat takes no arguments")
+self.assertEquals("char",
+
Base.GetMemberFunctionAtIndex(1).GetType().GetFunctionArgumentTypes(
+).GetTypeAtIndex(1).GetName(),
+"Base::bar takes a second 'char' argument")
+self.assertEquals("bar",
+Base.GetMemberFunctionAtIndex(1).GetName(), "Base::bar not found")
 
 variable = frame0.FindVariable("thingy")
 Thingy = variable.GetType()
 
-self.assertTrue(
-Thingy.GetNumberOfMemberFunctions() == 2,
+self.assertEquals(
+2, Thingy.GetNumberOfMemberFunctions(),
 "Thingy declares two methods")
 
-self.assertTrue(Thingy.GetMemberFunctionAtIndex(
-0).GetReturnType().GetName() == "id", "Thingy::init returns an id")
-self.assertTrue(
-Thingy.GetMemberFunctionAtIndex(1).GetNumberOfArguments() == 2,
+self.assertEquals("id", Thingy.GetMemberFunctionAtIndex(
+0).GetReturnType().GetName(), "Thingy::init returns an id")
+self.assertEquals(2,
+Thingy.GetMemberFunctionAtIndex(1).GetNumberOfArguments(),
 "Thingy::foo takes two arguments")
-
self.assertTrue(Thingy.GetMemberFunctionAtIndex(1).GetArgumentTypeAtIndex(
-0).GetName() == "int", "Thingy::foo takes an int")
+self.assertEquals("int",
+Thingy.GetMemberFunctionAtIndex(1).GetArgumentTypeAtIndex(
+0).GetName(), "Thingy::foo takes an int")


___
lldb-commits mailing list
lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] r282605 - zorg Xcode python test suite target arch update

2016-09-28 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Wed Sep 28 11:43:47 2016
New Revision: 282605

URL: http://llvm.org/viewvc/llvm-project?rev=282605=rev
Log:
zorg Xcode python test suite target arch update

This changes the Xcode target used by the Green Dragon Xcode CI.
When calling xcodebuild with LLDB_PYTHON_TESTSUITE_ARCH set, the
arch's xUnit XML output is now set to an arch-specific filename:

$(BUILD_DIR)/test-results-$(LLDB_PYTHON_TESTSUITE_ARCH).xml.

The change also ensures that the Python testsuite sees the Xcode
build settings passed in through environment variables.

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=282605=282604=282605=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Sep 28 11:43:47 2016
@@ -6421,7 +6421,7 @@
 /* Begin PBXLegacyTarget section */
2387551E1C24974600CCE8C3 /* lldb-python-test-suite */ = {
isa = PBXLegacyTarget;
-   buildArgumentsString = "-u $(SRCROOT)/test/dotest.py 
--apple-sdk $(PLATFORM_NAME) 
--executable=$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lldb -C 
$(LLDB_PYTHON_TESTSUITE_CC) --arch $(LLDB_PYTHON_TESTSUITE_ARCH) 
--session-file-format fm --results-formatter 
lldbsuite.test_event.formatter.xunit.XunitFormatter --results-file 
$(BUILD_DIR)/test-results.xml --rerun-all-issues --env TERM=vt100 
-O--xpass=ignore";
+   buildArgumentsString = "-u $(SRCROOT)/test/dotest.py 
--apple-sdk $(PLATFORM_NAME) 
--executable=$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lldb -C 
$(LLDB_PYTHON_TESTSUITE_CC) --arch $(LLDB_PYTHON_TESTSUITE_ARCH) 
--session-file-format fm --results-formatter 
lldbsuite.test_event.formatter.xunit.XunitFormatter --results-file 
$(BUILD_DIR)/test-results-$(LLDB_PYTHON_TESTSUITE_ARCH).xml --rerun-all-issues 
--env TERM=vt100 -O--xpass=ignore";
buildConfigurationList = 238755241C24974600CCE8C3 /* 
Build configuration list for PBXLegacyTarget "lldb-python-test-suite" */;
buildPhases = (
);
@@ -6430,7 +6430,7 @@
dependencies = (
);
name = "lldb-python-test-suite";
-   passBuildSettingsInEnvironment = 0;
+   passBuildSettingsInEnvironment = 1;
productName = "LLDB Python Test Suite";
};
2687EAC51508110B00DD8C2E /* install-headers */ = {


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


[Lldb-commits] [lldb] r282508 - convert TestFatArchives.py over to no-debug-info test

2016-09-27 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Sep 27 12:17:21 2016
New Revision: 282508

URL: http://llvm.org/viewvc/llvm-project?rev=282508=rev
Log:
convert TestFatArchives.py over to no-debug-info test

We only use the .o-style debug info here regardless, so having
it run all three debuginfo styles was a waste.

This also strips out the custom build function and uses the
TestBase.build() method.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py?rev=282508=282507=282508=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
 Tue Sep 27 12:17:21 2016
@@ -13,23 +13,16 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
 
-def execute_command(command):
-# print('%% %s' % (command))
-(exit_status, output) = seven.get_command_status_output(command)
-# if output:
-# print(output)
-# print('status = %u' % (exit_status))
-return exit_status
-
-
 class FatArchiveTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
+NO_DEBUG_INFO_TESTCASE = True
+
 @skipUnlessDarwin
-def test(self):
+def test_breakpoint_resolution_dwarf(self):
 if self.getArchitecture() == 'x86_64':
-execute_command("make CC='%s'" % (os.environ["CC"]))
+self.build()
 self.main()
 else:
 self.skipTest(


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


[Lldb-commits] [lldb] r282496 - xfail TestExec.py on macOS

2016-09-27 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Sep 27 10:57:12 2016
New Revision: 282496

URL: http://llvm.org/viewvc/llvm-project?rev=282496=rev
Log:
xfail TestExec.py on macOS

Tracked by:
rdar://28476369

Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py?rev=282496=282495=282496=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py 
Tue Sep 27 10:57:12 2016
@@ -27,6 +27,7 @@ class ExecTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
+@expectedFailureAll(oslist=["macosx"], bugnumber="rdar://28476369")
 def test(self):
 if self.getArchitecture() == 'x86_64':
 source = os.path.join(os.getcwd(), "main.cpp")


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


Re: [Lldb-commits] [PATCH] D24890: implement timeout sample support for Linux

2016-09-26 Thread Todd Fiala via lldb-commits
tfiala added a comment.

BTW, regarding this part:

> On Ubuntu 16.04, the requisite support can be retrieved with:

> 

> sudo apt-get install perf-tools-unstable


This was incorrect.  The perf tool was actually present even without the 
perf-tools-unstable on Ubuntu 16.04 x86_64.  It is just that there are more 
tools for processing perf output available with that package, but this change 
doesn't require any of them.  /usr/bin/perf comes from the linux-tools-common 
package on Ubuntu.  I tried testing with and without that package installed.


Repository:
  rL LLVM

https://reviews.llvm.org/D24890



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


Re: [Lldb-commits] [PATCH] D24890: implement timeout sample support for Linux

2016-09-26 Thread Todd Fiala via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282436: added Linux support for test timeout sampling 
(authored by tfiala).

Changed prior to commit:
  https://reviews.llvm.org/D24890?vs=72382=72553#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24890

Files:
  lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py
  lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
  lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
  lldb/trunk/packages/Python/lldbsuite/test/dosep.py
  lldb/trunk/packages/Python/lldbsuite/test/test_runner/process_control.py

Index: lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py
===
--- lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py
+++ lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py
@@ -0,0 +1,76 @@
+"""Provides a pre-kill method to run on Linux.
+
+This timeout pre-kill method relies on the Linux perf-tools
+distribution.  The appropriate way to obtain this set of tools
+will depend on the Linux distribution.
+
+For Ubuntu 16.04, the invoke the following command:
+sudo apt-get install perf-tools-unstable
+"""
+from __future__ import print_function
+
+# system imports
+import os
+import subprocess
+import sys
+import tempfile
+
+
+def do_pre_kill(process_id, runner_context, output_stream, sample_time=3):
+"""Samples the given process id, and puts the output to output_stream.
+
+@param process_id the local process to sample.
+
+@param runner_context a dictionary of details about the architectures
+and platform on which the given process is running.  Expected keys are
+archs (array of architectures), platform_name, platform_url, and
+platform_working_dir.
+
+@param output_stream file-like object that should be used to write the
+results of sampling.
+
+@param sample_time specifies the time in seconds that should be captured.
+"""
+
+# Validate args.
+if runner_context is None:
+raise Exception("runner_context argument is required")
+if not isinstance(runner_context, dict):
+raise Exception("runner_context argument must be a dictionary")
+
+# We will try to run sample on the local host only if there is no URL
+# to a remote.
+if "platform_url" in runner_context and (
+runner_context["platform_url"] is not None):
+import pprint
+sys.stderr.write(
+"warning: skipping timeout pre-kill sample invocation because we "
+"don't know how to run on a remote yet. runner_context={}\n"
+.format(pprint.pformat(runner_context)))
+
+# We're going to create a temp file, and immediately overwrite it with the
+# following command.  This just ensures we don't have any races in
+# creation of the temporary sample file.
+fileno, filename = tempfile.mkstemp(suffix='perfdata')
+os.close(fileno)
+fileno = None
+
+try:
+with open(os.devnull, 'w') as devnull:
+returncode = subprocess.call(['timeout', str(sample_time), 'perf',
+  'record', '-g', '-o', filename, '-p', str(process_id)],
+ stdout=devnull, stderr=devnull)
+if returncode == 0 or returncode == 124:
+# This is okay - this is the timeout return code, which is totally
+# expected.
+pass
+else:
+raise Exception("failed to call 'perf record .., error: {}".format(
+returncode))
+
+with open(os.devnull, 'w') as devnull:
+output = subprocess.check_output(['perf', 'report', '--call-graph',
+  '--stdio', '-i', filename], stderr=devnull)
+output_stream.write(output)
+finally:
+os.remove(filename)
Index: lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
===
--- lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
+++ lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
@@ -38,7 +38,7 @@
 print("parent: sending shut-down request to child")
 if self.process:
 self.child_work_queue.put("hello, child")
-self.process.join()
+self.process.join()
 if self.verbose:
 print("parent: child is fully shut down")
 
Index: lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
===
--- lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
+++ lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
@@ -0,0 +1,133 @@
+"""Test the pre-kill hook on Linux."""
+from __future__ import print_function
+
+# system imports
+from multiprocessing import Process, Queue

[Lldb-commits] [lldb] r282436 - added Linux support for test timeout sampling

2016-09-26 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 26 15:25:47 2016
New Revision: 282436

URL: http://llvm.org/viewvc/llvm-project?rev=282436=rev
Log:
added Linux support for test timeout sampling

This is the Linux counterpart to the sampling support I added
on the macOS side.

This change also introduces zip-file compression if the size of
the sample output is greater than 10 KB.  The Linux side can be
quite large and the textual content is averaging over a 10x
compression factor on tests that I force to time out.  When
compression takes place, the filename becomes:

{session_dir}/{TestFilename.py}-{pid}.sample.zip

This support relies on the linux 'perf' tool.  If it isn't
present, the behavior is to ignore pre-kill processing of
the timed out test process.

Note calling the perf tool under the timeout command appears
to nuke the profiled process.  This was causing the timeout
kill logic to fail due to the process having disappeared.
I modified the kill logic to catch the case of the process
not existing, and I have it ignore the kill request in that
case.  Any other exception is still raised.

Reviewers: labath

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D24890

Added:
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
  - copied, changed from r282432, 
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
Modified:
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
lldb/trunk/packages/Python/lldbsuite/test/dosep.py
lldb/trunk/packages/Python/lldbsuite/test/test_runner/process_control.py

Added: lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py?rev=282436=auto
==
--- lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py (added)
+++ lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/linux.py Mon Sep 26 
15:25:47 2016
@@ -0,0 +1,76 @@
+"""Provides a pre-kill method to run on Linux.
+
+This timeout pre-kill method relies on the Linux perf-tools
+distribution.  The appropriate way to obtain this set of tools
+will depend on the Linux distribution.
+
+For Ubuntu 16.04, the invoke the following command:
+sudo apt-get install perf-tools-unstable
+"""
+from __future__ import print_function
+
+# system imports
+import os
+import subprocess
+import sys
+import tempfile
+
+
+def do_pre_kill(process_id, runner_context, output_stream, sample_time=3):
+"""Samples the given process id, and puts the output to output_stream.
+
+@param process_id the local process to sample.
+
+@param runner_context a dictionary of details about the architectures
+and platform on which the given process is running.  Expected keys are
+archs (array of architectures), platform_name, platform_url, and
+platform_working_dir.
+
+@param output_stream file-like object that should be used to write the
+results of sampling.
+
+@param sample_time specifies the time in seconds that should be captured.
+"""
+
+# Validate args.
+if runner_context is None:
+raise Exception("runner_context argument is required")
+if not isinstance(runner_context, dict):
+raise Exception("runner_context argument must be a dictionary")
+
+# We will try to run sample on the local host only if there is no URL
+# to a remote.
+if "platform_url" in runner_context and (
+runner_context["platform_url"] is not None):
+import pprint
+sys.stderr.write(
+"warning: skipping timeout pre-kill sample invocation because we "
+"don't know how to run on a remote yet. runner_context={}\n"
+.format(pprint.pformat(runner_context)))
+
+# We're going to create a temp file, and immediately overwrite it with the
+# following command.  This just ensures we don't have any races in
+# creation of the temporary sample file.
+fileno, filename = tempfile.mkstemp(suffix='perfdata')
+os.close(fileno)
+fileno = None
+
+try:
+with open(os.devnull, 'w') as devnull:
+returncode = subprocess.call(['timeout', str(sample_time), 'perf',
+  'record', '-g', '-o', filename, 
'-p', str(process_id)],
+ stdout=devnull, stderr=devnull)
+if returncode == 0 or returncode == 124:
+# This is okay - this is the timeout return code, which is totally
+# expected.
+pass
+else:
+raise Exception("failed to call 'perf record .., error: {}".format(
+returncode))
+
+with open(os.devnull, 'w') as devnull:
+output = subprocess.check_output(['perf', 'report', '--call-graph',
+  

Re: [Lldb-commits] [PATCH] D24890: implement timeout sample support for Linux

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala added inline comments.


Comment at: packages/Python/lldbsuite/pre_kill_hook/linux.py:68
@@ +67,3 @@
+else:
+raise Exception("failed to call 'perf record .., error: ")
+

Haha woops - that should be:
```
raise Exception("failed to call 'perf record ..., error code: 
{}".format(returncode))
```

I'll fix that in the final.


https://reviews.llvm.org/D24890



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


[Lldb-commits] [PATCH] D24890: implement timeout sample support for Linux

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added reviewers: labath, tberghammer.
tfiala added a subscriber: lldb-commits.

This is the Linux counterpart to the recently-added macOS-side support for 
sampling a test process that times out, prior to killing it.

This implementation is based on the Linux perf tools.  Each distribution will 
have a different way to install it.  The hook is skipped if Linux perf is not 
available.

On Ubuntu 16.04, the requisite support can be retrieved with:
```
sudo apt-get install perf-tools-unstable
```

Like the macOS side, the content out the time spent at each call point per 
backtrace is specified in a file in the session directory of the format:
{TestName.py}-{pid}.sample

https://reviews.llvm.org/D24890

Files:
  packages/Python/lldbsuite/pre_kill_hook/linux.py
  packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
  packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py

Index: packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
===
--- /dev/null
+++ packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
@@ -0,0 +1,133 @@
+"""Test the pre-kill hook on Linux."""
+from __future__ import print_function
+
+# system imports
+from multiprocessing import Process, Queue
+import platform
+import re
+import subprocess
+from unittest import main, TestCase
+
+# third party
+from six import StringIO
+
+
+def do_child_thread():
+import os
+x = 0
+while True:
+x = x + 42 * os.getpid()
+return x
+
+
+def do_child_process(child_work_queue, parent_work_queue, verbose):
+import os
+
+pid = os.getpid()
+if verbose:
+print("child: pid {} started, sending to parent".format(pid))
+parent_work_queue.put(pid)
+
+# Spin up a daemon thread to do some "work", which will show
+# up in a sample of this process.
+import threading
+worker = threading.Thread(target=do_child_thread)
+worker.daemon = True
+worker.start()
+
+if verbose:
+print("child: waiting for shut-down request from parent")
+child_work_queue.get()
+if verbose:
+print("child: received shut-down request.  Child exiting.")
+
+
+class LinuxPreKillTestCase(TestCase):
+
+def __init__(self, methodName):
+super(LinuxPreKillTestCase, self).__init__(methodName)
+self.process = None
+self.child_work_queue = None
+self.verbose = False
+# self.verbose = True
+
+def tearDown(self):
+if self.verbose:
+print("parent: sending shut-down request to child")
+if self.process:
+self.child_work_queue.put("hello, child")
+self.process.join()
+if self.verbose:
+print("parent: child is fully shut down")
+
+def test_sample(self):
+# Ensure we're Darwin.
+if platform.system() != 'Linux':
+self.skipTest("requires a Linux-based OS")
+
+# Ensure we have the 'perf' tool.  If not, skip the test.
+try:
+perf_version = subprocess.check_output(["perf", "version"])
+if perf_version is None or not (
+perf_version.startswith("perf version")):
+raise Exception("The perf executable doesn't appear"
+" to be the Linux perf tools perf")
+except Exception:
+self.skipTest("requires the Linux perf tools 'perf' command")
+
+# Start the child process.
+self.child_work_queue = Queue()
+parent_work_queue = Queue()
+self.process = Process(target=do_child_process,
+   args=(self.child_work_queue, parent_work_queue,
+ self.verbose))
+if self.verbose:
+print("parent: starting child")
+self.process.start()
+
+# Wait for the child to report its pid.  Then we know we're running.
+if self.verbose:
+print("parent: waiting for child to start")
+child_pid = parent_work_queue.get()
+
+# Sample the child process.
+from linux import do_pre_kill
+context_dict = {
+"archs": [platform.machine()],
+"platform_name": None,
+"platform_url": None,
+"platform_working_dir": None
+}
+
+if self.verbose:
+print("parent: running pre-kill action on child")
+output_io = StringIO()
+do_pre_kill(child_pid, context_dict, output_io)
+output = output_io.getvalue()
+
+if self.verbose:
+print("parent: do_pre_kill() wrote the following output:", output)
+self.assertIsNotNone(output)
+
+# We should have a samples count entry.
+# Samples:
+self.assertTrue("Samples:" in output, "should have found a 'Samples:' "
+"field in the sampled process output")
+
+# We should see an event count entry
+

Re: [Lldb-commits] [PATCH] D20835: Mark the current column when displaying the context of the current breakpoint on the terminal.

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala closed this revision.
tfiala added a comment.

Thanks, Jim!


https://reviews.llvm.org/D20835



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


Re: [Lldb-commits] [PATCH] D21032: Eliminate differences in lldbinline-generated Makefiles and ensure they're regenerated every time

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala closed this revision.
tfiala added a comment.

Closing this out as it appears to be resolved one way or another.


Repository:
  rL LLVM

https://reviews.llvm.org/D21032



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


Re: [Lldb-commits] [PATCH] D21152: Hunt for unused memory properly when dealing with processes that can tell us about memory mappings

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala closed this revision.
tfiala added a comment.

Closing per comments on this already being checked in.


Repository:
  rL LLVM

https://reviews.llvm.org/D21152



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


Re: [Lldb-commits] [PATCH] D24629: Allow for tests to be disabled at runtime

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

I am accepting this with one strong reservation which I will explicitly call 
out here:

- If somebody checks in changes that are broken, and claims they missed it 
because they have an xfail exclusion file and didn't catch it, I will rip this 
out.  If the xfails are hard to setup, it is likely that this is a code smell 
for needing better decorators to more precisely home in on the cases that are 
failing.  Often times version checks are helpful.

I do get the utility this would afford for bring-up of different scenarios, 
though.  Hence I see that being useful enough to have it as an escape hatch.



Comment at: packages/Python/lldbsuite/test/configuration.py:107-108
@@ +106,4 @@
+skip_methods = None
+xfail_files = None
+xfail_methods = None
+

The skip seems okay.  The xfail seems *very* dangerous.  Nobody else is going 
to get these xfails.  We're setting ourselves up for having people check in 
tests that are broken.  It allows for a workflow where the user "thinks they're 
done", when they're not.


https://reviews.llvm.org/D24629



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


Re: [Lldb-commits] [PATCH] D24629: Allow for tests to be disabled at runtime

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala added a comment.

> > There is no reasonable thing we can base the expectation as the exact same 
> > device with a different cpu revision could support watchpoints just fine, 
> > so we could just define the list of these tests externally (in this case, I 
> > would probably annotate them with the watchpoint category and then do the 
> > skips based on categories instead).

> 


Tangential: most chips I've worked on that had hardware watchpoint support had 
an instruction that could be called to find out if such a feature exists.  I 
think ARM does this.  I would think we could expose an API that says whether 
watchpoints are supported or not, and use that info in LLDB and the test suite 
to enable or disable them.

I'll look at the rest of the change here.  I'm not opposed to the general idea, 
although if it encourages people to skip running tests, then check in code that 
breaks those tests, "unbeknownst to them" (* only because they were 
intentionally not running them), then I'd say that's bad news.


https://reviews.llvm.org/D24629



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


Re: [Lldb-commits] [PATCH] D20835: Mark the current column when displaying the context of the current breakpoint on the terminal.

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala added a comment.

(I'll close this out as soon as Jim accepts).


https://reviews.llvm.org/D20835



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


Re: [Lldb-commits] [PATCH] D24850: add hook for calling platform-dependent pre-kill action on a timed out test

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala closed this revision.
tfiala added a comment.

Closed by r282258


https://reviews.llvm.org/D24850



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


[Lldb-commits] [lldb] r282258 - add hook for calling platform-dependent pre-kill action on a timed out test

2016-09-23 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Fri Sep 23 11:10:01 2016
New Revision: 282258

URL: http://llvm.org/viewvc/llvm-project?rev=282258=rev
Log:
add hook for calling platform-dependent pre-kill action on a timed out test

differential review: https://reviews.llvm.org/D24850

reviewers: clayborg, labath

Added:
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/README.md
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/__init__.py
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/darwin.py
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/__init__.py
lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
Modified:
lldb/trunk/packages/Python/lldbsuite/test/dosep.py
lldb/trunk/packages/Python/lldbsuite/test/test_runner/process_control.py

Added: lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/README.md
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/README.md?rev=282258=auto
==
--- lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/README.md (added)
+++ lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/README.md Fri Sep 23 
11:10:01 2016
@@ -0,0 +1,55 @@
+# pre\_kill\_hook package
+
+## Overview
+
+The pre\_kill\_hook package provides a per-platform method for running code
+after a test process times out but before the concurrent test runner kills the
+timed-out process.
+
+## Detailed Description of Usage
+
+If a platform defines the hook, then the hook gets called right after a timeout
+is detected in a test run, but before the process is killed.
+
+The pre-kill-hook mechanism works as follows:
+
+* When a timeout is detected in the process_control.ProcessDriver class that
+  runs the per-test lldb process, a new overridable on\_timeout\_pre\_kill() 
method
+  is called on the ProcessDriver instance.
+
+* The concurrent test driver's derived ProcessDriver overrides this method. It
+  looks to see if a module called
+  "lldbsuite.pre\_kill\_hook.{platform-system-name}" module exists, where
+  platform-system-name is replaced with platform.system().lower().  (e.g.
+  "Darwin" becomes the darwin.py module).
+  
+  * If that module doesn't exist, the rest of the new behavior is skipped.
+
+  * If that module does exist, it is loaded, and the method
+"do\_pre\_kill(process\_id, context\_dict, output\_stream)" is called. If
+that method throws an exception, we log it and we ignore further processing
+of the pre-killed process.
+
+  * The process\_id argument of the do\_pre\_kill function is the process id as
+returned by the ProcessDriver.pid property.
+  
+  * The output\_stream argument of the do\_pre\_kill function takes a file-like
+object. Output to be collected from doing any processing on the
+process-to-be-killed should be written into the file-like object. The
+current impl uses a six.StringIO and then writes this output to
+{TestFilename}-{pid}.sample in the session directory.
+
+* Platforms where platform.system() is "Darwin" will get a pre-kill action that
+  runs the 'sample' program on the lldb that has timed out. That data will be
+  collected on CI and analyzed to determine what is happening during timeouts.
+  (This has an advantage over a core in that it is much smaller and that it
+  clearly demonstrates any liveness of the process, if there is any).
+
+## Running the tests
+
+To run the tests in the pre\_kill\_hook package, open a console, change into
+this directory and run the following:
+
+```
+python -m unittest discover
+```

Added: lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/__init__.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/__init__.py?rev=282258=auto
==
--- lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/__init__.py (added)
+++ lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/__init__.py Fri Sep 23 
11:10:01 2016
@@ -0,0 +1 @@
+"""Initialize the package."""

Added: lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/darwin.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/darwin.py?rev=282258=auto
==
--- lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/darwin.py (added)
+++ lldb/trunk/packages/Python/lldbsuite/pre_kill_hook/darwin.py Fri Sep 23 
11:10:01 2016
@@ -0,0 +1,46 @@
+"""Provides a pre-kill method to run on macOS."""
+from __future__ import print_function
+
+# system imports
+import subprocess
+import sys
+
+# third-party module imports
+import six
+
+
+def do_pre_kill(process_id, runner_context, output_stream, sample_time=3):
+"""Samples the given process id, and puts the output to output_stream.
+

Re: [Lldb-commits] [PATCH] D24850: add hook for calling platform-dependent pre-kill action on a timed out test

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala updated this revision to Diff 72294.
tfiala added a comment.

I'm about to check this in.  I just wanted to put up my final change, which 
includes the following:

- README.md - documents the new pre_kill_hook package in lldbsuite.

- added a runner_context/context_dict argument to the pre-kill-hook logic.  
This dictionary will contain:
  - entry 'args': array containing configuration.args
  - entry 'platform_name': contains configuration.lldb_platform_name
  - entry 'platform_url': contains configuration.lldb_platform_url
  - entry 'platform_working_dir': contains 
configuration.lldb_platform_working_dir

I pass the dictionary in to decouple the pre_kill_hook package from the test 
runner configuration module.  (Also, the configuration module logic is not 
guaranteed to be run on any of those test queue workers, which may be in 
separate processes when using the multiprocessing* test runner strategies).


https://reviews.llvm.org/D24850

Files:
  packages/Python/lldbsuite/pre_kill_hook/README.md
  packages/Python/lldbsuite/pre_kill_hook/__init__.py
  packages/Python/lldbsuite/pre_kill_hook/darwin.py
  packages/Python/lldbsuite/pre_kill_hook/tests/__init__.py
  packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
  packages/Python/lldbsuite/test/dosep.py
  packages/Python/lldbsuite/test/test_runner/process_control.py

Index: packages/Python/lldbsuite/test/test_runner/process_control.py
===
--- packages/Python/lldbsuite/test/test_runner/process_control.py
+++ packages/Python/lldbsuite/test/test_runner/process_control.py
@@ -483,6 +483,19 @@
 def on_process_exited(self, command, output, was_timeout, exit_status):
 pass
 
+def on_timeout_pre_kill(self):
+"""Called after the timeout interval elapses but before killing it.
+
+This method is added to enable derived classes the ability to do
+something to the process prior to it being killed.  For example,
+this would be a good spot to run a program that samples the process
+to see what it was doing (or not doing).
+
+Do not attempt to reap the process (i.e. use wait()) in this method.
+That will interfere with the kill mechanism and return code processing.
+"""
+pass
+
 def write(self, content):
 # pylint: disable=no-self-use
 # Intended - we want derived classes to be able to override
@@ -640,6 +653,11 @@
 # Reap the child process here.
 self.returncode = self.process.wait()
 else:
+
+# Allow derived classes to do some work after we detected
+# a timeout but before we touch the timed-out process.
+self.on_timeout_pre_kill()
+
 # Prepare to stop the process
 process_terminated = completed_normally
 terminate_attempt_count = 0
Index: packages/Python/lldbsuite/test/dosep.py
===
--- packages/Python/lldbsuite/test/dosep.py
+++ packages/Python/lldbsuite/test/dosep.py
@@ -46,6 +46,7 @@
 import sys
 import threading
 
+from six import StringIO
 from six.moves import queue
 
 # Our packages and modules
@@ -64,6 +65,8 @@
 # Status codes for running command with timeout.
 eTimedOut, ePassed, eFailed = 124, 0, 1
 
+g_session_dir = None
+g_runner_context = None
 output_lock = None
 test_counter = None
 total_tests = None
@@ -227,6 +230,39 @@
 failures,
 unexpected_successes)
 
+def on_timeout_pre_kill(self):
+# We're just about to have a timeout take effect.  Here's our chance
+# to do a pre-kill action.
+
+# For now, we look to see if the lldbsuite.pre_kill module has a
+# runner for our platform.
+module_name = "lldbsuite.pre_kill_hook." + platform.system().lower()
+import importlib
+try:
+module = importlib.import_module(module_name)
+except ImportError:
+# We don't have one for this platform.  Skip.
+sys.stderr.write("\nwarning: no timeout handler module: " +
+ module_name)
+return
+
+# Try to run the pre-kill-hook method.
+try:
+# Run the pre-kill command.
+output_io = StringIO()
+module.do_pre_kill(self.pid, g_runner_context, output_io)
+
+# Write the output to a filename associated with the test file and
+# pid.
+basename = "{}-{}.sample".format(self.file_name, self.pid)
+sample_path = os.path.join(g_session_dir, basename)
+with open(sample_path, "w") as output_file:
+output_file.write(output_io.getvalue())
+except Exception as e:
+sys.stderr.write("caught exception while running "
+ "pre-kill action: {}".format(e))
+return
+
 def is_exceptional_exit(self):
   

Re: [Lldb-commits] [PATCH] D24850: add hook for calling platform-dependent pre-kill action on a timed out test

2016-09-23 Thread Todd Fiala via lldb-commits
tfiala added inline comments.


Comment at: packages/Python/lldbsuite/test/test_runner/process_control.py:514
@@ +513,3 @@
+# to it later.
+self.command = command
+

labath wrote:
> Is this actually used anywhere?
No - I originally was parsing some options out of it in the handler, but I no 
longer am doing that.  I will take this out of the final.  It's easy enough to 
add in later if we ever need it.


https://reviews.llvm.org/D24850



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


  1   2   3   4   5   6   7   8   >