Re: [Lldb-commits] [PATCH] D14037: Reuse native curses(8) library on NetBSD

2015-11-05 Thread Bruce Mitchener via lldb-commits
brucem added a reviewer: clayborg.
brucem added a comment.

I'd like to land this given approval.


Repository:
  rL LLVM

http://reviews.llvm.org/D14037



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


Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb

2015-11-05 Thread Bruce Mitchener via lldb-commits
brucem added a reviewer: emaste.
brucem added a comment.

emaste, are you okay with this and willing to approve it?

It looks good to me.


Repository:
  rL LLVM

http://reviews.llvm.org/D14042



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


Re: [Lldb-commits] [PATCH] D14375: [swig] Start of pylint on python build scripts.

2015-11-05 Thread Zachary Turner via lldb-commits
zturner added a comment.

Seems ok I suppose, I can't find any functional changes from eyeballing it 
aside from the import changes.  I'm still confused why `utilsDebug.py` even 
worked before



Comment at: scripts/utilsDebug.py:14
@@ -16,2 +13,3 @@
 # Python modules:
+import sys
 

What's causing modules to be added / removed from the diffed version?  Is this 
some kind of "include what you use" type of thing that detects if you have 
unused modules?

Speaking of which, this module got *added* not removed.  How was it even 
working before?


http://reviews.llvm.org/D14375



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


[Lldb-commits] [lldb] r252198 - Better validation when we think a directory might be Xcode.app.

2015-11-05 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Thu Nov  5 13:46:12 2015
New Revision: 252198

URL: http://llvm.org/viewvc/llvm-project?rev=252198=rev
Log:
Better validation when we think a directory might be Xcode.app.

LLDB could otherwise get confused if it is (for example) in a
root that is meant to install into an Xcode.app but hasn't
been installed yet.  That way Xcode can fall back to the real
Xcode.app rather than trying to look for resources inside the
root.

Modified:
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=252198=252197=252198=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Thu Nov  5 
13:46:12 2015
@@ -1225,7 +1225,16 @@ CheckPathForXcode(const FileSpec )
 if (pos != std::string::npos)
 {
 path_to_shlib.erase(pos + strlen(substr));
-return FileSpec(path_to_shlib.c_str(), false);
+FileSpec ret (path_to_shlib.c_str(), false);
+
+FileSpec xcode_binary_path = ret;
+xcode_binary_path.AppendPathComponent("MacOS");
+xcode_binary_path.AppendPathComponent("Xcode");
+
+if (xcode_binary_path.Exists())
+{
+return ret;
+}
 }
 }
 return FileSpec();


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


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

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

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


http://reviews.llvm.org/D14389



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


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

2015-11-05 Thread Zachary Turner via lldb-commits
zturner added a comment.

Isn't this going to have the same problem as before?  If CMake finds a source 
file in the directory that is not added to one of the targets, it will give you 
an error.  With this patch, on Linux or Windows `PlatformAppleSimulator.cpp` 
will be on disk, but not part of the `lldbPluginPlatformMacOSX` target, and as 
a result CMake will complain.


http://reviews.llvm.org/D14389



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


Re: [Lldb-commits] [PATCH] D14375: [swig] Start of pylint on python build scripts.

2015-11-05 Thread Bruce Mitchener via lldb-commits
brucem added inline comments.


Comment at: scripts/Python/buildSwigPython.py:293
@@ +292,3 @@
+#  LLDBWrapPython.cpp file.
+# Args:vDictArg - (R) Program input parameters.
+#  vstrSwigOpFileNamePath - (R) LLDBWrapPython.cpp file.

I shouldn't have chopped an 's' from here.


Comment at: scripts/Python/buildSwigPython.py:655
@@ -654,3 @@
-   strMsg = "";
-   strErrMsgProgFail = "";
-   

This was removed as it was overwriting the value of the global instead of just 
appending to it below.


Comment at: scripts/utilsDebug.py:14
@@ -16,2 +13,3 @@
 # Python modules:
+import sys
 

zturner wrote:
> What's causing modules to be added / removed from the diffed version?  Is 
> this some kind of "include what you use" type of thing that detects if you 
> have unused modules?
> 
> Speaking of which, this module got *added* not removed.  How was it even 
> working before?
There was a warning at the usage of sys that it wasn't defined.

It is only used in one place in this file and that's an error path that 
probably never ever triggers.


http://reviews.llvm.org/D14375



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


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

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

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

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

This reverts commit ff6cc332dd6654620e3408d06f8f49a0c9b3cd41.

rL252179

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

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


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


Re: [Lldb-commits] [lldb] r252179 - Do not build any of the simulator material on non-Darwin

2015-11-05 Thread Zachary Turner via lldb-commits
Renaming it to .mm would fix it, but I don't know if that extension has
special implications on OSX platforms.

Another fix would be moving the platform-specific files into a subfolder
and then adding them dfrom the subfolder.  That way CMake won't see them in
the current directory.

On Thu, Nov 5, 2015 at 10:37 AM Tamas Berghammer via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Hi Enrico,
>
> Skipping files this way isn't working because of the way the LLVM build
> system works (see:
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8151/steps/cmake%20local/logs/stdio
> )
>
> Do you have any suggestion for a quick fix better then surrounding the
> affected files with an "#ifdef __APPLE__"?
>
> Thanks,
> Tamas
>
> On Thu, Nov 5, 2015 at 10:25 AM Enrico Granata via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Author: enrico
>> Date: Thu Nov  5 12:23:10 2015
>> New Revision: 252179
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=252179=rev
>> Log:
>> Do not build any of the simulator material on non-Darwin
>>
>> Modified:
>> lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
>>
>> Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252179=252178=252179=diff
>>
>> ==
>> --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original)
>> +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Thu Nov  5
>> 12:23:10 2015
>> @@ -1,15 +1,15 @@
>>  list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
>> -  PlatformAppleSimulator.cpp
>>PlatformDarwin.cpp
>>PlatformDarwinKernel.cpp
>> -  PlatformiOSSimulator.cpp
>>PlatformMacOSX.cpp
>>PlatformRemoteiOS.cpp
>>)
>>
>>  if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
>>  list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
>> +  PlatformAppleSimulator.cpp
>>PlatformiOSSimulatorCoreSimulatorSupport.mm
>> +  PlatformiOSSimulator.cpp
>>)
>>  endif()
>>
>>
>>
>> ___
>> lldb-commits mailing list
>> lldb-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252188 - Add a comment explaining TypeImpl.

2015-11-05 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Thu Nov  5 13:20:39 2015
New Revision: 252188

URL: http://llvm.org/viewvc/llvm-project?rev=252188=rev
Log:
Add a comment explaining TypeImpl.

Modified:
lldb/trunk/include/lldb/Symbol/Type.h

Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=252188=252187=252188=diff
==
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Thu Nov  5 13:20:39 2015
@@ -492,6 +492,9 @@ protected:
 lldb::TypeSP type_sp;
 };
 
+// the two classes here are used by the public API as a backend to
+// the SBType and SBTypeList classes
+
 class TypeImpl
 {
 public:


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


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

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

LLVM_OPTIONAL_SOURCES should avoid that.


http://reviews.llvm.org/D14389



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


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

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

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

Repository:
  rL LLVM

http://reviews.llvm.org/D14388

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

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


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

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

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

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

Reviewers: granata.enrico

Subscribers: lldb-commits

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

Modified:

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

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

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

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


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


Re: [Lldb-commits] [lldb] r252179 - Do not build any of the simulator material on non-Darwin

2015-11-05 Thread Jim Ingham via lldb-commits
.mm means compile with the ObjectiveC++ compiler, not the ObjectiveC compiler.  
Probably wouldn't effect these files but it seems a really bogus way to tell 
the build system not to build files...

Jim

> On Nov 5, 2015, at 10:58 AM, Zachary Turner via lldb-commits 
>  wrote:
> 
> Renaming it to .mm would fix it, but I don't know if that extension has 
> special implications on OSX platforms.
> 
> Another fix would be moving the platform-specific files into a subfolder and 
> then adding them dfrom the subfolder.  That way CMake won't see them in the 
> current directory.
> 
> On Thu, Nov 5, 2015 at 10:37 AM Tamas Berghammer via lldb-commits 
>  wrote:
> Hi Enrico,
> 
> Skipping files this way isn't working because of the way the LLVM build 
> system works (see: 
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8151/steps/cmake%20local/logs/stdio)
> 
> Do you have any suggestion for a quick fix better then surrounding the 
> affected files with an "#ifdef __APPLE__"?
> 
> Thanks,
> Tamas
> 
> On Thu, Nov 5, 2015 at 10:25 AM Enrico Granata via lldb-commits 
>  wrote:
> Author: enrico
> Date: Thu Nov  5 12:23:10 2015
> New Revision: 252179
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=252179=rev
> Log:
> Do not build any of the simulator material on non-Darwin
> 
> Modified:
> lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
> 
> Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252179=252178=252179=diff
> ==
> --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original)
> +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Thu Nov  5 
> 12:23:10 2015
> @@ -1,15 +1,15 @@
>  list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
> -  PlatformAppleSimulator.cpp
>PlatformDarwin.cpp
>PlatformDarwinKernel.cpp
> -  PlatformiOSSimulator.cpp
>PlatformMacOSX.cpp
>PlatformRemoteiOS.cpp
>)
> 
>  if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
>  list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
> +  PlatformAppleSimulator.cpp
>PlatformiOSSimulatorCoreSimulatorSupport.mm
> +  PlatformiOSSimulator.cpp
>)
>  endif()
> 
> 
> 
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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


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

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

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

http://reviews.llvm.org/D14389

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

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


[Lldb-commits] [lldb] r252181 - Python 3 - Apply 2to3 `filter` fixer to unittest2.

2015-11-05 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Nov  5 12:38:02 2015
New Revision: 252181

URL: http://llvm.org/viewvc/llvm-project?rev=252181=rev
Log:
Python 3 - Apply 2to3 `filter` fixer to unittest2.

Modified:
lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py

Modified: lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py?rev=252181=252180=252181=diff
==
--- lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py 
(original)
+++ lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py Thu Nov  
5 12:38:02 2015
@@ -155,7 +155,7 @@ class TestLoader(unittest.TestLoader):
  prefix=self.testMethodPrefix):
 return attrname.startswith(prefix) and \
 hasattr(getattr(testCaseClass, attrname), '__call__')
-testFnNames = filter(isTestMethod, dir(testCaseClass))
+testFnNames = list(filter(isTestMethod, dir(testCaseClass)))
 if self.sortTestMethodsUsing:
 testFnNames.sort(key=_CmpToKey(self.sortTestMethodsUsing))
 return testFnNames


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


[Lldb-commits] [lldb] r252189 - Python 3 - Fix usage of `unicode` in unittest2.

2015-11-05 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Nov  5 13:21:56 2015
New Revision: 252189

URL: http://llvm.org/viewvc/llvm-project?rev=252189=rev
Log:
Python 3 - Fix usage of `unicode` in unittest2.

Modified:
lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py

Modified: lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py?rev=252189=252188=252189=diff
==
--- lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py (original)
+++ lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py Thu Nov  5 
13:21:56 2015
@@ -236,7 +236,10 @@ class TestCase(unittest.TestCase):
 self.addTypeEqualityFunc(tuple, 'assertTupleEqual')
 self.addTypeEqualityFunc(set, 'assertSetEqual')
 self.addTypeEqualityFunc(frozenset, 'assertSetEqual')
-self.addTypeEqualityFunc(unicode, 'assertMultiLineEqual')
+if six.PY2:
+self.addTypeEqualityFunc(unicode, 'assertMultiLineEqual')
+else:
+self.addTypeEqualityFunc(str, 'assertMultiLineEqual')
 
 def addTypeEqualityFunc(self, typeobj, function):
 """Add a type specific assertEqual style function to compare a type.


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


[Lldb-commits] [lldb] r252190 - Fix build on platforms that don't have dlfcn.h

2015-11-05 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Nov  5 13:22:06 2015
New Revision: 252190

URL: http://llvm.org/viewvc/llvm-project?rev=252190=rev
Log:
Fix build on platforms that don't have dlfcn.h

Modified:
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp?rev=252190=252189=252190=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp 
(original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp Thu 
Nov  5 13:22:06 2015
@@ -10,7 +10,10 @@
 #include "PlatformAppleSimulator.h"
 
 // C Includes
+#if defined(__APPLE__)
 #include 
+#endif
+
 // C++ Includes
 #include 
 #include 


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


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

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

http://reviews.llvm.org/D14388

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

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


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

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

2015-11-05 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Nov  5 13:22:28 2015
New Revision: 252191

URL: http://llvm.org/viewvc/llvm-project?rev=252191=rev
Log:
Python 3 - Turn on absolute imports, and fix existing imports.

Absolute imports were introduced in Python 2.5 as a feature
(e.g. from __future__ import absolute_import), and made default
in Python 3.

When absolute imports are enabled, the import system changes in
a couple of ways:

1) The `import foo` syntax will *only* search sys.path.  If `foo`
   isn't in sys.path, it won't be found.  Period.  Without absolute
   imports, the import system will also search the same directory
   that the importing file resides in, so that you can easily
   import from the same folder.

2) From inside a package, you can use a dot syntax to refer to higher
   levels of the current package.  For example, if you are in the
   package lldbsuite.test.utility, then ..foo refers to
   lldbsuite.test.foo.  You can use this notation with the
   `from X import Y` syntax to write intra-package references.  For
   example, using the previous locationa s a starting point, writing
   `from ..support import seven` would import lldbsuite.support.seven

Since this is now the default behavior in Python 3, this means that
importing from the same directory with `import foo` *no longer works*.
As a result, the only way to have portable code is to force absolute
imports for all versions of Python.

See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more
information about absolute and relative imports.

Differential Revision: http://reviews.llvm.org/D14342
Reviewed By: Todd Fiala

Modified:
lldb/trunk/packages/Python/lldbsuite/test/__init__.py
lldb/trunk/packages/Python/lldbsuite/test/bench.py
lldb/trunk/packages/Python/lldbsuite/test/curses_results.py
lldb/trunk/packages/Python/lldbsuite/test/dosep.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_channels.py
lldb/trunk/packages/Python/lldbsuite/test/lldb_pylint_helper.py
lldb/trunk/packages/Python/lldbsuite/test/lldbbench.py
lldb/trunk/packages/Python/lldbsuite/test/lldbcurses.py
lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py
lldb/trunk/packages/Python/lldbsuite/test/lldbpexpect.py
lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py
lldb/trunk/packages/Python/lldbsuite/test/test_categories.py
lldb/trunk/packages/Python/lldbsuite/test/test_results.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/__init__.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/__init__.py?rev=252191=252190=252191=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/__init__.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/__init__.py Thu Nov  5 13:22:28 
2015
@@ -1,4 +1,6 @@
 # Module level initialization for the `lldbsuite.test` module.
 
-import dotest
+from __future__ import absolute_import
+
+from . import dotest
 run_suite = dotest.run_suite

Modified: lldb/trunk/packages/Python/lldbsuite/test/bench.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/bench.py?rev=252191=252190=252191=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/bench.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/bench.py Thu Nov  5 13:22:28 2015
@@ -15,6 +15,7 @@ See also bench-history.
 """
 
 from __future__ import print_function
+from __future__ import absolute_import
 
 import os, sys
 import re

Modified: lldb/trunk/packages/Python/lldbsuite/test/curses_results.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/curses_results.py?rev=252191=252190=252191=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/curses_results.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/curses_results.py Thu Nov  5 
13:22:28 2015
@@ -10,15 +10,21 @@ Configuration options for lldbtest.py se
 """
 
 from __future__ import print_function
+from __future__ import absolute_import
 
+# System modules
 import curses
 import datetime
-import lldbcurses
 import math
 import sys
 import test_results
 import time
 
+# Third-party modules
+
+# LLDB modules
+from . import lldbcurses
+
 class Curses(test_results.ResultsFormatter):
 """Receives live results from tests that are running and reports them to 
the terminal in a curses GUI"""
 

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=252191=252190=252191=diff

Re: [Lldb-commits] [PATCH] D14375: [swig] Start of pylint on python build scripts.

2015-11-05 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

Even if it were, in some of the files, almost every line would change anyway 
due to semicolons and then due to incorrect whitespace.


http://reviews.llvm.org/D14375



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


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

2015-11-05 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Nov  5 12:23:10 2015
New Revision: 252179

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

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

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


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


[Lldb-commits] [lldb] r252184 - Remove Copy and Paste error in a comment.

2015-11-05 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Thu Nov  5 12:51:48 2015
New Revision: 252184

URL: http://llvm.org/viewvc/llvm-project?rev=252184=rev
Log:
Remove Copy and Paste error in a comment.

Modified:
lldb/trunk/include/lldb/Symbol/CompileUnit.h

Modified: lldb/trunk/include/lldb/Symbol/CompileUnit.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompileUnit.h?rev=252184=252183=252184=diff
==
--- lldb/trunk/include/lldb/Symbol/CompileUnit.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompileUnit.h Thu Nov  5 12:51:48 2015
@@ -447,7 +447,7 @@ private:
 flagsParsedVariables= (1u << 1), ///< Have we already parsed 
globals and statics?
 flagsParsedSupportFiles = (1u << 2), ///< Have we already parsed 
the support files for this compile unit?
 flagsParsedLineTable= (1u << 3), ///< Have we parsed the line 
table already?
-flagsParsedLanguage = (1u << 4), ///< Have we parsed the line 
table already?
+flagsParsedLanguage = (1u << 4), ///< Have we parsed the 
language already?
 flagsParsedImportedModules  = (1u << 5)  ///< Have we parsed the 
imported modules already?
 };
 


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


[Lldb-commits] [lldb] r252224 - Let the process help figure out the Host OS if nobody else

2015-11-05 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Thu Nov  5 16:33:17 2015
New Revision: 252224

URL: http://llvm.org/viewvc/llvm-project?rev=252224=rev
Log:
Let the process help figure out the Host OS if nobody else
can figure it out.

Modified:
lldb/trunk/include/lldb/Target/Platform.h
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/trunk/source/Target/Platform.cpp

Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=252224=252223=252224=diff
==
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Thu Nov  5 16:33:17 2015
@@ -244,10 +244,21 @@ class ModuleCache;
 ResolveRemotePath (const FileSpec _path,
FileSpec _platform_path);
 
-bool
+//--
+/// Get the OS version from a connected platform.
+///
+/// Some platforms might not be connected to a remote platform, but
+/// can figure out the OS version for a process. This is common for
+/// simulator platforms that will run native programs on the current
+/// host, but the simulator might be simulating a different OS. The
+/// \a process parameter might be specified to help to determine
+/// the OS version.
+//--
+virtual bool
 GetOSVersion (uint32_t , 
   uint32_t , 
-  uint32_t );
+  uint32_t ,
+  Process *process = nullptr);

 bool
 SetOSVersion (uint32_t major, 

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=252224=252223=252224=diff
==
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Thu Nov  5 16:33:17 2015
@@ -1820,6 +1820,41 @@ public:
 RefreshStateAfterStop () = 0;
 
 //--
+/// Sometimes the connection to a process can detect the host OS
+/// version that the process is running on. The current platform
+/// should be checked first in case the platform is connected, but
+/// clients can fall back onto this function if the platform fails
+/// to identify the host OS version. The platform should be checked
+/// first in case you are running a simulator platform that might
+/// itself be running natively, but have different heuristics for
+/// figuring out which OS is is emulating.
+///
+/// @param[out] major
+///The major OS version, or UINT32_MAX if it can't be determined
+///
+/// @param[out] minor
+///The minor OS version, or UINT32_MAX if it can't be determined
+///
+/// @param[out] update
+///The update OS version, or UINT32_MAX if it can't be determined
+///
+/// @return
+/// Returns \b true if the host OS version info was filled in
+/// and \b false otherwise.
+//--
+virtual bool
+GetHostOSVersion(uint32_t ,
+ uint32_t ,
+ uint32_t )
+{
+major = UINT32_MAX;
+minor = UINT32_MAX;
+update = UINT32_MAX;
+return false;
+}
+
+
+//--
 /// Get the target object pointer for this module.
 ///
 /// @return

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=252224=252223=252224=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Thu Nov  5 
16:33:17 2015
@@ -31,10 +31,13 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Symbols.h"
+#include "lldb/Host/StringConvert.h"
+#include "lldb/Host/XML.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "llvm/ADT/STLExtras.h"
 
@@ -1586,6 +1589,64 @@ 

[Lldb-commits] [lldb] r252227 - Add support for the new (added last week) llvm::Triple::WatchOS and ::TvOS

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 17:03:44 2015
New Revision: 252227

URL: http://llvm.org/viewvc/llvm-project?rev=252227=rev
Log:
Add support for the new (added last week) llvm::Triple::WatchOS and ::TvOS
in places where we check for Triple::IOS.  They're mostly the same as far
as lldb is conerned.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252234 - Update for tvos or watchos builds.

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 17:42:18 2015
New Revision: 252234

URL: http://llvm.org/viewvc/llvm-project?rev=252234=rev
Log:
Update for tvos or watchos builds.

Modified:
lldb/trunk/scripts/package-clang-headers.py

Modified: lldb/trunk/scripts/package-clang-headers.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/package-clang-headers.py?rev=252234=252233=252234=diff
==
--- lldb/trunk/scripts/package-clang-headers.py (original)
+++ lldb/trunk/scripts/package-clang-headers.py Thu Nov  5 17:42:18 2015
@@ -29,6 +29,12 @@ if not os.path.isdir(llvm_build_dir):
 llvm_build_dir = re.sub ("-macosx-", "-iphoneos-", llvm_build_dir)
 
 if not os.path.isdir(llvm_build_dir):
+llvm_build_dir = re.sub ("-iphoneos-", "-appletvos-", llvm_build_dir)
+
+if not os.path.isdir(llvm_build_dir):
+llvm_build_dir = re.sub ("-appletvos-", "-watchos-", llvm_build_dir)
+
+if not os.path.isdir(llvm_build_dir):
 print llvm_build_dir + " doesn't exist"
 sys.exit(1)
 


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


[Lldb-commits] [lldb] r252240 - Add a generic API to return the Concrete type for a given abstract type

2015-11-05 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Thu Nov  5 17:52:05 2015
New Revision: 252240

URL: http://llvm.org/viewvc/llvm-project?rev=252240=rev
Log:
Add a generic API to return the Concrete type for a given abstract type
name and the execution context in which it is realized.

Modified:
lldb/trunk/include/lldb/Target/LanguageRuntime.h

Modified: lldb/trunk/include/lldb/Target/LanguageRuntime.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/LanguageRuntime.h?rev=252240=252239=252240=diff
==
--- lldb/trunk/include/lldb/Target/LanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/LanguageRuntime.h Thu Nov  5 17:52:05 2015
@@ -55,6 +55,16 @@ public:
   Address ,
   Value::ValueType _type) = 0;
 
+// This call should return a CompilerType given a generic type name
+// and an ExecutionContextScope in which one can actually fetch
+// any specialization information required.
+virtual CompilerType
+GetConcreteType (ExecutionContextScope *exe_scope,
+ ConstString abstract_type_name)
+{
+return CompilerType();
+}
+
 // This should be a fast test to determine whether it is likely that this 
value would
 // have a dynamic type.
 virtual bool


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


[Lldb-commits] [lldb] r252239 - GDBRemoteCommunicationClient::SendEnvironmentPacket should use the hex-encoded

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 17:51:05 2015
New Revision: 252239

URL: http://llvm.org/viewvc/llvm-project?rev=252239=rev
Log:
GDBRemoteCommunicationClient::SendEnvironmentPacket should use the hex-encoded
env packet if the '*' character used for run length encoding is present.

Modified:

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=252239=252238=252239=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
Thu Nov  5 17:51:05 2015
@@ -1583,6 +1583,7 @@ GDBRemoteCommunicationClient::SendEnviro
 {
 case '$':
 case '#':
+case '*':
 send_hex_encoding = true;
 break;
 default:


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


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

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

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

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

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


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


[Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

2015-11-05 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added reviewers: tfiala, tberghammer, labath.
zturner added a subscriber: lldb-commits.

The specific exception types that are thrown internally by unittest2 are 
considered implementation details and even documented as such in the source 
code of the library.  This patch attempts to make this correct by removing 
reliance on these implementation details, and deferring to the library 
implementation.

I'm not sure I have a good grasp of how all these decorators are supposed to 
work, but I think I did this right.  Please verify carefully that I didn't mess 
anything up.

The goal of this patch is to make a conditionalExpectedFailure decorator that 
has the following behavior:
1. If the "condition" is true (i.e. this is an expected failure), reuse the 
library's `expectedFailure` decorator.
2. If the condition is false (i.e. this is not an expected failure), just call 
the method.


http://reviews.llvm.org/D14406

Files:
  packages/Python/lldbsuite/test/lldbtest.py

Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -601,15 +601,11 @@
 def wrapper(*args, **kwargs):
 from unittest2 import case
 self = args[0]
-try:
-func(*args, **kwargs)
-except Exception:
-if expected_fn(self):
-raise case._ExpectedFailure(sys.exc_info(), bugnumber)
-else:
-raise
 if expected_fn(self):
-raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
+xfail_func = unittest2.expectedFailure(func)
+xfail_func(*args, **kwargs)
+else:
+func(*args, **kwargs)
 return wrapper
 # if bugnumber is not-callable(incluing None), that means decorator 
function is called with optional arguments
 # return decorator in this case, so it will be used to decorating original 
method


Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -601,15 +601,11 @@
 def wrapper(*args, **kwargs):
 from unittest2 import case
 self = args[0]
-try:
-func(*args, **kwargs)
-except Exception:
-if expected_fn(self):
-raise case._ExpectedFailure(sys.exc_info(), bugnumber)
-else:
-raise
 if expected_fn(self):
-raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
+xfail_func = unittest2.expectedFailure(func)
+xfail_func(*args, **kwargs)
+else:
+func(*args, **kwargs)
 return wrapper
 # if bugnumber is not-callable(incluing None), that means decorator function is called with optional arguments
 # return decorator in this case, so it will be used to decorating original method
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252228 - Add support for one API used to detect if a process

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 17:04:57 2015
New Revision: 252228

URL: http://llvm.org/viewvc/llvm-project?rev=252228=rev
Log:
Add support for one API used to detect if a process
is running under System Integrity Protection on 
Mac OS X 10.11.  The rootless_allows_task_for_pid() spi
(see debugserver RNBRemote.cpp) is the final SPI that
is used for this - should add support for that too at
some point.


Modified:
lldb/trunk/tools/darwin-threads/examine-threads.c

Modified: lldb/trunk/tools/darwin-threads/examine-threads.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/darwin-threads/examine-threads.c?rev=252228=252227=252228=diff
==
--- lldb/trunk/tools/darwin-threads/examine-threads.c (original)
+++ lldb/trunk/tools/darwin-threads/examine-threads.c Thu Nov  5 17:04:57 2015
@@ -10,6 +10,11 @@
 #include 
 #include 
 
+// from System.framework/Versions/B/PrivateHeaders/sys/codesign.h
+#define CS_OPS_STATUS   0   /* return status */
+#define CS_RESTRICT 0x800   /* tell dyld to treat 
restricted */
+int csops(pid_t pid, unsigned int  ops, void * useraddr, size_t usersize);
+
 /* Step through the process table, find a matching process name, return
the pid of that matched process.
If there are multiple processes with that name, issue a warning on stdout
@@ -367,6 +372,13 @@ main (int argc, char **argv)
 
   printf ("\n");
 
+  int csops_flags = 0;
+  if (csops (pid, CS_OPS_STATUS, _flags, sizeof (csops_flags)) != -1
+  && (csops_flags & CS_RESTRICT))
+  {
+  printf ("pid %d (%s) is restricted so nothing can attach to it.\n", pid, 
process_name);
+  }
+
   kr = task_for_pid (mach_task_self (), pid, );
   if (kr != KERN_SUCCESS)
 {


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


[Lldb-commits] [lldb] r252235 - Update the invocation to dsymForUUID (a script plugin used

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 17:44:08 2015
New Revision: 252235

URL: http://llvm.org/viewvc/llvm-project?rev=252235=rev
Log:
Update the invocation to dsymForUUID (a script plugin used
at Apple, called by the DebugSymbols private framework to
find a dSYM for a UUID on mac) to include the latest
args we need to use when looking for kernel binaries etc.

Modified:
lldb/trunk/source/Host/macosx/Symbols.cpp

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=252235=252234=252235=diff
==
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Thu Nov  5 17:44:08 2015
@@ -469,9 +469,9 @@ Symbols::DownloadObjectAndSymbolFile (Mo
 
 StreamString command;
 if (!uuid_str.empty())
-command.Printf("%s --ignoreNegativeCache --copyExecutable %s", 
g_dsym_for_uuid_exe_path, uuid_str.c_str());
+command.Printf("%s --ignoreNegativeCache --copyExecutable 
--databases bursar.apple.com,uuidsymmap.apple.com %s", 
g_dsym_for_uuid_exe_path, uuid_str.c_str());
 else if (file_path[0] != '\0')
-command.Printf("%s --ignoreNegativeCache --copyExecutable %s", 
g_dsym_for_uuid_exe_path, file_path);
+command.Printf("%s --ignoreNegativeCache --copyExecutable 
--databases bursar.apple.com,uuidsymmap.apple.com %s", 
g_dsym_for_uuid_exe_path, file_path);
 
 if (!command.GetString().empty())
 {


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


[Lldb-commits] [lldb] r252238 - Fix cmake build on Mac OS X.

2015-11-05 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Thu Nov  5 17:48:41 2015
New Revision: 252238

URL: http://llvm.org/viewvc/llvm-project?rev=252238=rev
Log:
Fix cmake build on Mac OS X.

PlatformDarwin uses Host/XML.h which needs to find libxml2, and
so it needs to be told how to find the headers.

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

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252238=252237=252238=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Thu Nov  5 
17:48:41 2015
@@ -12,6 +12,7 @@ list(APPEND PLUGIN_PLATFORM_MACOSX_DARWI
   )
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+  include_directories(${LIBXML2_INCLUDE_DIR})
   list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
 ${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES})
 else()


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


[Lldb-commits] [lldb] r252242 - Use Process::IsAlive instead of just checking for eStateExited.

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 17:54:29 2015
New Revision: 252242

URL: http://llvm.org/viewvc/llvm-project?rev=252242=rev
Log:
Use Process::IsAlive instead of just checking for eStateExited.
Two minor tweaks to GetLoadedDynamicLibrariesInfos.

Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=252242=252241=252242=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Nov  
5 17:54:29 2015
@@ -2981,7 +2981,7 @@ ProcessGDBRemote::SetUnixSignals(const U
 bool
 ProcessGDBRemote::IsAlive ()
 {
-return m_gdb_comm.IsConnected() && m_private_state.GetValue() != 
eStateExited;
+return m_gdb_comm.IsConnected() && Process::IsAlive();
 }
 
 addr_t
@@ -4169,6 +4169,9 @@ ProcessGDBRemote::GetLoadedDynamicLibrar
 
 if (m_gdb_comm.GetLoadedDynamicLibrariesInfosSupported())
 {
+// Scope for the scoped timeout object
+GDBRemoteCommunication::ScopedTimeout timeout (m_gdb_comm, 10);
+
 StructuredData::ObjectSP args_dict(new StructuredData::Dictionary());
 args_dict->GetAsDictionary()->AddIntegerItem ("image_list_address", 
image_list_address);
 args_dict->GetAsDictionary()->AddIntegerItem ("image_count", 
image_count);
@@ -4192,8 +4195,6 @@ ProcessGDBRemote::GetLoadedDynamicLibrar
 {
 if (!response.Empty())
 {
-// The packet has already had the 0x7d xor quoting 
stripped out at the
-// GDBRemoteCommunication packet receive level.
 object_sp = StructuredData::ParseJSON 
(response.GetStringRef());
 }
 }
@@ -4202,7 +4203,6 @@ ProcessGDBRemote::GetLoadedDynamicLibrar
 return object_sp;
 }
 
-
 // Establish the largest memory read/write payloads we should use.
 // If the remote stub has a max packet size, stay under that size.
 // 


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


[Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2

2015-11-05 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added a reviewer: tfiala.
zturner added a subscriber: lldb-commits.

TBH I'm honestly not sure what the problem was before, or why this fixes
it.  But what I can tell from debugging is that under Py3,
`sortMethodsUsing` is treated as a class attribute, but it was being
accessed as `self.sortMethodsUsing`.  What the full implications of this
are I don't quite know, but the symptom here was that the value we were
assigning to it -- the global lambda `cmp_` -- was being treated as a
bound method instead of a global method.  So it was expecting to be called
with a `self` argument.

Why exactly this happens in Python 3, and why exactly this *doesn't*
happen in Python 2 are not clear to me.

It's worth mentioning that I tried to switch unittest2 over to unittest -- the 
builtin implementation -- as a means of solving the Py2 / Py3 portability 
problems, and it was non-trivial at best, at least with my limited Python 
knowledge.  The reason is that we have many custom decorators that rely on 
internals of unittest2 that are even documented in the source code as 
implementation details.  But we use them, and they don't exist in the Python 3 
version of unittest2, and as a result I don't know how to do the port smoothly.

Honestly, I couldn't even get it working under Python 2.7's built-in unittest 
implementation for similar reasons (relying on implementation details).  It 
would be nice to do this someday, but our decorators have so many layers of 
wrapping and indirection that it makes my head explode trying to figure out 
what's going on :-/

http://reviews.llvm.org/D14395

Files:
  third_party/Python/module/unittest2/unittest2/__init__.py
  third_party/Python/module/unittest2/unittest2/loader.py
  third_party/Python/module/unittest2/unittest2/test/test_loader.py

Index: third_party/Python/module/unittest2/unittest2/test/test_loader.py
===
--- third_party/Python/module/unittest2/unittest2/test/test_loader.py
+++ third_party/Python/module/unittest2/unittest2/test/test_loader.py
@@ -1104,15 +1104,12 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromTestCase(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 class Foo(unittest2.TestCase):
 def test_1(self): pass
 def test_2(self): pass
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = loader.suiteClass([Foo('test_2'), Foo('test_1')])
 self.assertEqual(loader.loadTestsFromTestCase(Foo), tests)
@@ -1120,9 +1117,6 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromModule(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 m = types.ModuleType('m')
 class Foo(unittest2.TestCase):
 def test_1(self): pass
@@ -1130,7 +1124,7 @@
 m.Foo = Foo
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = [loader.suiteClass([Foo('test_2'), Foo('test_1')])]
 self.assertEqual(list(loader.loadTestsFromModule(m)), tests)
@@ -1138,9 +1132,6 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromName(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 m = types.ModuleType('m')
 class Foo(unittest2.TestCase):
 def test_1(self): pass
@@ -1148,7 +1139,7 @@
 m.Foo = Foo
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = loader.suiteClass([Foo('test_2'), Foo('test_1')])
 self.assertEqual(loader.loadTestsFromName('Foo', m), tests)
@@ -1156,9 +1147,6 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromNames(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 m = types.ModuleType('m')
 class Foo(unittest2.TestCase):
 def test_1(self): pass
@@ -1166,7 +1154,7 @@
 m.Foo = Foo
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = [loader.suiteClass([Foo('test_2'), Foo('test_1')])]
   

[Lldb-commits] [lldb] r252225 - Add support for the armv7k ABI which has some small

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 16:51:29 2015
New Revision: 252225

URL: http://llvm.org/viewvc/llvm-project?rev=252225=rev
Log:
Add support for the armv7k ABI which has some small
changes from the normal armv7 ABI used on darwin.

Modified:
lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h

Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp?rev=252225=252224=252225=diff
==
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp Thu Nov  5 
16:51:29 2015
@@ -238,8 +238,8 @@ ABIMacOSX_arm::PrepareTrivialCall (Threa
 size_t num_stack_regs = ae - ai;
 
 sp -= (num_stack_regs * 4);
-// Keep the stack 8 byte aligned, not that we need to
-sp &= ~(8ull-1ull);
+// Keep the stack 16 byte aligned
+sp &= ~(16ull-1ull);
 
 // just using arg1 to get the right size
 const RegisterInfo *reg_info = 
reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
@@ -413,6 +413,26 @@ ABIMacOSX_arm::GetArgumentValues (Thread
 return true;
 }
 
+bool
+ABIMacOSX_arm::IsArmv7kProcess (Thread *thread) const
+{
+bool is_armv7k = false;
+if (thread)
+{
+ProcessSP process_sp (thread->GetProcess());
+if (process_sp)
+{
+const ArchSpec  (process_sp->GetTarget().GetArchitecture());
+const ArchSpec::Core system_core = arch.GetCore();
+if (system_core == ArchSpec::eCore_arm_armv7k)
+{
+is_armv7k = true;
+}
+}
+}
+return is_armv7k;
+}
+
 ValueObjectSP
 ABIMacOSX_arm::GetReturnValueObjectImpl (Thread ,
  lldb_private::CompilerType 
_type) const
@@ -443,6 +463,60 @@ ABIMacOSX_arm::GetReturnValueObjectImpl
 {
 default:
 return return_valobj_sp;
+case 128:
+if (IsArmv7kProcess ())
+{
+// "A composite type not larger than 16 bytes is returned 
in r0-r3. The format is
+// as if the result had been stored in memory at a 
word-aligned address and then
+// loaded into r0-r3 with an ldm instruction"
+{
+const RegisterInfo *r1_reg_info = 
reg_ctx->GetRegisterInfoByName("r1", 0);
+const RegisterInfo *r2_reg_info = 
reg_ctx->GetRegisterInfoByName("r2", 0);
+const RegisterInfo *r3_reg_info = 
reg_ctx->GetRegisterInfoByName("r3", 0);
+if (r1_reg_info && r2_reg_info && r3_reg_info)
+{
+const size_t byte_size = 
compiler_type.GetByteSize();
+ProcessSP process_sp (thread.GetProcess());
+if (byte_size <= r0_reg_info->byte_size + 
r1_reg_info->byte_size + r2_reg_info->byte_size + r3_reg_info->byte_size
+&& process_sp)
+{
+std::unique_ptr heap_data_ap 
(new DataBufferHeap(byte_size, 0));
+const ByteOrder byte_order = 
process_sp->GetByteOrder();
+RegisterValue r0_reg_value;
+RegisterValue r1_reg_value;
+RegisterValue r2_reg_value;
+RegisterValue r3_reg_value;
+if (reg_ctx->ReadRegister(r0_reg_info, 
r0_reg_value)
+&& reg_ctx->ReadRegister(r1_reg_info, 
r1_reg_value)
+&& reg_ctx->ReadRegister(r2_reg_info, 
r2_reg_value)
+&& reg_ctx->ReadRegister(r3_reg_info, 
r3_reg_value))
+{
+Error error;
+if (r0_reg_value.GetAsMemoryData 
(r0_reg_info, heap_data_ap->GetBytes()+0, 4, byte_order, error)
+&& r1_reg_value.GetAsMemoryData 
(r1_reg_info, heap_data_ap->GetBytes()+4, 4, byte_order, error)
+&& r2_reg_value.GetAsMemoryData 
(r2_reg_info, heap_data_ap->GetBytes()+8, 4, byte_order, error)
+&& r3_reg_value.GetAsMemoryData 
(r3_reg_info, heap_data_ap->GetBytes()+12, 4, byte_order, error))
+{
+DataExtractor data (DataBufferSP 
(heap_data_ap.release()),
+byte_order,
+   

[Lldb-commits] [lldb] r252245 - Add a warning to TargetList::CreateTargetInternal

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 17:59:30 2015
New Revision: 252245

URL: http://llvm.org/viewvc/llvm-project?rev=252245=rev
Log:
Add a warning to TargetList::CreateTargetInternal
so when it is run on a kext (which won't activate
any platform plugins), you'll get a warning message
which may be helpful to the user.

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

Modified: lldb/trunk/source/Target/TargetList.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=252245=252244=252245=diff
==
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Thu Nov  5 17:59:30 2015
@@ -250,12 +250,14 @@ TargetList::CreateTargetInternal (Debugg
 }
 
 Platform *platform_ptr = NULL;
+bool more_than_one_platforms = false;
 for (const auto _platform_sp : platforms)
 {
 if (platform_ptr)
 {
 if (platform_ptr->GetName() != 
the_platform_sp->GetName())
 {
+more_than_one_platforms = true;
 platform_ptr = NULL;
 break;
 }
@@ -271,6 +273,12 @@ TargetList::CreateTargetInternal (Debugg
 // All platforms for all modules in the exectuable 
match, so we can select this platform
 platform_sp = platforms.front();
 }
+else if (more_than_one_platforms == false)
+{
+// No platforms claim to support this file
+error.SetErrorString ("No matching platforms found for 
this file, specify one with the --platform option");
+return error;
+}
 else
 {
 // More than one platform claims to support this file, 
so the --platform option must be specified


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


Re: [Lldb-commits] [PATCH] D14037: Reuse native curses(8) library on NetBSD

2015-11-05 Thread Kamil Rytarowski via lldb-commits
krytarowski updated this revision to Diff 39440.
krytarowski added a comment.

Rebase to master


Repository:
  rL LLVM

http://reviews.llvm.org/D14037

Files:
  source/Core/IOHandler.cpp

Index: source/Core/IOHandler.cpp
===
--- source/Core/IOHandler.cpp
+++ source/Core/IOHandler.cpp
@@ -9,7 +9,7 @@
 
 // C Includes
 #ifndef LLDB_DISABLE_CURSES
-#include 
+#include 
 #include 
 #endif
 
@@ -4107,7 +4107,9 @@
 case KEY_UNDO:  return "undo key";
 case KEY_MOUSE: return "Mouse event has occurred";
 case KEY_RESIZE:return "Terminal resize event";
+#ifdef KEY_EVENT
 case KEY_EVENT: return "We were interrupted by an event";
+#endif
 case KEY_RETURN:return "return";
 case ' ':   return "space";
 case '\t':  return "tab";


Index: source/Core/IOHandler.cpp
===
--- source/Core/IOHandler.cpp
+++ source/Core/IOHandler.cpp
@@ -9,7 +9,7 @@
 
 // C Includes
 #ifndef LLDB_DISABLE_CURSES
-#include 
+#include 
 #include 
 #endif
 
@@ -4107,7 +4107,9 @@
 case KEY_UNDO:  return "undo key";
 case KEY_MOUSE: return "Mouse event has occurred";
 case KEY_RESIZE:return "Terminal resize event";
+#ifdef KEY_EVENT
 case KEY_EVENT: return "We were interrupted by an event";
+#endif
 case KEY_RETURN:return "return";
 case ' ':   return "space";
 case '\t':  return "tab";
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14037: Reuse native curses(8) library on NetBSD

2015-11-05 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252250: Reuse native curses(8) library on NetBSD (authored 
by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D14037?vs=39440=39444#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14037

Files:
  lldb/trunk/source/Core/IOHandler.cpp

Index: lldb/trunk/source/Core/IOHandler.cpp
===
--- lldb/trunk/source/Core/IOHandler.cpp
+++ lldb/trunk/source/Core/IOHandler.cpp
@@ -9,7 +9,7 @@
 
 // C Includes
 #ifndef LLDB_DISABLE_CURSES
-#include 
+#include 
 #include 
 #endif
 
@@ -4107,7 +4107,9 @@
 case KEY_UNDO:  return "undo key";
 case KEY_MOUSE: return "Mouse event has occurred";
 case KEY_RESIZE:return "Terminal resize event";
+#ifdef KEY_EVENT
 case KEY_EVENT: return "We were interrupted by an event";
+#endif
 case KEY_RETURN:return "return";
 case ' ':   return "space";
 case '\t':  return "tab";


Index: lldb/trunk/source/Core/IOHandler.cpp
===
--- lldb/trunk/source/Core/IOHandler.cpp
+++ lldb/trunk/source/Core/IOHandler.cpp
@@ -9,7 +9,7 @@
 
 // C Includes
 #ifndef LLDB_DISABLE_CURSES
-#include 
+#include 
 #include 
 #endif
 
@@ -4107,7 +4107,9 @@
 case KEY_UNDO:  return "undo key";
 case KEY_MOUSE: return "Mouse event has occurred";
 case KEY_RESIZE:return "Terminal resize event";
+#ifdef KEY_EVENT
 case KEY_EVENT: return "We were interrupted by an event";
+#endif
 case KEY_RETURN:return "return";
 case ' ':   return "space";
 case '\t':  return "tab";
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252250 - Reuse native curses(8) library on NetBSD

2015-11-05 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Thu Nov  5 18:21:18 2015
New Revision: 252250

URL: http://llvm.org/viewvc/llvm-project?rev=252250=rev
Log:
Reuse native curses(8) library on NetBSD

Summary:
The reason for it is limit of detecting ncurses on various systems. For
example, Ubuntu ships with  and linkage from , 
isn't detected by CMake. Detecting `` on NetBSD is reusing
conflicting header from the host curses(8) and pkgsrc's ncurses library.

ncurses ships on most (till conflicting) systems with curses.h. On NetBSD it
might be conflicting, so the ncurses headers are installed with pkgsrc to a
subdirectory "ncurses/".

Patch by Kamil Rytarowski. Thanks!

Reviewers: clayborg

Subscribers: youri, akat1, brucem, joerg, lldb-commits

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

Modified:
lldb/trunk/source/Core/IOHandler.cpp

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=252250=252249=252250=diff
==
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Thu Nov  5 18:21:18 2015
@@ -9,7 +9,7 @@
 
 // C Includes
 #ifndef LLDB_DISABLE_CURSES
-#include 
+#include 
 #include 
 #endif
 
@@ -4107,7 +4107,9 @@ CursesKeyToCString (int ch)
 case KEY_UNDO:  return "undo key";
 case KEY_MOUSE: return "Mouse event has occurred";
 case KEY_RESIZE:return "Terminal resize event";
+#ifdef KEY_EVENT
 case KEY_EVENT: return "We were interrupted by an event";
+#endif
 case KEY_RETURN:return "return";
 case ' ':   return "space";
 case '\t':  return "tab";


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


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

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

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

with this error:

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


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

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

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

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

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

Repository:
  rL LLVM

http://reviews.llvm.org/D14389

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

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


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

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

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


http://reviews.llvm.org/D14389



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


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

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

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

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

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

2015-11-05 Thread Zachary Turner via lldb-commits
zturner added a comment.

Ahh makes sense, I didn't know about that.  I think a cleaner way to do this is 
to just add everything to `PLUGIN_PLATFORM_MACOSX_SOURCES` in the very first 
`list(APPEND)`.  Then just do this:

  if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
  set(LLVM_OPTIONAL_SOURCES
  PlatformAppleSimulator.cpp
  PlatformiOSSimulator.cpp
  )
  list(REMOVE_ITEM PLUGIN_PLATFORM_MACOSX_SOURCES ${LLVM_OPTIONAL_SOURCES})
  endif()


http://reviews.llvm.org/D14389



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


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

2015-11-05 Thread Zachary Turner via lldb-commits
Thanks, yea that looks like the right fix.

On Thu, Nov 5, 2015 at 2:10 PM Chaoren Lin  wrote:

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

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

2015-11-05 Thread Zachary Turner via lldb-commits
zturner accepted this revision.
zturner added a comment.
This revision is now accepted and ready to land.

I find the code to be a fair bit harder to understand as a result, but I guess 
it's not the end of the world.

Searching the source of LLVM's CMake infrastructure, this variable exists 
solely to make LLVM not complain about missing files in the current directory, 
so I can't see any way that anything outside of the current directory's 
CMakeList.txt could have modified it intentionally.  So I think it's safe, in 
the same way that the pattern for setting library dependencies is to write 
something like this:

  set(LLVM_LINK_COMPONENTS
Analysis
AsmParser
Core
Support
)

rather than appending.  Anyway, up to you.


http://reviews.llvm.org/D14389



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


[Lldb-commits] [PATCH] D14417: Make lldb::endian::InlHostByteOrder() private.

2015-11-05 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added a reviewer: clayborg.
brucem added a subscriber: lldb-commits.
Herald added a subscriber: emaste.

Since this is within the lldb namespace, the compiler tries to
export a symbol for it. Unfortunately, since it is inlined, the
symbol is hidden and this results in a mess of warnings when
building on OS X with cmake.

Moving it to the lldb_private namespace eliminates that problem.

http://reviews.llvm.org/D14417

Files:
  include/lldb/Core/Opcode.h
  include/lldb/Core/RegisterValue.h
  include/lldb/Host/Endian.h
  source/Core/Address.cpp
  source/Core/DataEncoder.cpp
  source/Core/DataExtractor.cpp
  source/Core/Event.cpp
  source/Core/Opcode.cpp
  source/Core/Scalar.cpp
  source/Core/Stream.cpp
  source/Core/Value.cpp
  source/Core/ValueObjectConstResultImpl.cpp
  source/Expression/IRInterpreter.cpp
  source/Host/freebsd/Host.cpp
  source/Host/macosx/Host.mm
  source/Host/netbsd/Host.cpp
  source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
  source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
  source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
  source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
  source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
  source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
  source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
  source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  source/Target/ExecutionContext.cpp
  source/Target/RegisterContext.cpp

Index: source/Target/RegisterContext.cpp
===
--- source/Target/RegisterContext.cpp
+++ source/Target/RegisterContext.cpp
@@ -571,31 +571,31 @@
 //case 1:
 //{
 //int8_t v;
-//if (data.ExtractBytes (0, sizeof (int8_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int8_t))
+//if (data.ExtractBytes (0, sizeof (int8_t), endian::InlHostByteOrder(), ) != sizeof (int8_t))
 //return false;
 //value = v;
 //return true;
 //}
 //case 2:
 //{
 //int16_t v;
-//if (data.ExtractBytes (0, sizeof (int16_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int16_t))
+//if (data.ExtractBytes (0, sizeof (int16_t), endian::InlHostByteOrder(), ) != sizeof (int16_t))
 //return false;
 //value = v;
 //return true;
 //}
 //case 4:
 //{
 //int32_t v;
-//if (data.ExtractBytes (0, sizeof (int32_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int32_t))
+//if (data.ExtractBytes (0, sizeof (int32_t), endian::InlHostByteOrder(), ) != sizeof (int32_t))
 //return false;
 //value = v;
 //return true;
 //}
 //case 8:
 //{
 //int64_t v;
-//if (data.ExtractBytes (0, sizeof (int64_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int64_t))
+//if (data.ExtractBytes (0, sizeof (int64_t), endian::InlHostByteOrder(), ) != sizeof (int64_t))
 //return false;
 //value = v;
 //return true;
@@ -608,23 +608,23 @@
 //case sizeof (float):
 //{
 //float v;
-//if (data.ExtractBytes (0, sizeof (float), lldb::endian::InlHostByteOrder(), ) != sizeof (float))
+//if (data.ExtractBytes (0, sizeof (float), endian::InlHostByteOrder(), ) != sizeof (float))
 //return false;
 //value = v;
 //return true;
 //}
 //case sizeof (double):
 //{
 //double v;
-//if (data.ExtractBytes (0, sizeof (double), lldb::endian::InlHostByteOrder(), ) != sizeof (double))
+//if (data.ExtractBytes (0, sizeof (double), endian::InlHostByteOrder(), ) != sizeof (double))
 //return false;
 //value = v;
 //return true;
 //}
 //case sizeof (long double):
 //{
 //double v;
-//if (data.ExtractBytes (0, sizeof (long double), lldb::endian::InlHostByteOrder(), ) != sizeof (long double))
+//if (data.ExtractBytes (0, sizeof (long double), endian::InlHostByteOrder(), ) != sizeof (long double))
 //return false;
 //value = v;
 //return true;
Index: source/Target/ExecutionContext.cpp
===
--- 

Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

2015-11-05 Thread Pavel Labath via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

From what I can tell, it should just work. I assume you've done the obvious 
checks, like deliberately failing a test and seeing it registers as failed, 
etc. I think we should just commit it, and carefully observe the buildbots.


http://reviews.llvm.org/D14406



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


Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

2015-11-05 Thread Pavel Labath via lldb-commits
labath added a comment.

(The upstream unittest does not seem to have the bugnumber feature. I am 
assuming the intention here is to make this upstream compatible, in hope of 
moving over there at some point.)


http://reviews.llvm.org/D14406



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


[Lldb-commits] [lldb] r252254 - Jim thinks we shouldn't bother to pollute the svn repo with these

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 18:55:17 2015
New Revision: 252254

URL: http://llvm.org/viewvc/llvm-project?rev=252254=rev
Log:
Jim thinks we shouldn't bother to pollute the svn repo with these
internal details, so I'll pull it back to just our own branch
of the sources.

Modified:
lldb/trunk/source/Host/macosx/Symbols.cpp

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=252254=252253=252254=diff
==
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Thu Nov  5 18:55:17 2015
@@ -469,9 +469,9 @@ Symbols::DownloadObjectAndSymbolFile (Mo
 
 StreamString command;
 if (!uuid_str.empty())
-command.Printf("%s --ignoreNegativeCache --copyExecutable 
--databases bursar.apple.com,uuidsymmap.apple.com %s", 
g_dsym_for_uuid_exe_path, uuid_str.c_str());
+command.Printf("%s --ignoreNegativeCache --copyExecutable %s", 
g_dsym_for_uuid_exe_path, uuid_str.c_str());
 else if (file_path[0] != '\0')
-command.Printf("%s --ignoreNegativeCache --copyExecutable 
--databases bursar.apple.com,uuidsymmap.apple.com %s", 
g_dsym_for_uuid_exe_path, file_path);
+command.Printf("%s --ignoreNegativeCache --copyExecutable %s", 
g_dsym_for_uuid_exe_path, file_path);
 
 if (!command.GetString().empty())
 {


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


Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

2015-11-05 Thread Tamas Berghammer via lldb-commits
tberghammer added inline comments.


Comment at: packages/Python/lldbsuite/test/lldbtest.py:605
@@ -611,2 +604,3 @@
 if expected_fn(self):
-raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
+xfail_func = unittest2.expectedFailure(func)
+xfail_func(*args, **kwargs)

You are swallowing the bug number here

Based on the implementation of unittest2.expectedFailure I think you should 
write the following to preserve it (I haven't tested it):

```
unittest2.expectedFailure(bugnumber)(func)
```


http://reviews.llvm.org/D14406



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


[Lldb-commits] [lldb] r252264 - A little more careful handling of platforms and unspecified unknown

2015-11-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Nov  5 19:43:36 2015
New Revision: 252264

URL: http://llvm.org/viewvc/llvm-project?rev=252264=rev
Log:
A little more careful handling of platforms and unspecified unknown
vendors & oses, especially on Apple, to handle the new environment
where we have more than macosx or ios (now we have watchos and tvos).

Modified:
lldb/trunk/include/lldb/Core/ArchSpec.h
lldb/trunk/source/Core/ArchSpec.cpp

Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=252264=252263=252264=diff
==
--- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ArchSpec.h Thu Nov  5 19:43:36 2015
@@ -351,6 +351,12 @@ public:
 {
 return !m_triple.getOSName().empty();
 }
+
+bool
+TripleEnvironmentWasSpecified () const
+{
+return !m_triple.getEnvironmentName().empty();
+}
 
 bool
 TripleOSIsUnspecifiedUnknown() const
@@ -583,7 +589,18 @@ public:
 //--
 StopInfoOverrideCallbackType
 GetStopInfoOverrideCallback () const;
+
+bool
+IsFullySpecifiedTriple () const;
 
+void
+PiecewiseTripleCompare (const ArchSpec ,
+bool _different,
+bool _different,
+bool _different,
+bool _version_different,
+bool _different);
+
 uint32_t
 GetFlags () const
 {

Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=252264=252263=252264=diff
==
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Thu Nov  5 19:43:36 2015
@@ -850,8 +850,11 @@ ArchSpec::MergeFrom(const ArchSpec 
 GetTriple().setOS(other.GetTriple().getOS());
 if (GetTriple().getArch() == llvm::Triple::UnknownArch)
 GetTriple().setArch(other.GetTriple().getArch());
-if (GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment)
-GetTriple().setEnvironment(other.GetTriple().getEnvironment());
+if (GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment && 
!TripleVendorWasSpecified())
+{
+if (other.TripleVendorWasSpecified())
+GetTriple().setEnvironment(other.GetTriple().getEnvironment());
+}
 }
 
 bool
@@ -876,29 +879,14 @@ ArchSpec::SetArchitecture (ArchitectureT
 if (arch_type == eArchTypeMachO)
 {
 m_triple.setVendor (llvm::Triple::Apple);
-switch (core_def->machine)
-{
-case llvm::Triple::aarch64:
-case llvm::Triple::arm:
-case llvm::Triple::thumb:
-m_triple.setOS (llvm::Triple::IOS);
-break;
-
-case llvm::Triple::x86:
-case llvm::Triple::x86_64:
-// Don't set the OS for x86_64 or for x86 as we 
want to leave it as an "unspecified unknown"
-// which means if we ask for the OS from the 
llvm::Triple we get back llvm::Triple::UnknownOS, but
-// if we ask for the string value for the OS it 
will come back empty (unspecified).
-// We do this because we now have iOS and MacOSX 
as the OS values for x86 and x86_64 for
-// normal desktop and simulator binaries. And if 
we compare a "x86_64-apple-ios" to a "x86_64-apple-"
-// triple, it will say it is compatible (because 
the OS is unspecified in the second one and will match
-// anything in the first
-break;
-
-default:
-m_triple.setOS (llvm::Triple::MacOSX);
-break;
-}
+
+// Don't set the OS.  It could be simulator, macosx, ios, 
watchos, tvos.  We could
+// get close with the cpu type - but we can't get it right 
all of the time.  Better
+// to leave this unset so other sections of code will set 
it when they have more
+// information.
+// NB: don't call m_triple.setOS 
(llvm::Triple::UnknownOS).  That sets the OSName to
+// "unknown" and the ArchSpec::TripleVendorWasSpecified() 
method says that any
+// OSName setting means it was specified.
 }
 else if (arch_type == eArchTypeELF)
  

[Lldb-commits] [lldb] r252269 - Add data formatters for NSError and NSException

2015-11-05 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Nov  5 20:43:32 2015
New Revision: 252269

URL: http://llvm.org/viewvc/llvm-project?rev=252269=rev
Log:
Add data formatters for NSError and NSException


Added:
lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp
Modified:
lldb/trunk/include/lldb/DataFormatters/FormattersHelpers.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.h
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp

Modified: lldb/trunk/include/lldb/DataFormatters/FormattersHelpers.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormattersHelpers.h?rev=252269=252268=252269=diff
==
--- lldb/trunk/include/lldb/DataFormatters/FormattersHelpers.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormattersHelpers.h Thu Nov  5 
20:43:32 2015
@@ -112,6 +112,167 @@ namespace lldb_private {
 
 time_t
 GetOSXEpoch ();
+
+struct InferiorSizedWord {
+
+InferiorSizedWord(const InferiorSizedWord& word) : 
ptr_size(word.ptr_size)
+{
+if (ptr_size == 4)
+thirty_two = word.thirty_two;
+else
+sixty_four = word.sixty_four;
+}
+
+InferiorSizedWord
+operator = (const InferiorSizedWord& word)
+{
+ptr_size = word.ptr_size;
+if (ptr_size == 4)
+thirty_two = word.thirty_two;
+else
+sixty_four = word.sixty_four;
+return *this;
+}
+
+InferiorSizedWord(uint64_t val, Process& process) : 
ptr_size(process.GetAddressByteSize())
+{
+if (ptr_size == 4)
+thirty_two = (uint32_t)val;
+else if (ptr_size == 8)
+sixty_four = val;
+else
+assert (false && "new pointer size is unknown");
+}
+
+bool
+IsNegative () const
+{
+if (ptr_size == 4)
+return ((int32_t)thirty_two) < 0;
+else
+return ((int64_t)sixty_four) < 0;
+}
+
+bool
+IsZero () const
+{
+if (ptr_size == 4)
+return thirty_two == 0;
+else
+return sixty_four == 0;
+}
+
+static InferiorSizedWord
+GetMaximum (Process& process)
+{
+if (process.GetAddressByteSize() == 4)
+return InferiorSizedWord(UINT32_MAX,4);
+else
+return InferiorSizedWord(UINT64_MAX,8);
+}
+
+InferiorSizedWord
+operator >> (int rhs) const
+{
+if (ptr_size == 4)
+return InferiorSizedWord(thirty_two >> rhs,4);
+return InferiorSizedWord(sixty_four>>rhs,8);
+}
+
+InferiorSizedWord
+operator << (int rhs) const
+{
+if (ptr_size == 4)
+return InferiorSizedWord(thirty_two << rhs,4);
+return InferiorSizedWord(sixty_four << rhs,8);
+}
+
+InferiorSizedWord
+operator & (const InferiorSizedWord& word) const
+{
+if (ptr_size != word.ptr_size)
+return InferiorSizedWord(0,ptr_size);
+if (ptr_size == 4)
+return InferiorSizedWord(thirty_two & word.thirty_two,4);
+return InferiorSizedWord(sixty_four & word.sixty_four,8);
+}
+
+InferiorSizedWord
+operator & (int x) const
+{
+if (ptr_size == 4)
+return InferiorSizedWord(thirty_two & x,4);
+return InferiorSizedWord(sixty_four & x,8);
+}
+
+size_t
+GetBitSize () const
+{
+return ptr_size << 3;
+}
+
+size_t
+GetByteSize () const
+{
+return ptr_size;
+}
+
+uint64_t
+GetValue () const
+{
+if (ptr_size == 4)
+return (uint64_t)thirty_two;
+return sixty_four;
+}
+
+InferiorSizedWord
+SignExtend () const
+{
+if (ptr_size == 4)
+return 

[Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.

2015-11-05 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added reviewers: zturner, domipheus.
brucem added a subscriber: lldb-commits.

Remove per-platform variants of this in favor of just having
Windows and Unix. The code that was previously specific to
Linux can be further simplified and used on all non-Windows
platforms that are currently supported as build hosts.

This code only runs when --swigExecutable isn't given on the
command line. cmake always passes that in, so this is never
actually used in current practice.

http://reviews.llvm.org/D14415

Files:
  scripts/buildSwigWrapperClasses.py

Index: scripts/buildSwigWrapperClasses.py
===
--- scripts/buildSwigWrapperClasses.py
+++ scripts/buildSwigWrapperClasses.py
@@ -310,108 +310,49 @@
 return (nResult, strStatusMsg)
 
 #++---
-# Details:  Dummy function - system unknown. Function should not be called.
-# Args: vDictArgs   - (R) Program input parameters.
-# Returns:  Bool- False = Program logic error.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Unknown(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Unknown()")
-# Do nothing
-return (False, strMsgErrorOsTypeUnknown)
-
-#++---
-# Details:  Locate the SWIG executable file in a Windows system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
+# Details:  Locate the SWIG executable file in a Windows system. This actually
+#   just assumes that it is on the path and performs no checks.
 # Args: vDictArgs   - (W) Program input parameters.
 # Returns:  Bool- True = Success.
 #   - False = Failure file not found.
 #   Str - Error message.
 # Throws:   None.
 #--
-def check_lldb_swig_executable_file_exists_Windows(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Windows()")
+def check_lldb_swig_executable_file_exists_windows(vDictArgs):
+dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_windows()")
 
 # Will always be true as it assumed the path to SWIG executable will be
 # in the OS system environmental variable %PATH%. Easier this way as the
 # user may have renamed the directory and or custom path installation.
-bExeFileFound = True
 vDictArgs["--swigExePath"] = ""
 vDictArgs["--swigExeName"] = "swig.exe"
-return (bExeFileFound, None)
+return (True, None)
 
 #++---
-# Details:  Locate the SWIG executable file in a Linux system. Several hard
+# Details:  Locate the SWIG executable file in a Unix system. Several hard
 #   coded predetermined possible file path locations are searched.
 #   (This is good candidate for a derived class object)
 # Args: vDictArgs   - (W) Program input parameters.
 # Returns:  Bool- True = Success.
 #   - False = Failure file not found.
 #   Str - Error message.
 # Throws:   None.
 #--
-def check_lldb_swig_executable_file_exists_Linux(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Linux()")
-bExeFileFound = False
-
-strSwigExe = "swig"
-strSwigExePath = "/usr/bin"
-strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe))
-if os.path.isfile(strExe) and os.access(strExe, os.X_OK):
-bExeFileFound = True
-vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath)
-vDictArgs["--swigExeName"] = strSwigExe
-return (bExeFileFound, None)
-
-strSwigExePath = "/usr/local/bin"
-strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe))
-if os.path.isfile(strExe) and os.access(strExe, os.X_OK):
-bExeFileFound = True
-vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath)
-vDictArgs["--swigExeName"] = strSwigExe
-return (bExeFileFound, None)
-
-return (bExeFileFound, strSwigExeFileNotFound)
-
-#++---
-# Details:  Locate the SWIG executable file in a OSX system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
-# Args: vDictArgs   - (W) Program input parameters.
-# Returns:  Bool- True = Success.
-#   - False = Failure file not found.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Darwin(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Darwin()")
-