[Lldb-commits] [PATCH] D12589: SystemRuntime/MacOSX no longer need ObjCRuntime header.

2015-09-03 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added reviewers: clayborg, jasonmolenda.
brucem added a subscriber: lldb-commits.

The AppleGetQueuesHandler code no longer needs to include a header
from the AppleObjCRuntime, so we can remove workarounds that were
present in the build systems.

http://reviews.llvm.org/D12589

Files:
  source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
  source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
  source/Plugins/SystemRuntime/MacOSX/Makefile

Index: source/Plugins/SystemRuntime/MacOSX/Makefile
===
--- source/Plugins/SystemRuntime/MacOSX/Makefile
+++ source/Plugins/SystemRuntime/MacOSX/Makefile
@@ -11,5 +11,4 @@
 LIBRARYNAME := lldbPluginSystemRuntimeMacOSX
 BUILD_ARCHIVE = 1
 
-CPP.Flags += -I$(PROJ_SRC_DIR)/../../LanguageRuntime/ObjC/AppleObjCRuntime
 include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
===
--- source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
+++ source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
@@ -1,8 +1,5 @@
 set(LLVM_NO_RTTI 1)
 
-# We depend on AppleThreadPlanStepThroughObjCTrampoline.h
-include_directories(../../LanguageRuntime/ObjC/AppleObjCRuntime)
-
 add_lldb_library(lldbPluginSystemRuntimeMacOSX
   AppleGetItemInfoHandler.cpp
   AppleGetPendingItemsHandler.cpp
Index: source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
===
--- source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
+++ source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
@@ -13,8 +13,6 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "AppleThreadPlanStepThroughObjCTrampoline.h"
-
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 
@@ -30,6 +28,8 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
 
 using namespace lldb;
 using namespace lldb_private;


Index: source/Plugins/SystemRuntime/MacOSX/Makefile
===
--- source/Plugins/SystemRuntime/MacOSX/Makefile
+++ source/Plugins/SystemRuntime/MacOSX/Makefile
@@ -11,5 +11,4 @@
 LIBRARYNAME := lldbPluginSystemRuntimeMacOSX
 BUILD_ARCHIVE = 1
 
-CPP.Flags += -I$(PROJ_SRC_DIR)/../../LanguageRuntime/ObjC/AppleObjCRuntime
 include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
===
--- source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
+++ source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
@@ -1,8 +1,5 @@
 set(LLVM_NO_RTTI 1)
 
-# We depend on AppleThreadPlanStepThroughObjCTrampoline.h
-include_directories(../../LanguageRuntime/ObjC/AppleObjCRuntime)
-
 add_lldb_library(lldbPluginSystemRuntimeMacOSX
   AppleGetItemInfoHandler.cpp
   AppleGetPendingItemsHandler.cpp
Index: source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
===
--- source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
+++ source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
@@ -13,8 +13,6 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "AppleThreadPlanStepThroughObjCTrampoline.h"
-
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 
@@ -30,6 +28,8 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
 
 using namespace lldb;
 using namespace lldb_private;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Pavel Labath via lldb-commits
labath added subscribers: zturner, labath.
labath added a comment.

Since we already have an implementation of getopt for windows, couldn't you use 
that one (or improve/replace it if it is missing some features) for netbsd 
also? I don't see why it would be necessary to have two independent 
reimplementations of getopt in the tree...


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12586: [cmake] Remove LLVM_NO_RTTI.

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

looks good


http://reviews.llvm.org/D12586



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


[Lldb-commits] [lldb] r246749 - [cmake] Remove LLVM_NO_RTTI.

2015-09-03 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Thu Sep  3 03:46:55 2015
New Revision: 246749

URL: http://llvm.org/viewvc/llvm-project?rev=246749&view=rev
Log:
[cmake] Remove LLVM_NO_RTTI.

Summary:
This doesn't exist in other LLVM projects any longer and doesn't
do anything.

Reviewers: chaoren, labath

Subscribers: emaste, tberghammer, lldb-commits, danalbert

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

Modified:
lldb/trunk/scripts/CMakeLists.txt
lldb/trunk/source/API/CMakeLists.txt
lldb/trunk/source/Breakpoint/CMakeLists.txt
lldb/trunk/source/Commands/CMakeLists.txt
lldb/trunk/source/Core/CMakeLists.txt
lldb/trunk/source/DataFormatters/CMakeLists.txt
lldb/trunk/source/Expression/CMakeLists.txt
lldb/trunk/source/Interpreter/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-arm/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-arm64/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-i386/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-mips/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-mips64/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-ppc/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt
lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt
lldb/trunk/source/Plugins/Disassembler/llvm/CMakeLists.txt
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt
lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/CMakeLists.txt
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/CMakeLists.txt
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/CMakeLists.txt
lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt
lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/CMakeLists.txt
lldb/trunk/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
lldb/trunk/source/Plugins/Instruction/ARM/CMakeLists.txt
lldb/trunk/source/Plugins/Instruction/ARM64/CMakeLists.txt
lldb/trunk/source/Plugins/Instruction/MIPS/CMakeLists.txt
lldb/trunk/source/Plugins/Instruction/MIPS64/CMakeLists.txt

lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/CMakeLists.txt
lldb/trunk/source/Plugins/JITLoader/GDB/CMakeLists.txt
lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt
lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt
lldb/trunk/source/Plugins/Language/ObjCPlusPlus/CMakeLists.txt

lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
lldb/trunk/source/Plugins/MemoryHistory/asan/CMakeLists.txt
lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/CMakeLists.txt
lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/CMakeLists.txt
lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt
lldb/trunk/source/Plugins/ObjectFile/JIT/CMakeLists.txt
lldb/trunk/source/Plugins/ObjectFile/Mach-O/CMakeLists.txt
lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
lldb/trunk/source/Plugins/OperatingSystem/Python/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/Android/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/FreeBSD/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/Kalimba/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/Linux/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/POSIX/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/Windows/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/gdb-server/CMakeLists.txt
lldb/trunk/source/Plugins/Process/FreeBSD/CMakeLists.txt
lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt
lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
lldb/trunk/source/Plugins/Process/Windows/Live/CMakeLists.txt
lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt
lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt
lldb/trunk/source/Plugins/Process/mach-core/CMakeLists.txt
lldb/trunk/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
lldb/trunk/source/Plugins/SymbolFile/Symtab/CMakeLists.txt
lldb/trunk/source/Plugins/SymbolVendor/ELF/CMakeLists.txt
lldb/trunk/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/CMakeLists.txt
lldb/trunk/source/Plugins/UnwindAssembly/x86/CMakeLists.txt
lldb/trunk/source/Symbol/CMakeLists.txt
lldb/trunk/source/T

Re: [Lldb-commits] [PATCH] D12586: [cmake] Remove LLVM_NO_RTTI.

2015-09-03 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246749: [cmake] Remove LLVM_NO_RTTI. (authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D12586?vs=33900&id=33911#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12586

Files:
  lldb/trunk/scripts/CMakeLists.txt
  lldb/trunk/source/API/CMakeLists.txt
  lldb/trunk/source/Breakpoint/CMakeLists.txt
  lldb/trunk/source/Commands/CMakeLists.txt
  lldb/trunk/source/Core/CMakeLists.txt
  lldb/trunk/source/DataFormatters/CMakeLists.txt
  lldb/trunk/source/Expression/CMakeLists.txt
  lldb/trunk/source/Interpreter/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-arm/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-arm64/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-i386/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-mips/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-mips64/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-ppc/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt
  lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt
  lldb/trunk/source/Plugins/Disassembler/llvm/CMakeLists.txt
  lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt
  lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/CMakeLists.txt
  lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/CMakeLists.txt
  lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/CMakeLists.txt
  lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt
  lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/CMakeLists.txt
  lldb/trunk/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
  lldb/trunk/source/Plugins/Instruction/ARM/CMakeLists.txt
  lldb/trunk/source/Plugins/Instruction/ARM64/CMakeLists.txt
  lldb/trunk/source/Plugins/Instruction/MIPS/CMakeLists.txt
  lldb/trunk/source/Plugins/Instruction/MIPS64/CMakeLists.txt
  
lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/CMakeLists.txt
  lldb/trunk/source/Plugins/JITLoader/GDB/CMakeLists.txt
  lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt
  lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt
  lldb/trunk/source/Plugins/Language/ObjCPlusPlus/CMakeLists.txt
  lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt
  lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
  
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
  lldb/trunk/source/Plugins/MemoryHistory/asan/CMakeLists.txt
  lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/CMakeLists.txt
  lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/CMakeLists.txt
  lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt
  lldb/trunk/source/Plugins/ObjectFile/JIT/CMakeLists.txt
  lldb/trunk/source/Plugins/ObjectFile/Mach-O/CMakeLists.txt
  lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
  lldb/trunk/source/Plugins/OperatingSystem/Python/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/Android/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/FreeBSD/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/Kalimba/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/Linux/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/POSIX/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/Windows/CMakeLists.txt
  lldb/trunk/source/Plugins/Platform/gdb-server/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/FreeBSD/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/Windows/Live/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/mach-core/CMakeLists.txt
  lldb/trunk/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
  lldb/trunk/source/Plugins/SymbolFile/Symtab/CMakeLists.txt
  lldb/trunk/source/Plugins/SymbolVendor/ELF/CMakeLists.txt
  lldb/trunk/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
  lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
  lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/CMakeLists.txt
  lldb/trunk/source/Plugins/UnwindAssembly/x86/CMakeLists.txt
  lldb/trunk/source/Symbol/CMakeLists.txt
  lldb/trunk/source/Target/CMakeLists.txt
  lldb/trunk/source/Utility/CMakeLists.txt
  lldb/trunk/tools/debugserver/source/CMakeLists.txt
  lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
  lldb/trunk/tools/debugserver/source/MacOSX/i386/CMakeLists.txt
  lldb/trunk/too

Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Pavel Labath via lldb-commits
labath added subscribers: chying, labath.
labath added a comment.

I very much like the direction this is going in. We will need to update our 
buildbots when this lands (we need to run dosep manually to setup remote 
testing), but I have tested this manually and didn't see any problems.



Comment at: test/dosep.py:503
@@ +502,3 @@
+"Please call dotest.py directly.  The dosep.py-specific arguments "
+"have been added under the Parallel processing arguments.")
+sys.exit(128)

You should print a \n after this message.


http://reviews.llvm.org/D12587



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


[Lldb-commits] [lldb] r246753 - Fix rare failure in TestProcessIO

2015-09-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Sep  3 04:30:17 2015
New Revision: 246753

URL: http://llvm.org/viewvc/llvm-project?rev=246753&view=rev
Log:
Fix rare failure in TestProcessIO

Summary:
There was a race condition in Process class, where we would not wait for 
process stdout to
propagate fully before we would shut down the connection (repro case: slow down 
the stdio thread
by placing a sleep right at the end of the while loop in 
Communication::ReadThread). The Process
class already tried to solve this problem by synchronizing with the read thread 
in
Process::ShouldBroadcastEvent, but unfortunately the connection got closed 
before that in
Process::SetExitStatus. I solve this issue by delaying the connection shutdown 
until we get a
chance to process the event and synchronize. Alternatively, I could have moved 
the
synchronization point to an earlier point in SetExitStatus, but it seems safer 
to delay the
shutdown until other things get a chance to notice the process has exited.

Reviewers: clayborg, ovyalov

Subscribers: lldb-commits

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

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

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=246753&r1=246752&r2=246753&view=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Sep  3 04:30:17 2015
@@ -1479,12 +1479,7 @@ Process::SetExitStatus (int status, cons
 else
 m_exit_string.clear();
 
-// When we exit, we no longer need to the communication channel
-m_stdio_communication.Disconnect();
-m_stdio_communication.StopReadThread();
-m_stdin_forward = false;
-
-// And we don't need the input reader anymore as well
+// When we exit, we don't need the input reader anymore
 if (m_process_input_reader)
 {
 m_process_input_reader->SetIsDone(true);
@@ -4159,6 +4154,10 @@ Process::ShouldBroadcastEvent (Event *ev
 case eStateExited:
 case eStateUnloaded:
 m_stdio_communication.SynchronizeWithReadThread();
+m_stdio_communication.Disconnect();
+m_stdio_communication.StopReadThread();
+m_stdin_forward = false;
+
 // fall-through
 case eStateConnected:
 case eStateAttaching:


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


Re: [Lldb-commits] [PATCH] D12558: Fix rare failure in TestProcessIO

2015-09-03 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246753: Fix rare failure in TestProcessIO (authored by 
labath).

Changed prior to commit:
  http://reviews.llvm.org/D12558?vs=33815&id=33917#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12558

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

Index: lldb/trunk/source/Target/Process.cpp
===
--- lldb/trunk/source/Target/Process.cpp
+++ lldb/trunk/source/Target/Process.cpp
@@ -1479,12 +1479,7 @@
 else
 m_exit_string.clear();
 
-// When we exit, we no longer need to the communication channel
-m_stdio_communication.Disconnect();
-m_stdio_communication.StopReadThread();
-m_stdin_forward = false;
-
-// And we don't need the input reader anymore as well
+// When we exit, we don't need the input reader anymore
 if (m_process_input_reader)
 {
 m_process_input_reader->SetIsDone(true);
@@ -4159,6 +4154,10 @@
 case eStateExited:
 case eStateUnloaded:
 m_stdio_communication.SynchronizeWithReadThread();
+m_stdio_communication.Disconnect();
+m_stdio_communication.StopReadThread();
+m_stdin_forward = false;
+
 // fall-through
 case eStateConnected:
 case eStateAttaching:


Index: lldb/trunk/source/Target/Process.cpp
===
--- lldb/trunk/source/Target/Process.cpp
+++ lldb/trunk/source/Target/Process.cpp
@@ -1479,12 +1479,7 @@
 else
 m_exit_string.clear();
 
-// When we exit, we no longer need to the communication channel
-m_stdio_communication.Disconnect();
-m_stdio_communication.StopReadThread();
-m_stdin_forward = false;
-
-// And we don't need the input reader anymore as well
+// When we exit, we don't need the input reader anymore
 if (m_process_input_reader)
 {
 m_process_input_reader->SetIsDone(true);
@@ -4159,6 +4154,10 @@
 case eStateExited:
 case eStateUnloaded:
 m_stdio_communication.SynchronizeWithReadThread();
+m_stdio_communication.Disconnect();
+m_stdio_communication.StopReadThread();
+m_stdin_forward = false;
+
 // fall-through
 case eStateConnected:
 case eStateAttaching:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246756 - Fix deadlock while attaching to inferiors

2015-09-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Sep  3 04:36:22 2015
New Revision: 246756

URL: http://llvm.org/viewvc/llvm-project?rev=246756&view=rev
Log:
Fix deadlock while attaching to inferiors

Summary:
There was a race condition in the AsyncThread, where we would end up sending a 
vAttach
notification to the thread before it got a chance set up its listener (this can 
be reproduced by
adding a sleep() at the very beginning of ProcessGDBRemote::AsyncThread()). 
This event would then
get lost and we LLDB would deadlock. I fix this by setting up the listener 
early on, in the
ProcessGDBRemote constructor.

This should improve the stability of all attach tests. For now, I am removing 
XTIMEOUT from
TestAttachResume, and will watch the buildbots for signs of trouble.

Reviewers: clayborg, ovyalov

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/trunk/test/dosep.py

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=246756&r1=246755&r2=246756&view=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Sep  
3 04:36:22 2015
@@ -385,6 +385,7 @@ ProcessGDBRemote::ProcessGDBRemote(lldb:
 m_last_stop_packet_mutex (Mutex::eMutexTypeRecursive),
 m_register_info (),
 m_async_broadcaster (NULL, "lldb.process.gdb-remote.async-broadcaster"),
+m_async_listener("lldb.process.gdb-remote.async-listener"),
 m_async_thread_state_mutex(Mutex::eMutexTypeRecursive),
 m_thread_ids (),
 m_jstopinfo_sp (),
@@ -406,6 +407,25 @@ ProcessGDBRemote::ProcessGDBRemote(lldb:
 m_async_broadcaster.SetEventName (eBroadcastBitAsyncThreadShouldExit,   
"async thread should exit");
 m_async_broadcaster.SetEventName (eBroadcastBitAsyncContinue,   
"async thread continue");
 m_async_broadcaster.SetEventName (eBroadcastBitAsyncThreadDidExit,  
"async thread did exit");
+
+Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_ASYNC));
+
+const uint32_t async_event_mask = eBroadcastBitAsyncContinue | 
eBroadcastBitAsyncThreadShouldExit;
+
+if (m_async_listener.StartListeningForEvents(&m_async_broadcaster, 
async_event_mask) != async_event_mask)
+{
+if (log)
+log->Printf("ProcessGDBRemote::%s failed to listen for 
m_async_broadcaster events", __FUNCTION__);
+}
+
+const uint32_t gdb_event_mask = 
Communication::eBroadcastBitReadThreadDidExit |
+
GDBRemoteCommunication::eBroadcastBitGdbReadThreadGotNotify;
+if (m_async_listener.StartListeningForEvents(&m_gdb_comm, gdb_event_mask) 
!= gdb_event_mask)
+{
+if (log)
+log->Printf("ProcessGDBRemote::%s failed to listen for m_gdb_comm 
events", __FUNCTION__);
+}
+
 const uint64_t timeout_seconds = 
GetGlobalPluginProperties()->GetPacketTimeout();
 if (timeout_seconds > 0)
 m_gdb_comm.SetPacketTimeout(timeout_seconds);
@@ -3761,184 +3781,174 @@ ProcessGDBRemote::AsyncThread (void *arg
 if (log)
 log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") 
thread starting...", __FUNCTION__, arg, process->GetID());
 
-Listener listener ("ProcessGDBRemote::AsyncThread");
 EventSP event_sp;
-const uint32_t desired_event_mask = eBroadcastBitAsyncContinue |
-eBroadcastBitAsyncThreadShouldExit;
-
-if (listener.StartListeningForEvents (&process->m_async_broadcaster, 
desired_event_mask) == desired_event_mask)
+bool done = false;
+while (!done)
 {
-listener.StartListeningForEvents (&process->m_gdb_comm, 
Communication::eBroadcastBitReadThreadDidExit |
-
GDBRemoteCommunication::eBroadcastBitGdbReadThreadGotNotify);
-
-bool done = false;
-while (!done)
+if (log)
+log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") 
listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, 
process->GetID());
+if (process->m_async_listener.WaitForEvent (NULL, event_sp))
 {
-if (log)
-log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 
") listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, 
process->GetID());
-if (listener.WaitForEvent (NULL, event_sp))
+const uint32_t event_type = event_sp->GetType();
+if (event_sp->BroadcasterIs (&process->m_async_broadcaster))
 {
-const uint32_t event_type = event_sp->GetType();
-if

Re: [Lldb-commits] [PATCH] D12552: Fix deadlock while attaching to inferiors

2015-09-03 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246756: Fix deadlock while attaching to inferiors (authored 
by labath).

Changed prior to commit:
  http://reviews.llvm.org/D12552?vs=33795&id=33918#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12552

Files:
  lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
  lldb/trunk/test/dosep.py

Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
===
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -358,6 +358,7 @@
 Mutex m_last_stop_packet_mutex;
 GDBRemoteDynamicRegisterInfo m_register_info;
 Broadcaster m_async_broadcaster;
+Listener m_async_listener;
 HostThread m_async_thread;
 Mutex m_async_thread_state_mutex;
 typedef std::vector tid_collection;
Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -385,6 +385,7 @@
 m_last_stop_packet_mutex (Mutex::eMutexTypeRecursive),
 m_register_info (),
 m_async_broadcaster (NULL, "lldb.process.gdb-remote.async-broadcaster"),
+m_async_listener("lldb.process.gdb-remote.async-listener"),
 m_async_thread_state_mutex(Mutex::eMutexTypeRecursive),
 m_thread_ids (),
 m_jstopinfo_sp (),
@@ -406,6 +407,25 @@
 m_async_broadcaster.SetEventName (eBroadcastBitAsyncThreadShouldExit,   "async thread should exit");
 m_async_broadcaster.SetEventName (eBroadcastBitAsyncContinue,   "async thread continue");
 m_async_broadcaster.SetEventName (eBroadcastBitAsyncThreadDidExit,  "async thread did exit");
+
+Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_ASYNC));
+
+const uint32_t async_event_mask = eBroadcastBitAsyncContinue | eBroadcastBitAsyncThreadShouldExit;
+
+if (m_async_listener.StartListeningForEvents(&m_async_broadcaster, async_event_mask) != async_event_mask)
+{
+if (log)
+log->Printf("ProcessGDBRemote::%s failed to listen for m_async_broadcaster events", __FUNCTION__);
+}
+
+const uint32_t gdb_event_mask = Communication::eBroadcastBitReadThreadDidExit |
+GDBRemoteCommunication::eBroadcastBitGdbReadThreadGotNotify;
+if (m_async_listener.StartListeningForEvents(&m_gdb_comm, gdb_event_mask) != gdb_event_mask)
+{
+if (log)
+log->Printf("ProcessGDBRemote::%s failed to listen for m_gdb_comm events", __FUNCTION__);
+}
+
 const uint64_t timeout_seconds = GetGlobalPluginProperties()->GetPacketTimeout();
 if (timeout_seconds > 0)
 m_gdb_comm.SetPacketTimeout(timeout_seconds);
@@ -3761,184 +3781,174 @@
 if (log)
 log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread starting...", __FUNCTION__, arg, process->GetID());
 
-Listener listener ("ProcessGDBRemote::AsyncThread");
 EventSP event_sp;
-const uint32_t desired_event_mask = eBroadcastBitAsyncContinue |
-eBroadcastBitAsyncThreadShouldExit;
-
-if (listener.StartListeningForEvents (&process->m_async_broadcaster, desired_event_mask) == desired_event_mask)
+bool done = false;
+while (!done)
 {
-listener.StartListeningForEvents (&process->m_gdb_comm, Communication::eBroadcastBitReadThreadDidExit |
-GDBRemoteCommunication::eBroadcastBitGdbReadThreadGotNotify);
-
-bool done = false;
-while (!done)
+if (log)
+log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
+if (process->m_async_listener.WaitForEvent (NULL, event_sp))
 {
-if (log)
-log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
-if (listener.WaitForEvent (NULL, event_sp))
+const uint32_t event_type = event_sp->GetType();
+if (event_sp->BroadcasterIs (&process->m_async_broadcaster))
 {
-const uint32_t event_type = event_sp->GetType();
-if (event_sp->BroadcasterIs (&process->m_async_broadcaster))
+if (log)
+log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type);
+
+switch (event_type)
 {
-if (log)
- 

Re: [Lldb-commits] [PATCH] D12584: Fix TestCompletion.py failure on Darwin after r246639

2015-09-03 Thread Tamas Berghammer via lldb-commits
tberghammer accepted this revision.
tberghammer added a comment.
This revision is now accepted and ready to land.

I don't understand why it is necessary on OSX but I am fine with this change if 
it fixes the issue (at the moment I am struggling with building lldb on OSX so 
I can't test it).

One question: How many empty lines should we send? Is it always enough to send 
2, or should we send the same number of empty lines then the number of lines in 
the original command?


http://reviews.llvm.org/D12584



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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

I will reuse the Windows version - it comes from some BSD and it's modified.

At the moment I don't have a platform to test build it. Please verify whether 
everything is fine.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski updated this revision to Diff 33922.
krytarowski added a comment.

Reuse the Windows' GetOptInc.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582

Files:
  include/lldb/Host/HostGetOpt.h
  include/lldb/Host/common/GetOptInc.h
  include/lldb/Host/windows/getopt/GetOptInc.h
  source/Host/CMakeLists.txt
  source/Host/common/GetOptInc.cpp
  source/Host/windows/getopt/GetOptInc.cpp
  tools/lldb-mi/CMakeLists.txt

Index: tools/lldb-mi/CMakeLists.txt
===
--- tools/lldb-mi/CMakeLists.txt
+++ tools/lldb-mi/CMakeLists.txt
@@ -81,7 +81,7 @@
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   add_definitions( -DIMPORT_LIBLLDB )
   list(APPEND LLDB_MI_SOURCES
-${LLDB_SOURCE_ROOT}/Host/windows/getopt/GetOptInc.cpp
+${LLDB_SOURCE_ROOT}/Host/common/GetOptInc.cpp
 )
 endif ()
 
Index: source/Host/windows/getopt/GetOptInc.cpp
===
--- source/Host/windows/getopt/GetOptInc.cpp
+++ /dev/null
@@ -1,470 +0,0 @@
-#include "lldb/Host/windows/getopt/GetOptInc.h"
-
-// getopt.cpp
-#include 
-#include 
-#include 
-
-#if defined(__clang__) && defined(_MSC_VER)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wwritable-strings"
-#endif
-
-int opterr = 1; /* if error message should be printed */
-int optind = 1; /* index into parent argv vector */
-int optopt = '?';   /* character checked for validity */
-int optreset;   /* reset getopt */
-char *optarg;   /* argument associated with option */
-
-#define PRINT_ERROR ((opterr) && (*options != ':'))
-
-#define FLAG_PERMUTE0x01/* permute non-options to the end of argv */
-#define FLAG_ALLARGS0x02/* treat non-options as args to option "-1" */
-#define FLAG_LONGONLY   0x04/* operate as getopt_long_only */
-
-/* return values */
-#define BADCH   (int)'?'
-#define BADARG  ((*options == ':') ? (int)':' : (int)'?')
-#define INORDER (int)1
-
-#define EMSG""
-
-static int getopt_internal(int, char * const *, const char *,
-const struct option *, int *, int);
-static int parse_long_options(char * const *, const char *,
-const struct option *, int *, int);
-static int gcd(int, int);
-static void permute_args(int, int, int, char * const *);
-
-static char *place = EMSG; /* option letter processing */
-
-/* XXX: set optreset to 1 rather than these two */
-static int nonopt_start = -1; /* first non option argument (for permute) */
-static int nonopt_end = -1;   /* first option after non options (for permute) */
-
-/*
-* Compute the greatest common divisor of a and b.
-*/
-static int
-gcd(int a, int b)
-{
-int c;
-
-c = a % b;
-while (c != 0) {
-a = b;
-b = c;
-c = a % b;
-}
-
-return (b);
-}
-
-static void pass() {}
-#define warnx(a, ...) pass();
-
-/*
-* Exchange the block from nonopt_start to nonopt_end with the block
-* from nonopt_end to opt_end (keeping the same order of arguments
-* in each block).
-*/
-static void
-permute_args(int panonopt_start, int panonopt_end, int opt_end,
-char * const *nargv)
-{
-int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
-char *swap;
-
-/*
-* compute lengths of blocks and number and size of cycles
-*/
-nnonopts = panonopt_end - panonopt_start;
-nopts = opt_end - panonopt_end;
-ncycle = gcd(nnonopts, nopts);
-cyclelen = (opt_end - panonopt_start) / ncycle;
-
-for (i = 0; i < ncycle; i++) {
-cstart = panonopt_end + i;
-pos = cstart;
-for (j = 0; j < cyclelen; j++) {
-if (pos >= panonopt_end)
-pos -= nnonopts;
-else
-pos += nopts;
-swap = nargv[pos];
-/* LINTED const cast */
-((char **)nargv)[pos] = nargv[cstart];
-/* LINTED const cast */
-((char **)nargv)[cstart] = swap;
-}
-}
-}
-
-/*
-* parse_long_options --
-*  Parse long options in argc/argv argument vector.
-* Returns -1 if short_too is set and the option does not match long_options.
-*/
-static int
-parse_long_options(char * const *nargv, const char *options,
-const struct option *long_options, int *idx, int short_too)
-{
-char *current_argv, *has_equal;
-size_t current_argv_len;
-int i, match;
-
-current_argv = place;
-match = -1;
-
-optind++;
-
-if ((has_equal = strchr(current_argv, '=')) != NULL) {
-/* argument found (--option=arg) */
-current_argv_len = has_equal - current_argv;
-has_equal++;
-}
-else
-current_argv_len = strlen(current_argv);
-
-for (i = 0; long_options[i].name; i++) {
-/* find matching long option */
-if (strncmp(current_argv, long_options[i].name,
-current_argv_len))
-continue;
-
-if (strlen(long_options[i].name) == current_argv_len) {
-/* exact match */
-match = i;
- 

Re: [Lldb-commits] [lldb] r246709 - We want Python int or long to both be usable as-a tid_t for API purposes. Introduce a typemap to this effect

2015-09-03 Thread Pavel Labath via lldb-commits
Hi,
this commit seems to break TestPythonOSPlugin.py on the windows
builtbot 
and I expect any other 32-bit system. It fails with the error
"OverflowError: Python int too large to convert to C long", because
the test tries to pass a 64-bit tid_t and this does not fit when
sizeof(long) == 32. It sounds like the solution should be to use a
conversion to "long long" or some other 64-bit task, but i'm afraid my
swig-fu is not really up to the task. Should we use
PyInt_AsUnsignedLongLongMask() perhaps ?

pl

On 2 September 2015 at 21:53, Enrico Granata via lldb-commits
 wrote:
> Author: enrico
> Date: Wed Sep  2 15:53:43 2015
> New Revision: 246709
>
> URL: http://llvm.org/viewvc/llvm-project?rev=246709&view=rev
> Log:
> We want Python int or long to both be usable as-a tid_t for API purposes. 
> Introduce a typemap to this effect
>
> Modified:
> lldb/trunk/scripts/Python/python-typemaps.swig
>
> Modified: lldb/trunk/scripts/Python/python-typemaps.swig
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-typemaps.swig?rev=246709&r1=246708&r2=246709&view=diff
> ==
> --- lldb/trunk/scripts/Python/python-typemaps.swig (original)
> +++ lldb/trunk/scripts/Python/python-typemaps.swig Wed Sep  2 15:53:43 2015
> @@ -25,6 +25,18 @@
>}
>  }
>
> +%typemap(in) lldb::tid_t {
> +if (PyInt_Check($input))
> +$1 = PyInt_AsLong($input);
> +else if (PyLong_Check($input))
> +$1 = PyLong_AsLong($input);
> +else
> +{
> +PyErr_SetString(PyExc_ValueError, "Expecting an integer");
> +return NULL;
> +}
> +}
> +
>  %typemap(typecheck) char ** {
>/* Check if is a list  */
>$1 = 1;
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

In case that new commit message was lost, it's here:

commit 4193d823f0fdda0799c632c05836c2ed8f26186c
Author: Kamil Rytarowski 
Date:   Thu Sep 3 12:10:33 2015 +0200

  Move GetOptInc to the common namespace
  
  GetOptInc provides getopt(), getopt_long() and getopt_long_only().
  
  Windows (for defined(_MSC_VER)) doesn't ship with all of them.
  NetBSD just needs getopt_long_only().
  
  While there fix the code for clang diagnostics.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Pavel Labath via lldb-commits
labath added a comment.

Thanks for merging the two implementations. However, the way you have 
implemented it enables the getopt replacement for all platforms. We need to 
have it on only for platforms that don't have a native one.



Comment at: include/lldb/Host/HostGetOpt.h:11
@@ -10,3 +10,1 @@
 
-#ifndef _MSC_VER
-

How about just putting here
```
#if !defined(_MSC_VER) && !defined(__NetBSD__)
```


Comment at: source/Host/CMakeLists.txt:12
@@ -11,2 +11,3 @@
   common/FileSystem.cpp
+  common/GetOptInc.cpp
   common/Host.cpp

This will compile the file for all targets, which causes errors e.g. on linux. 
Either make the inclusion of this file conditional in cmake, or put the entire 
cpp file contents under appropriate ifdefs (windows or netbsd).


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


[Lldb-commits] [lldb] r246761 - Enable TestFdLeak on linux

2015-09-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Sep  3 07:00:15 2015
New Revision: 246761

URL: http://llvm.org/viewvc/llvm-project?rev=246761&view=rev
Log:
Enable TestFdLeak on linux

it has been consistently passing at least the last 100 builds on the bot.

Modified:
lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py

Modified: lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py?rev=246761&r1=246760&r2=246761&view=diff
==
--- lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py (original)
+++ lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py Thu Sep  3 
07:00:15 2015
@@ -13,7 +13,6 @@ class AvoidsFdLeakTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @expectedFailure(lambda x: sys.version_info >= (2, 7, 8), 
"bugs.freebsd.org/197376") # python random leaks fd
-@expectedFailureLinux # xfail flakey test to get buildbot green
 @skipIfWindows # The check for descriptor leakage needs to be implemented 
differently here.
 @skipIfTargetAndroid() # Android have some other file descriptors open by 
the shell
 def test_fd_leak_basic (self):


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


Re: [Lldb-commits] [PATCH] D12291: Add split dwarf support to SymbolFileDWARF

2015-09-03 Thread Tamas Berghammer via lldb-commits
tberghammer added inline comments.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:316-328
@@ +315,15 @@
+
+const char* dwo_name = cu_die.GetAttributeValueAsString(m_dwarf2Data,
+this,
+DW_AT_GNU_dwo_name,
+nullptr);
+if (!dwo_name)
+return;
+
+const char* comp_dir = cu_die.GetAttributeValueAsString(m_dwarf2Data,
+this,
+DW_AT_comp_dir,
+nullptr);
+if (!comp_dir)
+return;
+

clayborg wrote:
> Is DW_AT_GNU_dwo_name always a relative path?
I haven't seen absolute path in it so far, but it can be absolute. Added code 
to handle it.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:660
@@ -564,3 +659,3 @@
 {
-return m_dwarf2Data->DebugInfo()->GetDIE (die_offset);
+return m_dwarf2Data->DebugInfo()->GetDIE (DIERef(die_offset));
 }

clayborg wrote:
> Don't we need the compile unit to be encoded into the DIERef here?
No, we don't want to specify the compile unit here. We already checked that the 
specified DIE offset isn't belongs to the current compile unit. In this case we 
should try to get a DIE based on offset from the current symbol file. This can 
happen when a DIE refers to a value in a different compile unit inside the same 
file based on DIE offset


Comment at: source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp:161
@@ -145,3 +160,3 @@
 else
-return 
DWARFDIE(dwarf->DebugInfo()->GetCompileUnitContainingDIE(block_die->GetOffset()),
 block_die);
+return 
DWARFDIE(dwarf->DebugInfo()->GetCompileUnitContainingDIE(DIERef(cu->GetOffset(),
 block_die->GetOffset())), block_die);
 }

clayborg wrote:
> We probably should swift m_die->LookupAddress to take a "DWARFDIE 
> *function_die, DWARFDIE *block_die" instead of "DWARFDebugInfoEntry* 
> function_die, DWARFDebugInfoEntry* block_die". Then we can avoid doing the 
> manual combination of CU + offset here.
I would prefer to leave it as it is now because we have to do the manual 
combination at some point (because the returned DIE might be in a different CU 
then the current DIE) and moving it into LookupAddress will make that function 
even more complicated.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp:184
@@ +183,3 @@
+assert ((id&0xull) == 0 || m_cu->GetID() == 0);
+id |= ((lldb::user_id_t)m_cu->GetID()) << 32;
+}

clayborg wrote:
> The DWARFCompileUnit::GetID() already shifts the cu_offset over by 32, so we 
> will just lose the compile unit bits here.
SymbolFileDWARF does it, but DWARFCompileUnit isn't. With shifting by 32 we 
lose the SymbolFileDWARF id, but that one isn't considered to be part of the 
DIE ID.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1250
@@ -1180,2 +1249,3 @@
 dw_offset_t end_addr_offset = DW_INVALID_OFFSET;
-const dw_offset_t attr_offset = GetAttributeValue(dwarf2Data, cu, attr, 
form_value, &end_addr_offset);
+SymbolFileDWARF* attribute_symbol_file = nullptr;
+const dw_offset_t attr_offset = GetAttributeValue(dwarf2Data,

clayborg wrote:
> Not sure what you were thinking here? You init this with nullptr and then try 
> to use it below? Did you mean to init this with dwarf2Data? If so then we 
> don't need this? Otherwise, please fix
The function isn't used at all now, so I just removed it completely.

(I made the change here to fetch the block data from the correct symbol file, 
but one of the merge made it broken)


http://reviews.llvm.org/D12291



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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

I've inlined replies to your comments.



Comment at: include/lldb/Host/HostGetOpt.h:11
@@ -10,3 +10,1 @@
 
-#ifndef _MSC_VER
-

labath wrote:
> How about just putting here
> ```
> #if !defined(_MSC_VER) && !defined(__NetBSD__)
> ```
I dislike having two headers for the same purpose, can I just obsolete 
GetOptInc.h and put its content here?


Comment at: source/Host/CMakeLists.txt:12
@@ -11,2 +11,3 @@
   common/FileSystem.cpp
+  common/GetOptInc.cpp
   common/Host.cpp

labath wrote:
> This will compile the file for all targets, which causes errors e.g. on 
> linux. Either make the inclusion of this file conditional in cmake, or put 
> the entire cpp file contents under appropriate ifdefs (windows or netbsd).
I will put the entire file under #ifdefs, I will reuse the defines 
REPLACE_GETOPT from .h.

For platforms with all needed getopt(3) functions. I will add a dummy local 
variable, like static int getopt_dummy = 0; This will be needed to feed ld(1) 
on some toolchains.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12556: Use eAddressClassCode for address lookup for opcodes

2015-09-03 Thread Tamas Berghammer via lldb-commits
tberghammer retitled this revision from "Introduce new address class 
eAddressClassDataIntermixedCode" to "Use eAddressClassCode for address lookup 
for opcodes".
tberghammer updated the summary for this revision.
tberghammer updated this revision to Diff 33937.
tberghammer added a comment.

Address review comment


http://reviews.llvm.org/D12556

Files:
  source/Core/Address.cpp

Index: source/Core/Address.cpp
===
--- source/Core/Address.cpp
+++ source/Core/Address.cpp
@@ -371,7 +371,7 @@
 {
 addr_t code_addr = GetLoadAddress (target);
 if (code_addr != LLDB_INVALID_ADDRESS)
-code_addr = target->GetOpcodeLoadAddress (code_addr, 
GetAddressClass());
+code_addr = target->GetOpcodeLoadAddress (code_addr, 
eAddressClassCode);
 return code_addr;
 }
 
@@ -381,7 +381,7 @@
 if (SetLoadAddress (load_addr, target))
 {
 if (target)
-m_offset = target->GetOpcodeLoadAddress (m_offset, 
GetAddressClass());
+m_offset = target->GetOpcodeLoadAddress (m_offset, 
eAddressClassCode);
 return true;
 }
 return false;


Index: source/Core/Address.cpp
===
--- source/Core/Address.cpp
+++ source/Core/Address.cpp
@@ -371,7 +371,7 @@
 {
 addr_t code_addr = GetLoadAddress (target);
 if (code_addr != LLDB_INVALID_ADDRESS)
-code_addr = target->GetOpcodeLoadAddress (code_addr, GetAddressClass());
+code_addr = target->GetOpcodeLoadAddress (code_addr, eAddressClassCode);
 return code_addr;
 }
 
@@ -381,7 +381,7 @@
 if (SetLoadAddress (load_addr, target))
 {
 if (target)
-m_offset = target->GetOpcodeLoadAddress (m_offset, GetAddressClass());
+m_offset = target->GetOpcodeLoadAddress (m_offset, eAddressClassCode);
 return true;
 }
 return false;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Pavel Labath via lldb-commits
labath added inline comments.


Comment at: include/lldb/Host/HostGetOpt.h:11
@@ -10,3 +10,1 @@
 
-#ifndef _MSC_VER
-

krytarowski wrote:
> labath wrote:
> > How about just putting here
> > ```
> > #if !defined(_MSC_VER) && !defined(__NetBSD__)
> > ```
> I dislike having two headers for the same purpose, can I just obsolete 
> GetOptInc.h and put its content here?
I kinda like the idea where one header just select the correct implementation 
to use, and then the other headers contain the actual implementations. So it's 
not exactly the _same_ purpose for me. But I don't feel too strongly about 
that, so if you think it will make things cleaner, i guess you can go ahead.


Comment at: include/lldb/Host/common/GetOptInc.h:7
@@ +6,3 @@
+#define REPLACE_GETOPT
+#define REPLACE_GETOPT_LONG
+#endif

This macro will be defined twice for _MSC_VER. You only need one of these two 
definitions.


Comment at: include/lldb/Host/common/GetOptInc.h:10
@@ +9,3 @@
+#if defined(_MSC_VER) || defined(__NetBSD__)
+#define REPLACE_GETOPT_LONG
+#endif

second definition.


Comment at: source/Host/CMakeLists.txt:12
@@ -11,2 +11,3 @@
   common/FileSystem.cpp
+  common/GetOptInc.cpp
   common/Host.cpp

krytarowski wrote:
> labath wrote:
> > This will compile the file for all targets, which causes errors e.g. on 
> > linux. Either make the inclusion of this file conditional in cmake, or put 
> > the entire cpp file contents under appropriate ifdefs (windows or netbsd).
> I will put the entire file under #ifdefs, I will reuse the defines 
> REPLACE_GETOPT from .h.
> 
> For platforms with all needed getopt(3) functions. I will add a dummy local 
> variable, like static int getopt_dummy = 0; This will be needed to feed ld(1) 
> on some toolchains.
> I will put the entire file under #ifdefs, I will reuse the defines 
> REPLACE_GETOPT from .h.
Sounds good.

> For platforms with all needed getopt(3) functions. I will add a dummy local 
> variable, like static int getopt_dummy = 0; This will be needed to feed ld(1) 
> on some toolchains.
Why exactly is this necessary? Is there a linker that will not accept an empty 
.o file? We have a number of files #ifdefed completely and it seems to work 
fine (e.g. source/Plugins/Process/Linux/NativeRegisterContext*). So, unless you 
know of a particular linker that needs this thing I would leave it out for now.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski added inline comments.


Comment at: include/lldb/Host/HostGetOpt.h:11
@@ -10,3 +10,1 @@
 
-#ifndef _MSC_VER
-

labath wrote:
> krytarowski wrote:
> > labath wrote:
> > > How about just putting here
> > > ```
> > > #if !defined(_MSC_VER) && !defined(__NetBSD__)
> > > ```
> > I dislike having two headers for the same purpose, can I just obsolete 
> > GetOptInc.h and put its content here?
> I kinda like the idea where one header just select the correct implementation 
> to use, and then the other headers contain the actual implementations. So 
> it's not exactly the _same_ purpose for me. But I don't feel too strongly 
> about that, so if you think it will make things cleaner, i guess you can go 
> ahead.
I will do it your way.


Comment at: include/lldb/Host/common/GetOptInc.h:10
@@ +9,3 @@
+#if defined(_MSC_VER) || defined(__NetBSD__)
+#define REPLACE_GETOPT_LONG
+#endif

labath wrote:
> second definition.
Good catch, it must be REPLACE_GETOPT_LONG_ONLY here.


Comment at: source/Host/CMakeLists.txt:12
@@ -11,2 +11,3 @@
   common/FileSystem.cpp
+  common/GetOptInc.cpp
   common/Host.cpp

labath wrote:
> krytarowski wrote:
> > labath wrote:
> > > This will compile the file for all targets, which causes errors e.g. on 
> > > linux. Either make the inclusion of this file conditional in cmake, or 
> > > put the entire cpp file contents under appropriate ifdefs (windows or 
> > > netbsd).
> > I will put the entire file under #ifdefs, I will reuse the defines 
> > REPLACE_GETOPT from .h.
> > 
> > For platforms with all needed getopt(3) functions. I will add a dummy local 
> > variable, like static int getopt_dummy = 0; This will be needed to feed 
> > ld(1) on some toolchains.
> > I will put the entire file under #ifdefs, I will reuse the defines 
> > REPLACE_GETOPT from .h.
> Sounds good.
> 
> > For platforms with all needed getopt(3) functions. I will add a dummy local 
> > variable, like static int getopt_dummy = 0; This will be needed to feed 
> > ld(1) on some toolchains.
> Why exactly is this necessary? Is there a linker that will not accept an 
> empty .o file? We have a number of files #ifdefed completely and it seems to 
> work fine (e.g. source/Plugins/Process/Linux/NativeRegisterContext*). So, 
> unless you know of a particular linker that needs this thing I would leave it 
> out for now.
SunOS used to be one. But unless it's not supported I won't add this linker 
hack.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


[Lldb-commits] [lldb] r246766 - XFAIL TestFormatters on android (llvm.org/pr24691)

2015-09-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Sep  3 08:52:29 2015
New Revision: 246766

URL: http://llvm.org/viewvc/llvm-project?rev=246766&view=rev
Log:
XFAIL TestFormatters on android (llvm.org/pr24691)

the test is hitting an assertion in clang.

Modified:
lldb/trunk/test/expression_command/formatters/TestFormatters.py

Modified: lldb/trunk/test/expression_command/formatters/TestFormatters.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/formatters/TestFormatters.py?rev=246766&r1=246765&r2=246766&view=diff
==
--- lldb/trunk/test/expression_command/formatters/TestFormatters.py (original)
+++ lldb/trunk/test/expression_command/formatters/TestFormatters.py Thu Sep  3 
08:52:29 2015
@@ -28,6 +28,8 @@ class ExprFormattersTestCase(TestBase):
 @expectedFailureFreeBSD('llvm.org/pr19011') # Newer Clang omits C1 
complete object constructor
 @expectedFailureLinux('llvm.org/pr19011', ['clang'])
 @expectedFailureWindows("llvm.org/pr21765")
+@skipIfTargetAndroid() # skipping to avoid crashing the test runner
+@expectedFailureAndroid('llvm.org/pr24691') # we hit an assertion in clang
 @dwarf_test
 def test_with_dwarf(self):
 """Test expr + formatters for good interoperability."""


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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski updated this revision to Diff 33941.
krytarowski added a comment.

Apply the latest comments to this patch.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582

Files:
  include/lldb/Host/HostGetOpt.h
  include/lldb/Host/common/GetOptInc.h
  include/lldb/Host/windows/getopt/GetOptInc.h
  source/Host/CMakeLists.txt
  source/Host/common/GetOptInc.cpp
  source/Host/windows/getopt/GetOptInc.cpp
  tools/lldb-mi/CMakeLists.txt

Index: tools/lldb-mi/CMakeLists.txt
===
--- tools/lldb-mi/CMakeLists.txt
+++ tools/lldb-mi/CMakeLists.txt
@@ -81,7 +81,7 @@
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   add_definitions( -DIMPORT_LIBLLDB )
   list(APPEND LLDB_MI_SOURCES
-${LLDB_SOURCE_ROOT}/Host/windows/getopt/GetOptInc.cpp
+${LLDB_SOURCE_ROOT}/Host/common/GetOptInc.cpp
 )
 endif ()
 
Index: source/Host/windows/getopt/GetOptInc.cpp
===
--- source/Host/windows/getopt/GetOptInc.cpp
+++ /dev/null
@@ -1,470 +0,0 @@
-#include "lldb/Host/windows/getopt/GetOptInc.h"
-
-// getopt.cpp
-#include 
-#include 
-#include 
-
-#if defined(__clang__) && defined(_MSC_VER)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wwritable-strings"
-#endif
-
-int opterr = 1; /* if error message should be printed */
-int optind = 1; /* index into parent argv vector */
-int optopt = '?';   /* character checked for validity */
-int optreset;   /* reset getopt */
-char *optarg;   /* argument associated with option */
-
-#define PRINT_ERROR ((opterr) && (*options != ':'))
-
-#define FLAG_PERMUTE0x01/* permute non-options to the end of argv */
-#define FLAG_ALLARGS0x02/* treat non-options as args to option "-1" */
-#define FLAG_LONGONLY   0x04/* operate as getopt_long_only */
-
-/* return values */
-#define BADCH   (int)'?'
-#define BADARG  ((*options == ':') ? (int)':' : (int)'?')
-#define INORDER (int)1
-
-#define EMSG""
-
-static int getopt_internal(int, char * const *, const char *,
-const struct option *, int *, int);
-static int parse_long_options(char * const *, const char *,
-const struct option *, int *, int);
-static int gcd(int, int);
-static void permute_args(int, int, int, char * const *);
-
-static char *place = EMSG; /* option letter processing */
-
-/* XXX: set optreset to 1 rather than these two */
-static int nonopt_start = -1; /* first non option argument (for permute) */
-static int nonopt_end = -1;   /* first option after non options (for permute) */
-
-/*
-* Compute the greatest common divisor of a and b.
-*/
-static int
-gcd(int a, int b)
-{
-int c;
-
-c = a % b;
-while (c != 0) {
-a = b;
-b = c;
-c = a % b;
-}
-
-return (b);
-}
-
-static void pass() {}
-#define warnx(a, ...) pass();
-
-/*
-* Exchange the block from nonopt_start to nonopt_end with the block
-* from nonopt_end to opt_end (keeping the same order of arguments
-* in each block).
-*/
-static void
-permute_args(int panonopt_start, int panonopt_end, int opt_end,
-char * const *nargv)
-{
-int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
-char *swap;
-
-/*
-* compute lengths of blocks and number and size of cycles
-*/
-nnonopts = panonopt_end - panonopt_start;
-nopts = opt_end - panonopt_end;
-ncycle = gcd(nnonopts, nopts);
-cyclelen = (opt_end - panonopt_start) / ncycle;
-
-for (i = 0; i < ncycle; i++) {
-cstart = panonopt_end + i;
-pos = cstart;
-for (j = 0; j < cyclelen; j++) {
-if (pos >= panonopt_end)
-pos -= nnonopts;
-else
-pos += nopts;
-swap = nargv[pos];
-/* LINTED const cast */
-((char **)nargv)[pos] = nargv[cstart];
-/* LINTED const cast */
-((char **)nargv)[cstart] = swap;
-}
-}
-}
-
-/*
-* parse_long_options --
-*  Parse long options in argc/argv argument vector.
-* Returns -1 if short_too is set and the option does not match long_options.
-*/
-static int
-parse_long_options(char * const *nargv, const char *options,
-const struct option *long_options, int *idx, int short_too)
-{
-char *current_argv, *has_equal;
-size_t current_argv_len;
-int i, match;
-
-current_argv = place;
-match = -1;
-
-optind++;
-
-if ((has_equal = strchr(current_argv, '=')) != NULL) {
-/* argument found (--option=arg) */
-current_argv_len = has_equal - current_argv;
-has_equal++;
-}
-else
-current_argv_len = strlen(current_argv);
-
-for (i = 0; long_options[i].name; i++) {
-/* find matching long option */
-if (strncmp(current_argv, long_options[i].name,
-current_argv_len))
-continue;
-
-if (strlen(long_options[i].name) == current_argv_len) {
-/* exact match */
-match = i;

Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Pavel Labath via lldb-commits
labath added a comment.

Looks good after fixing inverting one condition, but I would like to wait for 
an ok from zachary also. Linux builds fine after this patch.



Comment at: source/Host/common/GetOptInc.cpp:3
@@ +2,3 @@
+
+#if !defined(REPLACE_GETOPT) && !defined(REPLACE_GETOPT_LONG) && 
!defined(REPLACE_GETOPT_LONG_ONLY)
+

You have the logic reversed here. This should be #if defined(FOO) || 
defined(BAR) || defined(BAZ)


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D12587#239054, @labath wrote:

> I very much like the direction this is going in. We will need to update our 
> buildbots when this lands (we need to run dosep manually to setup remote 
> testing), but I have tested this manually and didn't see any problems.


Good catch, indeed!


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added inline comments.


Comment at: test/dosep.py:503
@@ +502,3 @@
+"Please call dotest.py directly.  The dosep.py-specific arguments "
+"have been added under the Parallel processing arguments.")
+sys.exit(128)

labath wrote:
> You should print a \n after this message.
Yes, good catch.


http://reviews.llvm.org/D12587



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


[Lldb-commits] [PATCH] D12599: Only export public symbols with the cmake build.

2015-09-03 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added reviewers: emaste, clayborg, labath, chaoren.
brucem added a subscriber: lldb-commits.

This also moves the xcode support files to be near or the same
as the ones used for cmake.

The source/API/liblldb.xcodes.exports differs from the
source/API/liblldb.exports in that one contains the actual
symbol names (_ prefixed) while the other contains the symbol
names as they are in the code. The liblldb.exports file is
preprocessed by the cmake scripts into the correct per-platform
file needed (like a linker script on Linux).

This is not enabled on Windows as Windows doesn't use the same
name mangling and so it won't be valid there. Also, this is handled
already in a different way on Windows (via dll exports).

http://reviews.llvm.org/D12599

Files:
  lldb.xcodeproj/project.pbxproj
  resources/lldb-framework-exports
  source/API/CMakeLists.txt
  source/API/liblldb.exports
  source/API/liblldb.xcode.exports
  tools/argdumper/argdumper.exports
  tools/argdumper/exports
  tools/lldb-mi/lldb-mi.exports
  tools/lldb-server/exports
  tools/lldb-server/lldb-server.exports

Index: resources/lldb-framework-exports
===
--- /dev/null
+++ resources/lldb-framework-exports
@@ -1,3 +0,0 @@
-__ZN4lldb*
-__ZNK4lldb*
-_init_lld*
Index: source/API/liblldb.exports
===
--- /dev/null
+++ source/API/liblldb.exports
@@ -0,0 +1,3 @@
+_ZN4lldb*
+_ZNK4lldb*
+init_lld*
Index: source/API/CMakeLists.txt
===
--- source/API/CMakeLists.txt
+++ source/API/CMakeLists.txt
@@ -82,6 +82,10 @@
   VERSION ${LLDB_VERSION}
   )
 
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+  add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
+endif()
+
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
   # so only it needs to explicitly link against ${PYTHON_LIBRARY}
Index: lldb.xcodeproj/project.pbxproj
===
--- lldb.xcodeproj/project.pbxproj
+++ lldb.xcodeproj/project.pbxproj
@@ -7257,7 +7257,7 @@
 CURRENT_PROJECT_VERSION = 350.99.0;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7330,7 +7330,7 @@
 DEAD_CODE_STRIPPING = YES;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7720,7 +7720,7 @@
 DEAD_CODE_STRIPPING = YES;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8007,7 +8007,7 @@
 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 "CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
 DEAD_CODE_STRIPPING = YES;
-EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8080,7 +8080,7 @@
 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 "CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
 DEAD_CODE_STRIPPING = YES;
-EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8150,7 +8150,7 @@
 			buildSettings = {
 COPY_PHASE_STRIP = YES;
 DEAD_CODE_STRIPPING = YES;
-EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8430,7 +8430,7 @@
 CURRENT_PROJECT_VERSION = 350.99.0;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8556,7 +8556,7 @@
 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 "CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
 DEAD_CODE_STRIPPING = YES;
-EXPOR

Re: [Lldb-commits] [PATCH] D12599: Only export public symbols with the cmake build.

2015-09-03 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

This uses some machinery from LLVM's cmake scripts.

I'm not sure what happens with this on FreeBSD, NetBSD, etc.


http://reviews.llvm.org/D12599



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


Re: [Lldb-commits] [PATCH] D12599: Only export public symbols with the cmake build.

2015-09-03 Thread Pavel Labath via lldb-commits
labath added a comment.

The linux parts are ok. This reduces the size of liblldb by about 13%. Good 
work. :)


http://reviews.llvm.org/D12599



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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski updated this revision to Diff 33944.
krytarowski added a comment.

Inverse wrong logic


Repository:
  rL LLVM

http://reviews.llvm.org/D12582

Files:
  include/lldb/Host/HostGetOpt.h
  include/lldb/Host/common/GetOptInc.h
  include/lldb/Host/windows/getopt/GetOptInc.h
  source/Host/CMakeLists.txt
  source/Host/common/GetOptInc.cpp
  source/Host/windows/getopt/GetOptInc.cpp
  tools/lldb-mi/CMakeLists.txt

Index: tools/lldb-mi/CMakeLists.txt
===
--- tools/lldb-mi/CMakeLists.txt
+++ tools/lldb-mi/CMakeLists.txt
@@ -81,7 +81,7 @@
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   add_definitions( -DIMPORT_LIBLLDB )
   list(APPEND LLDB_MI_SOURCES
-${LLDB_SOURCE_ROOT}/Host/windows/getopt/GetOptInc.cpp
+${LLDB_SOURCE_ROOT}/Host/common/GetOptInc.cpp
 )
 endif ()
 
Index: source/Host/windows/getopt/GetOptInc.cpp
===
--- source/Host/windows/getopt/GetOptInc.cpp
+++ /dev/null
@@ -1,470 +0,0 @@
-#include "lldb/Host/windows/getopt/GetOptInc.h"
-
-// getopt.cpp
-#include 
-#include 
-#include 
-
-#if defined(__clang__) && defined(_MSC_VER)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wwritable-strings"
-#endif
-
-int opterr = 1; /* if error message should be printed */
-int optind = 1; /* index into parent argv vector */
-int optopt = '?';   /* character checked for validity */
-int optreset;   /* reset getopt */
-char *optarg;   /* argument associated with option */
-
-#define PRINT_ERROR ((opterr) && (*options != ':'))
-
-#define FLAG_PERMUTE0x01/* permute non-options to the end of argv */
-#define FLAG_ALLARGS0x02/* treat non-options as args to option "-1" */
-#define FLAG_LONGONLY   0x04/* operate as getopt_long_only */
-
-/* return values */
-#define BADCH   (int)'?'
-#define BADARG  ((*options == ':') ? (int)':' : (int)'?')
-#define INORDER (int)1
-
-#define EMSG""
-
-static int getopt_internal(int, char * const *, const char *,
-const struct option *, int *, int);
-static int parse_long_options(char * const *, const char *,
-const struct option *, int *, int);
-static int gcd(int, int);
-static void permute_args(int, int, int, char * const *);
-
-static char *place = EMSG; /* option letter processing */
-
-/* XXX: set optreset to 1 rather than these two */
-static int nonopt_start = -1; /* first non option argument (for permute) */
-static int nonopt_end = -1;   /* first option after non options (for permute) */
-
-/*
-* Compute the greatest common divisor of a and b.
-*/
-static int
-gcd(int a, int b)
-{
-int c;
-
-c = a % b;
-while (c != 0) {
-a = b;
-b = c;
-c = a % b;
-}
-
-return (b);
-}
-
-static void pass() {}
-#define warnx(a, ...) pass();
-
-/*
-* Exchange the block from nonopt_start to nonopt_end with the block
-* from nonopt_end to opt_end (keeping the same order of arguments
-* in each block).
-*/
-static void
-permute_args(int panonopt_start, int panonopt_end, int opt_end,
-char * const *nargv)
-{
-int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
-char *swap;
-
-/*
-* compute lengths of blocks and number and size of cycles
-*/
-nnonopts = panonopt_end - panonopt_start;
-nopts = opt_end - panonopt_end;
-ncycle = gcd(nnonopts, nopts);
-cyclelen = (opt_end - panonopt_start) / ncycle;
-
-for (i = 0; i < ncycle; i++) {
-cstart = panonopt_end + i;
-pos = cstart;
-for (j = 0; j < cyclelen; j++) {
-if (pos >= panonopt_end)
-pos -= nnonopts;
-else
-pos += nopts;
-swap = nargv[pos];
-/* LINTED const cast */
-((char **)nargv)[pos] = nargv[cstart];
-/* LINTED const cast */
-((char **)nargv)[cstart] = swap;
-}
-}
-}
-
-/*
-* parse_long_options --
-*  Parse long options in argc/argv argument vector.
-* Returns -1 if short_too is set and the option does not match long_options.
-*/
-static int
-parse_long_options(char * const *nargv, const char *options,
-const struct option *long_options, int *idx, int short_too)
-{
-char *current_argv, *has_equal;
-size_t current_argv_len;
-int i, match;
-
-current_argv = place;
-match = -1;
-
-optind++;
-
-if ((has_equal = strchr(current_argv, '=')) != NULL) {
-/* argument found (--option=arg) */
-current_argv_len = has_equal - current_argv;
-has_equal++;
-}
-else
-current_argv_len = strlen(current_argv);
-
-for (i = 0; long_options[i].name; i++) {
-/* find matching long option */
-if (strncmp(current_argv, long_options[i].name,
-current_argv_len))
-continue;
-
-if (strlen(long_options[i].name) == current_argv_len) {
-/* exact match */
-match = i;
-break;

[Lldb-commits] [lldb] r246777 - Mark TestAttachResume as flaky on linux

2015-09-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Sep  3 10:44:16 2015
New Revision: 246777

URL: http://llvm.org/viewvc/llvm-project?rev=246777&view=rev
Log:
Mark TestAttachResume as flaky on linux

There is a more race condition regarding process detach, which this test 
exposes, marking as
flaky until it is fixed.

Modified:
lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py

Modified: lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py?rev=246777&r1=246776&r2=246777&view=diff
==
--- lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py (original)
+++ lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py Thu Sep  
3 10:44:16 2015
@@ -15,6 +15,7 @@ class AttachResumeTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @expectedFailureFreeBSD('llvm.org/pr19310')
+@expectedFlakeyLinux('llvm.org/pr19310')
 @skipIfRemote
 @dwarf_test
 def test_attach_continue_interrupt_detach(self):


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


[Lldb-commits] [lldb] r246776 - Fix logging message

2015-09-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Sep  3 10:44:14 2015
New Revision: 246776

URL: http://llvm.org/viewvc/llvm-project?rev=246776&view=rev
Log:
Fix logging message

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

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=246776&r1=246775&r2=246776&view=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Sep  3 10:44:14 2015
@@ -3920,7 +3920,7 @@ Process::HaltForDestroyOrDetach(lldb::Ev
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
 if (log)
-log->Printf("Process::Destroy() About to halt.");
+log->Printf("Process::%s() About to halt.", __FUNCTION__);
 error = Halt();
 if (error.Success())
 {


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


[Lldb-commits] [PATCH] D12601: Fix TestLoadUnload.test_load_unload for android API > 21

2015-09-03 Thread Tamas Berghammer via lldb-commits
tberghammer created this revision.
tberghammer added a reviewer: ovyalov.
tberghammer added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer.

Fix TestLoadUnload.test_load_unload for android API > 21

* Change Module::MatchesModuleSpec to return true in case the file spec
  in the specified module spec matches with the platform file spec, but
  not with the local file spec
* Change the module_resolver used when resolving a remote shared module
  to always set the platform file spec to the file spec requested

http://reviews.llvm.org/D12601

Files:
  source/Core/Module.cpp
  source/Target/Platform.cpp

Index: source/Target/Platform.cpp
===
--- source/Target/Platform.cpp
+++ source/Target/Platform.cpp
@@ -272,8 +272,11 @@
   module_sp,
   [&](const ModuleSpec &spec)
   {
-  return ModuleList::GetSharedModule (
+  Error error = 
ModuleList::GetSharedModule (
   spec, module_sp, 
module_search_paths_ptr, old_module_sp_ptr, did_create_ptr, false);
+  if (error.Success() && module_sp)
+  
module_sp->SetPlatformFileSpec(spec.GetFileSpec());
+  return error;
   },
   did_create_ptr);
 }
Index: source/Core/Module.cpp
===
--- source/Core/Module.cpp
+++ source/Core/Module.cpp
@@ -1708,7 +1708,8 @@
 const FileSpec &file_spec = module_ref.GetFileSpec();
 if (file_spec)
 {
-if (!FileSpec::Equal (file_spec, m_file, 
(bool)file_spec.GetDirectory()))
+if (!FileSpec::Equal (file_spec, m_file, 
(bool)file_spec.GetDirectory()) &&
+!FileSpec::Equal (file_spec, m_platform_file, 
(bool)file_spec.GetDirectory()))
 return false;
 }
 


Index: source/Target/Platform.cpp
===
--- source/Target/Platform.cpp
+++ source/Target/Platform.cpp
@@ -272,8 +272,11 @@
   module_sp,
   [&](const ModuleSpec &spec)
   {
-  return ModuleList::GetSharedModule (
+  Error error = ModuleList::GetSharedModule (
   spec, module_sp, module_search_paths_ptr, old_module_sp_ptr, did_create_ptr, false);
+  if (error.Success() && module_sp)
+  module_sp->SetPlatformFileSpec(spec.GetFileSpec());
+  return error;
   },
   did_create_ptr);
 }
Index: source/Core/Module.cpp
===
--- source/Core/Module.cpp
+++ source/Core/Module.cpp
@@ -1708,7 +1708,8 @@
 const FileSpec &file_spec = module_ref.GetFileSpec();
 if (file_spec)
 {
-if (!FileSpec::Equal (file_spec, m_file, (bool)file_spec.GetDirectory()))
+if (!FileSpec::Equal (file_spec, m_file, (bool)file_spec.GetDirectory()) &&
+!FileSpec::Equal (file_spec, m_platform_file, (bool)file_spec.GetDirectory()))
 return false;
 }
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala updated this revision to Diff 33951.
tfiala added a comment.

Added newline to dosep.py error sent via sys.stderr.write() when called 
directly.


http://reviews.llvm.org/D12587

Files:
  test/CMakeLists.txt
  test/Makefile
  test/dosep.py
  test/dotest.py
  test/dotest_args.py
  www/test.html

Index: www/test.html
===
--- www/test.html
+++ www/test.html
@@ -67,19 +67,30 @@
 
 
 
-  Besides dotest.py, there is also dosep.py, which runs
-  multiple instances of dotest.py in parallel, thereby greatly
-  decreasing the time it takes to run the full testsuite. The number of concurrent
-  tests is controlled by the LLDB_TEST_THREADS environment variable or
-  the --threads command line parameter. The default value is the number
-  of CPUs on your system. To pass additional options to dotest.py,
-  specify those options as an -o argument to dosep.py. For
-  example, the command
+  The dotest.py script runs tests in parallel by default.
+  To disable the parallel test running feature, use the
+  --no-multiprocess flag. The number of
+  concurrent tests is controlled by
+  the LLDB_TEST_THREADS environment variable
+  or the --threads command line parameter.
+  The default value is the number of CPU cores on your
+  system.
 
-python dosep.py -o "--executable bin/lldb -C bin/clang"
 
-  will specify the lldb and clang executables to test for each dotest invocation.
-  ninja check-lldb is wrapper around dosep.py.
+  The parallel test running feature will handle an
+  additional --test-subdir SUBDIR arg.  When
+  specified, SUBDIR is relative to the root test directory
+  and will limit all parallel test running to that
+  sudirectory's tree of tests.
+
+
+  The parallel test runner will run all tests within a
+  given directory serially, but will run multiple
+  directories concurrently.  Thus, as a test writer, we
+  provide serialized test run semantics within a
+  directory.  Note child directories are considered
+  entirely separate, so two child directories could be
+  running in parallel with a parent directory.
 
 
 Running the test-suite remotely
Index: test/dotest_args.py
===
--- test/dotest_args.py
+++ test/dotest_args.py
@@ -107,6 +107,33 @@
 group.set_defaults(disable_crash_dialog=True)
 group.set_defaults(hide_inferior_console=True)
 
+group = parser.add_argument_group('Parallel execution options')
+group.add_argument(
+'--inferior',
+action='store_true',
+help=('specify this invocation is a multiprocess inferior, '
+  'used internally'))
+group.add_argument(
+'--no-multiprocess',
+action='store_true',
+help='skip running the multiprocess test runner')
+group.add_argument(
+'--output-on-success',
+action='store_true',
+help=('print full output of the dotest.py inferior, '
+  'even when all tests succeed'))
+group.add_argument(
+'--threads',
+type=int,
+dest='num_threads',
+help=('The number of threads/processes to use when running tests '
+  'separately, defaults to the number of CPU cores available'))
+parser.add_argument(
+'--test-subdir',
+action='store',
+help='Specify a test subdirectory to use relative to the test root dir'
+)
+
 # Remove the reference to our helper function
 del X
 
Index: test/dotest.py
===
--- test/dotest.py
+++ test/dotest.py
@@ -29,8 +29,6 @@
 import signal
 import subprocess
 import sys
-import textwrap
-import time
 import inspect
 import unittest2
 import lldbtest_config
@@ -245,6 +243,13 @@
 lldb_platform_url = None
 lldb_platform_working_dir = None
 
+# Parallel execution settings
+is_inferior_test_runner = False
+multiprocess_test_subdir = None
+num_threads = None
+output_on_success = False
+no_multiprocess_test_runner = False
+
 def usage(parser):
 parser.print_help()
 if verbose > 0:
@@ -485,6 +490,11 @@
 global lldb_platform_url
 global lldb_platform_working_dir
 global setCrashInfoHook
+global is_inferior_test_runner
+global multiprocess_test_subdir
+global num_threads
+global output_on_success
+global no_multiprocess_test_runner
 
 do_help = False
 
@@ -493,7 +503,7 @@
 
 parser = dotest_args.create_parser()
 args = dotest_args.parse_args(parser, sys.argv

Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Also, I should mention this was tested on OS X in addition to Linux.

Let me know when you get a chance to run it on Windows, Zachary.

> Are there any plans to actually just kill dosep.py at some point?


Hmm not seeing my response to this from my phone last night, so at the cost of 
potentially repeating:
Absolutely.  I think there is a fair amount of cleanup that could happen to the 
test running code.  I'd expect later to see the dosep.py functionality turn 
into an LLDBTestRunner class or something similar, with a concrete impl for the 
single-serialized running and a separate one for multithreaded running.   There 
are many areas that could be cleaned up (both in terms of code organization and 
things like pep8/pylint --- a few of which I took care of in this change but 
the majority of which I left unchanged).

My goal for this particular change was to be minimally different at the 
implementation level to simplify the transition --- get the user interface 
right (no dosep.py from the user's point of view).  In using a minimal 
implementation change, I'm also hopeful to avoid things like breaking the 
Windows build.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D11102: Set the default language to use when evaluating to that of the frame's CU.

2015-09-03 Thread Sean Callanan via lldb-commits
spyffe accepted this revision.
spyffe added a comment.

Looks good to me.  Thanks, Dawn.


Repository:
  rL LLVM

http://reviews.llvm.org/D11102



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


[Lldb-commits] [lldb] r246783 - i386 and i686 are equivalent, update the test accordingly.

2015-09-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Sep  3 11:41:31 2015
New Revision: 246783

URL: http://llvm.org/viewvc/llvm-project?rev=246783&view=rev
Log:
i386 and i686 are equivalent, update the test accordingly.

Modified:
lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py

Modified: 
lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=246783&r1=246782&r2=246783&view=diff
==
--- lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py 
(original)
+++ lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py 
Thu Sep  3 11:41:31 2015
@@ -38,7 +38,7 @@ class DisassemblyTestCase(TestBase):
 disassembly = self.res.GetOutput()
 
 # ARCH, if not specified, defaults to x86_64.
-if self.getArchitecture() in ["", 'x86_64', 'i386']:
+if self.getArchitecture() in ["", 'x86_64', 'i386', 'i686']:
 breakpoint_opcodes = ["int3"]
 instructions = [' mov', ' addl ', 'ret']
 elif self.getArchitecture() in ["arm", "aarch64"]:


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


[Lldb-commits] [PATCH] D12602: Separate ClangExpressionVariable from ExpressionVariable

2015-09-03 Thread Sean Callanan via lldb-commits
spyffe created this revision.
spyffe added a reviewer: jingham.
spyffe added a subscriber: lldb-commits.
spyffe set the repository for this revision to rL LLVM.

This patch separates the generic portion of ClangExpressionVariable, which 
stores information about a variable that different parts of LLDB use, from the 
compiler-specific portion that only the expression parser cares about.

Repository:
  rL LLVM

http://reviews.llvm.org/D12602

Files:
  include/lldb/Core/ValueObject.h
  include/lldb/Expression/ClangExpressionDeclMap.h
  include/lldb/Expression/ClangFunction.h
  include/lldb/Expression/ClangPersistentVariables.h
  include/lldb/Expression/ClangUserExpression.h
  include/lldb/Expression/ClangUtilityFunction.h
  include/lldb/Expression/ExpressionVariable.h
  include/lldb/Expression/Materializer.h
  include/lldb/Target/StopInfo.h
  include/lldb/Target/Thread.h
  include/lldb/Target/ThreadPlan.h
  include/lldb/Target/ThreadPlanCallUserExpression.h
  include/lldb/lldb-forward.h
  source/API/SBFrame.cpp
  source/Breakpoint/BreakpointLocation.cpp
  source/Core/FormatEntity.cpp
  source/Core/ValueObject.cpp
  source/Expression/ClangExpressionDeclMap.cpp
  source/Expression/ClangPersistentVariables.cpp
  source/Expression/ClangUserExpression.cpp
  source/Expression/ExpressionVariable.cpp
  source/Expression/Materializer.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
  source/Target/ABI.cpp
  source/Target/StopInfo.cpp
  source/Target/Target.cpp
  source/Target/Thread.cpp

Index: include/lldb/lldb-forward.h
===
--- include/lldb/lldb-forward.h
+++ include/lldb/lldb-forward.h
@@ -52,8 +52,6 @@
 class   ClangExpressionDeclMap;
 class   ClangExpressionParser;
 class   ClangExpressionVariable;
-class   ClangExpressionVariableList;
-class   ClangExpressionVariableList;
 class   ClangExpressionVariables;
 class   ClangFunction;
 class   ClangModulesDeclVendor;
@@ -95,6 +93,8 @@
 class   ExecutionContextRef;
 class   ExecutionContextRefLocker;
 class   ExecutionContextScope;
+class   ExpressionVariable;
+class   ExpressionVariableList;
 class   File;
 class   FileSpec;
 class   FileSpecList;
@@ -305,7 +305,6 @@
 typedef std::unique_ptr ClangASTContextUP;
 typedef std::unique_ptr ClangASTImporterUP;
 typedef std::unique_ptr ClangASTSourceUP;
-typedef std::shared_ptr ClangExpressionVariableSP;
 typedef std::unique_ptr ClangModulesDeclVendorUP;
 typedef std::unique_ptr ClangPersistentVariablesUP;
 typedef std::shared_ptr ClangUserExpressionSP;
@@ -323,6 +322,7 @@
 typedef std::unique_ptr DynamicLoaderUP;
 typedef std::shared_ptr EventSP;
 typedef std::shared_ptr ExecutionContextRefSP;
+typedef std::shared_ptr ExpressionVariableSP;
 typedef std::shared_ptr FileSP;
 typedef std::shared_ptr FunctionSP;
 typedef std::shared_ptr FuncUnwindersSP;
Index: include/lldb/Target/ThreadPlanCallUserExpression.h
===
--- include/lldb/Target/ThreadPlanCallUserExpression.h
+++ include/lldb/Target/ThreadPlanCallUserExpression.h
@@ -52,7 +52,7 @@
 m_manage_materialization = true;
 }
 
-lldb::ClangExpressionVariableSP
+lldb::ExpressionVariableSP
 GetExpressionVariable() override
 {
 return m_result_var_sp;
@@ -64,7 +64,7 @@
  // User expression the initiated this ThreadPlan
  // lives as long as the thread plan does.
 bool m_manage_materialization = false;
-lldb::ClangExpressionVariableSP m_result_var_sp; // If we are left to manage the materialization,
+lldb::ExpressionVariableSP m_result_var_sp; // If we are left to manage the materialization,
  // then stuff the result expression variable here.
 
 DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);
Index: include/lldb/Target/ThreadPlan.h
===
--- include/lldb/Target/ThreadPlan.h
+++ include/lldb/Target/ThreadPlan.h
@@ -519,10 +519,10 @@
 // the user regained control at that point) a subsequent process control command step/continue/etc. might
 // complete the expression evaluations.  If so, the result of the expression evaluation will show up here.
 
-virtual lldb::ClangExpressionVariableSP
+virtual lldb::ExpressionVariableSP
 GetExpressionVariable ()
 {
-return lldb::ClangExpressionVariableSP();
+return lldb::ExpressionVariableSP();
 }
 
 // If a thread plan stores the state before it was run, then you might
Index: include/lldb/Target/Thread.h
===
--- include/lldb/Target/Thread.h
+++ include/lldb/Targe

Re: [Lldb-commits] [PATCH] D12599: Only export public symbols with the cmake build.

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a subscriber: tfiala.
tfiala added a comment.

In http://reviews.llvm.org/D12599#239281, @labath wrote:

> The linux parts are ok. This reduces the size of liblldb by about 13%. Good 
> work. :)


13% size decrease sounds nice!  Was that with a DebugAsserts build, optimized, 
or what?


http://reviews.llvm.org/D12599



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


[Lldb-commits] [lldb] r246787 - NetBSD ships with paccept(2), a superset of accept4(2)

2015-09-03 Thread Stephane Sezer via lldb-commits
Author: sas
Date: Thu Sep  3 12:11:31 2015
New Revision: 246787

URL: http://llvm.org/viewvc/llvm-project?rev=246787&view=rev
Log:
NetBSD ships with paccept(2), a superset of accept4(2)

Summary: accept4(2) and paccept(2) are nonstandard extensions.

Reviewers: joerg, sas

Subscribers: emaste, sas, lldb-commits

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

Change by Kamil Rytarowski 

Modified:
lldb/trunk/source/Host/common/Socket.cpp

Modified: lldb/trunk/source/Host/common/Socket.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Socket.cpp?rev=246787&r1=246786&r2=246787&view=diff
==
--- lldb/trunk/source/Host/common/Socket.cpp (original)
+++ lldb/trunk/source/Host/common/Socket.cpp Thu Sep  3 12:11:31 2015
@@ -93,7 +93,11 @@ NativeSocket Accept(NativeSocket sockfd,
 if (!child_processes_inherit) {
 flags |= SOCK_CLOEXEC;
 }
+#if defined(__NetBSD__)
+return ::paccept (sockfd, addr, addrlen, NULL, flags);
+#else
 return ::accept4 (sockfd, addr, addrlen, flags);
+#endif
 #else
 return ::accept (sockfd, addr, addrlen);
 #endif
@@ -790,5 +794,3 @@ std::string Socket::GetRemoteIPAddress (
 }
 return "";
 }
-
-


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


Re: [Lldb-commits] [PATCH] D12485: NetBSD ships with paccept(2), a superset of accept4(2)

2015-09-03 Thread Stephane Sezer via lldb-commits
sas closed this revision.
sas added a comment.

Committed.

  [sas@sas-fbro ~/Source/llvm/tools/lldb (arcpatch-D12485)] git svn dcommit
  Committing to https://llvm.org/svn/llvm-project/lldb/trunk ...
M   source/Host/common/Socket.cpp
  Committed r246787
M   source/Host/common/Socket.cpp
  r246787 = e5fd085b87c92e363bbc06218ef137bba033c500 
(refs/remotes/origin/master)
  No changes between 608d85e2bf37968bf20333e99b5ea06411d1aab7 and 
refs/remotes/origin/master
  Resetting to the latest refs/remotes/origin/master


Repository:
  rL LLVM

http://reviews.llvm.org/D12485



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a reviewer: zturner.
tfiala added a comment.




http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12585: Add a TypeSystem for Go

2015-09-03 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Just a few cleanups to do mentioned in the inlined comments.



Comment at: include/lldb/Core/Module.h:950
@@ -949,1 +949,3 @@
 
+GoASTContext &GetGoASTContext();
+

We should remove this and just use Module::GetTypeSystemForLanguage(...) to get 
at this. Then from the type system you can say 
"type_system->GetAsGoASTContext()". ClangASTContext has been special because we 
started out thinking this would be the one and only type system we would ever 
use in the debugger and the "Module::GetClangASTContext()" should be removed. I 
will do that in a future patch, but for now,remove this function and use 
"Module::GetTypeSystemForLanguage(eLanguageTypeGo)" when you need it.


Comment at: include/lldb/Symbol/ClangASTContext.h:489-493
@@ +488,7 @@
+
+GoASTContext *
+AsGoASTContext() override
+{
+return nullptr;
+}
+

Add "TypeSystem::AsXXXASTContext()" functions should have a default 
implementation in the TypeSystem base class which returns nullptr so every 
other TypeSystem doesn't have to implement the function and return nullptr.


Comment at: include/lldb/Symbol/CompilerType.h:21
@@ +20,3 @@
+{
+class Type;
+}

indent one level


Comment at: include/lldb/lldb-forward.h:102
@@ -101,2 +101,3 @@
 class   Flags;
+class GoASTContext;
 class   TypeCategoryImpl;

there must be a tab here? We use spaces in LLDB, so please space out to match 
other indentation.


Comment at: source/Core/Module.cpp:27
@@ -26,2 +26,3 @@
 #include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/GoASTContext.h"
 #include "lldb/Symbol/CompileUnit.h"

Remove this duplicate include and use the one below.


Comment at: source/Core/Module.cpp:152
@@ -149,2 +151,3 @@
 m_ast (new ClangASTContext),
+m_go_ast(new GoASTContext),
 m_source_mappings (),

Default construct so it is null until a call to 
Module::GetTypeSystemForLanguage() with eLanguageTypeGo is passed in. We can 
eventually make the TypeSystem objects into plug-ins, but for now we can hard 
code this. We are going to remove "GoASTContext &Module::GetGoASTContext()" in 
favor of using Module::GetTypeSystemForLanguage(eLanguageTypeGo) so we don't 
need to construct one as we don't need to return an reference.


Comment at: source/Core/Module.cpp:258
@@ -253,2 +257,3 @@
 m_ast (new ClangASTContext),
+m_go_ast(new GoASTContext),
 m_source_mappings (),

Default construct so it is null until a call to 
Module::GetTypeSystemForLanguage() with eLanguageTypeGo is passed in. We can 
eventually make the TypeSystem objects into plug-ins, but for now we can hard 
code this. We are going to remove "GoASTContext &Module::GetGoASTContext()" in 
favor of using Module::GetTypeSystemForLanguage(eLanguageTypeGo) so we don't 
need to construct one as we don't need to return an reference.


Comment at: source/Core/Module.cpp:306
@@ -299,2 +305,3 @@
 m_ast (new ClangASTContext),
+m_go_ast(new GoASTContext),
 m_source_mappings (),

Default construct so it is null until a call to 
Module::GetTypeSystemForLanguage() with eLanguageTypeGo is passed in. We can 
eventually make the TypeSystem objects into plug-ins, but for now we can hard 
code this. We are going to remove "GoASTContext &Module::GetGoASTContext()" in 
favor of using Module::GetTypeSystemForLanguage(eLanguageTypeGo) so we don't 
need to construct one as we don't need to return an reference.


Comment at: source/Core/Module.cpp:432
@@ +431,3 @@
+{
+return &GetGoASTContext();
+}

This code will now check for m_go_ast and if it is NULL, then it will construct 
a GoASTContext and place it into m_go_ast. This allows us to create 
GoASTContext on demand.


Comment at: source/Core/Module.cpp:480-495
@@ +479,18 @@
+
+GoASTContext &
+Module::GetGoASTContext ()
+{
+Mutex::Locker locker (m_mutex);
+if (m_did_init_go == false)
+{
+ObjectFile * objfile = GetObjectFile();
+ArchSpec object_arch;
+if (objfile && objfile->GetArchitecture(object_arch))
+{
+m_did_init_go = true;
+m_go_ast->SetAddressByteSize(object_arch.GetAddressByteSize());
+}
+}
+return *m_go_ast;
+}
+

Remove this and move initialization into Module::GetTypeSystemForLanguage() 
inside the Go language if clause. We probably don't need the m_did_init_go 
member variable anymore since you can key off of the m_go_ast being NULL to 
know that you need to init this.


Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:513-514
@@ +512,4 @@
+type_system = 
m_obj_file

Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
About to take a look at this

On Thu, Sep 3, 2015 at 10:29 AM Greg Clayton  wrote:

> clayborg accepted this revision.
> clayborg added a comment.
> This revision is now accepted and ready to land.
>
> Looks good.
>
>
> http://reviews.llvm.org/D12587
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

About to take a look at this


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12601: Fix TestLoadUnload.test_load_unload for android API > 21

2015-09-03 Thread Oleksiy Vyalov via lldb-commits
ovyalov accepted this revision.
ovyalov added a comment.
This revision is now accepted and ready to land.

LGTM



Comment at: source/Core/Module.cpp:1712
@@ -1712,1 +1711,3 @@
+if (!FileSpec::Equal (file_spec, m_file, 
(bool)file_spec.GetDirectory()) &&
+!FileSpec::Equal (file_spec, m_platform_file, 
(bool)file_spec.GetDirectory()))
 return false;

It might expose some tricky problems when host and target have the same library 
with the same path but different content.. - please make sure that there is no 
regressions.  


Comment at: source/Target/Platform.cpp:278
@@ +277,3 @@
+  if (error.Success() && module_sp)
+  
module_sp->SetPlatformFileSpec(spec.GetFileSpec());
+  return error;

What do you think about putting 
module_sp->SetPlatformFileSpec(spec.GetFileSpec()) into 
ModuleList::GetSharedModule ?


http://reviews.llvm.org/D12601



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


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Zachary Turner via lldb-commits
lgtm

On Thu, Sep 3, 2015 at 8:05 AM Kamil Rytarowski  wrote:

> krytarowski updated this revision to Diff 33944.
> krytarowski added a comment.
>
> Inverse wrong logic
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D12582
>
> Files:
>   include/lldb/Host/HostGetOpt.h
>   include/lldb/Host/common/GetOptInc.h
>   include/lldb/Host/windows/getopt/GetOptInc.h
>   source/Host/CMakeLists.txt
>   source/Host/common/GetOptInc.cpp
>   source/Host/windows/getopt/GetOptInc.cpp
>   tools/lldb-mi/CMakeLists.txt
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12582: NetBSD doesn't ship with getopt_long_only(3)

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

lgtm


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12584: Fix TestCompletion.py failure on Darwin after r246639

2015-09-03 Thread Ying Chen via lldb-commits
chying added a comment.

Based on experiment I had, we need to send empty lines the same times as the 
number of lines in original commands on Darwin.
But on Linux, only one empty line is needed for multiple lines of commands.
It seems on Darwin, lldb doesn't automatically execute commands separated by 
new line.


http://reviews.llvm.org/D12584



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


Re: [Lldb-commits] [PATCH] D12589: SystemRuntime/MacOSX no longer need ObjCRuntime header.

2015-09-03 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good


http://reviews.llvm.org/D12589



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D12587#239410, @zturner wrote:

> About to take a look at this


Great, thanks.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12360: RenderScript pending kernel breakpoints.

2015-09-03 Thread Jim Ingham via lldb-commits
jingham added a comment.

That looks great.  Here are some comments that are not requirements for getting 
this in but just for you to consider:

If you think you are ever likely to add different ways to specify the name 
(e.g. if passing a regex might be useful) it might be good to pass the name as 
an option (-n FOO) rather than a bare argument.  Once you've made it an 
argument it is hard to add orthogonal options in a coherent way.  OTOH, in the 
case of regex, you could for instance do:

(lldb) renderscript kernel breakpoint -r 

and actually we do have some commands that do it that way ("image lookup" being 
one) but since this is kind of a breakpoint command it would be better to make 
it look like the "breakpoint set" command.  But that only works because a regex 
is just a fancy name somehow.  Anyway, there are also other people around who 
wish I'd lay off the option thing a bit, so take this suggestion as you will...

I don't know if it is useful to you, but all the "by name" breakpoint commands 
also take a list of names, so you can do:

(lldb) break set -n Foo -n Bar -n Baz

That's useful if you want to have some devious command on all three of those 
breakpoints, or want to enable & disable them at a blow, or if you are 
interested in the aggregated hit count for the three or whatever.  Be pretty 
easy to do that the way you've got it set up now.

Also, if you get some extra time, it doesn't look like it would be too hard to 
add a command completer for this name argument.  It looks like you would just 
run over the modules looking for kernels, then match the input against those 
names.  That would get tab completion on the name working automatically.  This 
is extra credit, however.


Repository:
  rL LLVM

http://reviews.llvm.org/D12360



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


Re: [Lldb-commits] [PATCH] D12584: Fix TestCompletion.py failure on Darwin after r246639

2015-09-03 Thread Ying Chen via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246791: Fix TestCompletion.py failure on Darwin after 
r246639 (authored by chying).

Changed prior to commit:
  http://reviews.llvm.org/D12584?vs=33898&id=33960#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12584

Files:
  lldb/trunk/test/functionalities/completion/TestCompletion.py

Index: lldb/trunk/test/functionalities/completion/TestCompletion.py
===
--- lldb/trunk/test/functionalities/completion/TestCompletion.py
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py
@@ -269,6 +269,8 @@
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.


Index: lldb/trunk/test/functionalities/completion/TestCompletion.py
===
--- lldb/trunk/test/functionalities/completion/TestCompletion.py
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py
@@ -269,6 +269,8 @@
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246791 - Fix TestCompletion.py failure on Darwin after r246639

2015-09-03 Thread Ying Chen via lldb-commits
Author: chying
Date: Thu Sep  3 13:29:27 2015
New Revision: 246791

URL: http://llvm.org/viewvc/llvm-project?rev=246791&view=rev
Log:
Fix TestCompletion.py failure on Darwin after r246639

Summary: - send empty line for multiple commands to complete

Reviewers: tberghammer

Subscribers: lldb-commits

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

Modified:
lldb/trunk/test/functionalities/completion/TestCompletion.py

Modified: lldb/trunk/test/functionalities/completion/TestCompletion.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/completion/TestCompletion.py?rev=246791&r1=246790&r2=246791&view=diff
==
--- lldb/trunk/test/functionalities/completion/TestCompletion.py (original)
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py Thu Sep  3 
13:29:27 2015
@@ -269,6 +269,8 @@ class CommandLineCompletionTestCase(Test
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.


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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: test/CMakeLists.txt:65
@@ -64,3 +64,3 @@
   ${LLDB_SOURCE_DIR}/test/dotest.py
-  "${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
+  "--no-multiprocess;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
   "Testing LLDB with args: ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"

Is this necessary?  dosep already takes a -t argument which specifies the 
number of threads, and if the number of threads is 1 it disables the thread 
pool.  Is it possible to delete this option and just pass -t=1 instead?


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12291: Add split dwarf support to SymbolFileDWARF

2015-09-03 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

A few changes.

I think this might create problems for DWARF in .o files on MacOSX. Are you 
able to test on MacOSX? We used to store the compile unit index in the upper 32 
bits of the type ID and all of our compile units from each .o file have 0xb as 
their cu_offset, so I would think that DIERef would always cause us to grab the 
first compile unit...



Comment at: source/Plugins/SymbolFile/DWARF/DIERef.cpp:34-44
@@ +33,13 @@
+
+DIERef::DIERef(const DWARFFormValue& form_value) :
+cu_offset(DW_INVALID_OFFSET),
+die_offset(DW_INVALID_OFFSET)
+{
+if (form_value.IsValid())
+{
+if (form_value.GetCompileUnit())
+cu_offset = form_value.GetCompileUnit()->GetOffset();
+die_offset = form_value.Reference();
+}
+}
+

For DWO files, won't every compile unit have offset 0x000b? Or do you use 
the actual compile unit DIE from the main executable?

I have doubts this will work for DWARF in .o files. We used to encode the 
compile unit index in the upper 32 bits because all of our compile units have a 
dw_offset_t that is 0xb..


Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:603-605
@@ -581,7 +602,5 @@
 {
-std::vector::const_iterator pos;
-std::vector::const_iterator end = die_offsets.end();
-for (pos = die_offsets.begin(); pos != end; ++pos)
+for (auto pos = die_refs.begin(), end = die_refs.end(); pos != end; 
++pos)
 {
-dw_offset_t die_offset = *pos;
-if (die_offset != DW_INVALID_OFFSET)
+const DIERef& die_ref = *pos;
+if (die_ref.die_offset != DW_INVALID_OFFSET)

These 3 lines would be nicer as:

```
for (const auto &die_ref : die_refs)
{
```


Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1025-1036
@@ +1024,14 @@
+{
+if (GetAttributeValue(dwarf2Data, cu, DW_AT_specification, form_value) 
||
+GetAttributeValue(dwarf2Data, cu, DW_AT_abstract_origin, 
form_value))
+{
+DWARFDIE die = 
const_cast(cu)->GetDIE(form_value.Reference());
+if (die)
+return die.GetDIE()->GetAttributeValue(die.GetDWARF(),
+   die.GetCU(),
+   attr,
+   form_value,
+   end_attr_offset_ptr,
+   false);
+}
+}

This will fail if a DIE can have both a DW_AT_specification and a 
DW_AT_abstract_origin. Not sure if that can happen. If it can, we will need to 
check each one individually. Probably best to just check both individually.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1039-1055
@@ -985,1 +1038,19 @@
+
+if (!dwo_symbol_file)
+return 0;
+
+DWARFCompileUnit* dwo_cu = dwo_symbol_file->GetCompileUnit();
+if (!dwo_cu)
+return 0;
+
+DWARFDIE dwo_cu_die = dwo_cu->GetCompileUnitDIEOnly();
+if (!dwo_cu_die.IsValid())
+return 0;
+
+return dwo_cu_die.GetDIE()->GetAttributeValue(dwo_symbol_file,
+  dwo_cu,
+  attr,
+  form_value,
+  end_attr_offset_ptr,
+  
check_specification_or_abstract_origin);
 }

Don't you want to only do all of this code if:
```
if (Tag() == DW_TAG_compile_unit)
```


http://reviews.llvm.org/D12291



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added inline comments.


Comment at: test/CMakeLists.txt:65
@@ -64,3 +64,3 @@
   ${LLDB_SOURCE_DIR}/test/dotest.py
-  "${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
+  "--no-multiprocess;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
   "Testing LLDB with args: ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"

zturner wrote:
> Is this necessary?  dosep already takes a -t argument which specifies the 
> number of threads, and if the number of threads is 1 it disables the thread 
> pool.  Is it possible to delete this option and just pass -t=1 instead?
Right now there's an implementation difference between the two:

--no-multiprocess literally switches from using the dosep parallel test runner 
logic to using the old dotest.py test runner logic.  Specifying -t/--threads  
THREADCOUNT where THREADCOUNT is 1 will use the multiprocess test runner with a 
single process queue.  So, if somebody wanted to have the extra test subdir 
filtering of the dosep logic (the test-subdir arg) but for some reason wanted 
to debug or otherwise run it serially, they'd be out of luck if we adopted a 
-t=1 == --no-multiprocess stance.

What I'd recommend is we keep the two options for now since there is behavior 
we would otherwise lose at the moment.  But, when we do the refactor to test 
runners, we get rid of all the bits that are special to the multi test runner 
(e.g. the test-subdir and the --output-on-success flags), at which point your 
idea that "--no-multiprocess is unnecessary" should be true, and we can remove 
it then.

Sound reasonable?


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12556: Use eAddressClassCode for address lookup for opcodes

2015-09-03 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Did you check who is all calling this? Is it only places that know that an 
address is code? It seems like we have might have different clients expecting 
different things out of this function call. For the stack backtracing code, we 
want to force the address to be code. Others might want to know if it is data. 
One idea is to add a bool parameter like "bool address_is_always_code". If this 
is true we call:

  code_addr = target->GetOpcodeLoadAddress (code_addr, address_is_always_code ? 
eAddressClassCode : GetAddressClass());


http://reviews.llvm.org/D12556



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
Ok, seems fine.  No other issues on my side

On Thu, Sep 3, 2015 at 11:47 AM Todd Fiala  wrote:

> tfiala added inline comments.
>
> 
> Comment at: test/CMakeLists.txt:65
> @@ -64,3 +64,3 @@
>${LLDB_SOURCE_DIR}/test/dotest.py
> -  "${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
> +  "--no-multiprocess;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
>"Testing LLDB with args:
> ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
> 
> zturner wrote:
> > Is this necessary?  dosep already takes a -t argument which specifies
> the number of threads, and if the number of threads is 1 it disables the
> thread pool.  Is it possible to delete this option and just pass -t=1
> instead?
> Right now there's an implementation difference between the two:
>
> --no-multiprocess literally switches from using the dosep parallel test
> runner logic to using the old dotest.py test runner logic.  Specifying
> -t/--threads  THREADCOUNT where THREADCOUNT is 1 will use the multiprocess
> test runner with a single process queue.  So, if somebody wanted to have
> the extra test subdir filtering of the dosep logic (the test-subdir arg)
> but for some reason wanted to debug or otherwise run it serially, they'd be
> out of luck if we adopted a -t=1 == --no-multiprocess stance.
>
> What I'd recommend is we keep the two options for now since there is
> behavior we would otherwise lose at the moment.  But, when we do the
> refactor to test runners, we get rid of all the bits that are special to
> the multi test runner (e.g. the test-subdir and the --output-on-success
> flags), at which point your idea that "--no-multiprocess is unnecessary"
> should be true, and we can remove it then.
>
> Sound reasonable?
>
>
> http://reviews.llvm.org/D12587
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

Ok, seems fine.  No other issues on my side


http://reviews.llvm.org/D12587



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


[Lldb-commits] [lldb] r246794 - Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Sep  3 13:58:44 2015
New Revision: 246794

URL: http://llvm.org/viewvc/llvm-project?rev=246794&view=rev
Log:
Roll dosep.py parallel test runner into dotest.py command line

See the following for details:
http://reviews.llvm.org/D12587

Modified:
lldb/trunk/test/CMakeLists.txt
lldb/trunk/test/Makefile
lldb/trunk/test/dosep.py
lldb/trunk/test/dotest.py
lldb/trunk/test/dotest_args.py
lldb/trunk/www/test.html

Modified: lldb/trunk/test/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=246794&r1=246793&r2=246794&view=diff
==
--- lldb/trunk/test/CMakeLists.txt (original)
+++ lldb/trunk/test/CMakeLists.txt Thu Sep  3 13:58:44 2015
@@ -62,16 +62,16 @@ endif()
 
 add_python_test_target(check-lldb-single
   ${LLDB_SOURCE_DIR}/test/dotest.py
-  "${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
+  "--no-multiprocess;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
   "Testing LLDB with args: ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
   )
 
-set(LLDB_DOSEP_ARGS -o;\"-q;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}\")
+set(LLDB_DOTEST_ARGS -q;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS})
 
 # If tests crash cause LLDB to crash, or things are otherwise unstable, or if 
machine-parsable
 # output is desired (i.e. in continuous integration contexts) 
check-lldb-single is a better target.
 add_python_test_target(check-lldb
-  ${LLDB_SOURCE_DIR}/test/dosep.py
-  "${LLDB_DOSEP_ARGS}"
-  "Testing LLDB (with a separate subprocess per test)"
+  ${LLDB_SOURCE_DIR}/test/dotest.py
+  "${LLDB_DOTEST_ARGS}"
+  "Testing LLDB (parallel execution, with a separate subprocess per test)"
   )

Modified: lldb/trunk/test/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/Makefile?rev=246794&r1=246793&r2=246794&view=diff
==
--- lldb/trunk/test/Makefile (original)
+++ lldb/trunk/test/Makefile Thu Sep  3 13:58:44 2015
@@ -30,4 +30,4 @@ clean::
 #--
 check-local::
rm -rf lldb-test-traces
-   python $(PROJ_SRC_DIR)/dosep.py -o "--executable $(ToolDir)/lldb -q -s 
lldb-test-traces -u CXXFLAGS -u CFLAGS -C $(subst ccache,,$(CC))"
+   python $(PROJ_SRC_DIR)/dotest.py --executable $(ToolDir)/lldb -q -s 
lldb-test-traces -u CXXFLAGS -u CFLAGS -C $(subst ccache,,$(CC))

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=246794&r1=246793&r2=246794&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Thu Sep  3 13:58:44 2015
@@ -38,7 +38,6 @@ import fnmatch
 import platform
 import re
 import dotest_args
-import shlex
 import subprocess
 import sys
 
@@ -131,8 +130,6 @@ def parse_test_results(output):
 result, re.MULTILINE)
 unexpected_success_count = re.search("^RESULT:.*([0-9]+) unexpected 
successes",
  result, re.MULTILINE)
-this_fail_count = 0
-this_error_count = 0
 if pass_count is not None:
 passes = passes + int(pass_count.group(1))
 if fail_count is not None:
@@ -183,7 +180,7 @@ def process_dir(root, files, test_root,
 script_file = os.path.join(test_root, "dotest.py")
 command = ([sys.executable, script_file] +
dotest_argv +
-   ["-p", name, root])
+   ["--inferior", "-p", name, root])
 
 timeout_name = os.path.basename(os.path.splitext(name)[0]).upper()
 
@@ -201,7 +198,7 @@ def process_dir(root, files, test_root,
   if status != ePassed]
 unexpected_passes = [name for name, _, _, _, unexpected_successes in 
results
  if unexpected_successes > 0]
-
+
 pass_count = sum([result[2] for result in results])
 fail_count = sum([result[3] for result in results])
 
@@ -284,7 +281,6 @@ def getExpectedTimeouts(platform_name):
 else:
 m = re.search('remote-(\w+)', platform_name)
 target = m.group(1)
-remote = True
 
 expected_timeout = set()
 
@@ -358,7 +354,27 @@ def find(pattern, path):
 return result
 
 
-def main():
+def main(print_details_on_success, num_threads, test_subdir):
+"""Run dotest.py in inferior mode in parallel.
+
+@param print_details_on_success the parsed value of the output-on-success
+command line argument.  When True, details of a successful dotest inferior
+are printed even when everything succeeds.  The normal behavior is to
+not print any details when all the inferior tests pass.
+
+@param num_threads the parsed value of the num-threads command line
+argument.
+
+@param test_subdir optionally specifies a sub

Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

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

Submitted here:

  $ svn commit
  Sendingtest/CMakeLists.txt
  Sendingtest/Makefile
  Sendingtest/dosep.py
  Sendingtest/dotest.py
  Sendingtest/dotest_args.py
  Sendingwww/test.html
  Transmitting file data ..
  Committed revision 246794.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12599: Only export public symbols with the cmake build.

2015-09-03 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks fine.


http://reviews.llvm.org/D12599



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D12587#239494, @zturner wrote:

> Ok, seems fine.  No other issues on my side


Great, thanks.  I'm going to get this in.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12582: Move GetOptInc to the common namespace

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

Thank you.

When the review will be done, please commit it.


Repository:
  rL LLVM

http://reviews.llvm.org/D12582



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Ying Chen via lldb-commits
chying added a comment.

Sorry, coming late to this thread.
This change works ok on linux and darwin systems.

But it has some problem on Windows, the main code has to be protected with the 
following statement on Windows,
if __name__ == '__main__': 
Otherwise it creates subprocesses recursively.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

I didn't see this when I ran ninja check-lldb, but Adrian is seeing the
same thing on his machine for some reason.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
I didn't see this when I ran ninja check-lldb, but Adrian is seeing the
same thing on his machine for some reason.

On Thu, Sep 3, 2015 at 3:06 PM Ying Chen  wrote:

> chying added a comment.
>
> Sorry, coming late to this thread.
> This change works ok on linux and darwin systems.
>
> But it has some problem on Windows, the main code has to be protected with
> the following statement on Windows,
> if __name__ == '__main__':
> Otherwise it creates subprocesses recursively.
>
>
> http://reviews.llvm.org/D12587
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
I actually am seeing this now, I'm not sure why I didn't see it earlier,
the only thing I can think of is that the patch didn't apply successfully
even though I thoguht it did.

When I stop at this line:

if num_threads > 1:
pool = multiprocessing.Pool(
num_threads,
initializer=setup_global_variables,
initargs=(output_lock, test_counter, total_tests, test_name_len,
  dotest_options))

in a debugger and inspect the value of dotest_options,
`dotest_options.no_multiprocessing` is set to False.  Is this correct?  It
seems like for the child dotest instances, it shouldn't be trying to
recursively do this multiprocessing?

On Thu, Sep 3, 2015 at 3:13 PM Zachary Turner  wrote:

> zturner added a comment.
>
> I didn't see this when I ran ninja check-lldb, but Adrian is seeing the
> same thing on his machine for some reason.
>
>
> http://reviews.llvm.org/D12587
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

I actually am seeing this now, I'm not sure why I didn't see it earlier,
the only thing I can think of is that the patch didn't apply successfully
even though I thoguht it did.

When I stop at this line:

  if num_threads > 1:
  pool = multiprocessing.Pool(
  num_threads,
  initializer=setup_global_variables,
  initargs=(output_lock, test_counter, total_tests, test_name_len,
dotest_options))

in a debugger and inspect the value of dotest_options,
`dotest_options.no_multiprocessing` is set to False.  Is this correct?  It
seems like for the child dotest instances, it shouldn't be trying to
recursively do this multiprocessing?


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D12587#239625, @chying wrote:

> Sorry, coming late to this thread.
>  This change works ok on linux and darwin systems.


Hi @chying,

> But it has some problem on Windows, the main code has to be protected with 
> the following statement on Windows,

>  if __name__ == '__main__': 

>  Otherwise it creates subprocesses recursively.


Can you tell me more about this?  How are you calling it?  Which one (dotest.py 
or dosep.py) is going recursively out of control?  On what kind of machine?  
Did you used to run it with dosep,py or dotest.py?  If you used to use 
dotest.py, you'll start seeing a bunch of dotest.py test runners (one per core, 
which you can control with the -t or --threads option).  If you're on a machine 
that has 48 cores, you'll get 48 dotest runner processes.  Are you sure that it 
is not running?

If it is not running and is truly recursing out of control, can you capture the 
command line args for several of the processes?  All of the inferior dotest.py 
worker bees should have been kicked off with the --inferior flag added.  If 
*not*, then something sounds like it is going wrong.

Do you have a patch that fixes this?  (I'm not sure exactly which part you're 
wanting to protect).

One more question - I recall sometimes having .pyc files not get cleared out 
properly, and get used even when they're stale on some platforms in the past.  
Is it possible you have stale .pyc files that possibly don't have the updated 
code (i.e. .py file is fresh, but .pyc file is getting used accidentally)?  
Easiest way to rule that out is to blow away the .pyc files in the directory.  
Having stale files in this case could go really badly.

Thanks!


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D12587#239639, @zturner wrote:

> I actually am seeing this now, I'm not sure why I didn't see it earlier,
>  the only thing I can think of is that the patch didn't apply successfully
>  even though I thoguht it did.
>
> When I stop at this line:
>
>   if num_threads > 1:
>   pool = multiprocessing.Pool(
>   num_threads,
>   initializer=setup_global_variables,
>   initargs=(output_lock, test_counter, total_tests, test_name_len,
> dotest_options))
>   
>
> in a debugger and inspect the value of dotest_options,
>  `dotest_options.no_multiprocessing` is set to False.  Is this correct?  It
>  seems like for the child dotest instances, it shouldn't be trying to
>  recursively do this multiprocessing?


That flag is only meaningful to the initial invocation.  It would be False if 
the user didn't specify it on the command line in the highest-level process 
that is driving the parallel test runner.  That looks fine.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
I'm testing a fix for this locally.  Hold tight

On Thu, Sep 3, 2015 at 3:33 PM Todd Fiala  wrote:

> tfiala added a comment.
>
> In http://reviews.llvm.org/D12587#239639, @zturner wrote:
>
> > I actually am seeing this now, I'm not sure why I didn't see it earlier,
> >  the only thing I can think of is that the patch didn't apply
> successfully
> >  even though I thoguht it did.
> >
> > When I stop at this line:
> >
> >   if num_threads > 1:
> >   pool = multiprocessing.Pool(
> >   num_threads,
> >   initializer=setup_global_variables,
> >   initargs=(output_lock, test_counter, total_tests,
> test_name_len,
> > dotest_options))
> >
> >
> > in a debugger and inspect the value of dotest_options,
> >  `dotest_options.no_multiprocessing` is set to False.  Is this correct?
> It
> >  seems like for the child dotest instances, it shouldn't be trying to
> >  recursively do this multiprocessing?
>
>
> That flag is only meaningful to the initial invocation.  It would be False
> if the user didn't specify it on the command line in the highest-level
> process that is driving the parallel test runner.  That looks fine.
>
>
> http://reviews.llvm.org/D12587
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

I'm testing a fix for this locally.  Hold tight


http://reviews.llvm.org/D12587



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


[Lldb-commits] [PATCH] D12612: Fix dotest on Windows after multiprocessing refactor

2015-09-03 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added reviewers: tfiala, amccarth, chying.
zturner added a subscriber: lldb-commits.

On Windows, when you call pool.map, under the hood python will *again* import 
whatever the main module is.  In this case it's dotest.py.  Importing dotest 
then causes all of its code to run again, and since the main execution of 
dotest was not protected by if __name__ == "__main__", it would recursively 
kick off the entire process all over again.

http://reviews.llvm.org/D12612

Files:
  test/dotest.py

Index: test/dotest.py
===
--- test/dotest.py
+++ test/dotest.py
@@ -1261,580 +1261,581 @@
 # test runner
 return not (is_inferior_test_runner or no_multiprocess_test_runner)
 
-# On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults
-# does not exist before proceeding to running the test suite.
-if sys.platform.startswith("darwin"):
-checkDsymForUUIDIsNotOn()
+if __name__ == "__main__":
+# On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults
+# does not exist before proceeding to running the test suite.
+if sys.platform.startswith("darwin"):
+checkDsymForUUIDIsNotOn()
 
-#
-# Start the actions by first parsing the options while setting up the test
-# directories, followed by setting up the search paths for lldb utilities;
-# then, we walk the directory trees and collect the tests into our test suite.
-#
-parseOptionsAndInitTestdirs()
+#
+# Start the actions by first parsing the options while setting up the test
+# directories, followed by setting up the search paths for lldb utilities;
+# then, we walk the directory trees and collect the tests into our test suite.
+#
+parseOptionsAndInitTestdirs()
 
-# If we are running as the multiprocess test runner, kick off the
-# multiprocess test runner here.
-if isMultiprocessTestRunner():
-import dosep
-dosep.main(output_on_success, num_threads, multiprocess_test_subdir)
-raise "should never get here"
+# If we are running as the multiprocess test runner, kick off the
+# multiprocess test runner here.
+if isMultiprocessTestRunner():
+import dosep
+dosep.main(output_on_success, num_threads, multiprocess_test_subdir)
+raise "should never get here"
 
-setupSysPath()
-setupCrashInfoHook()
+setupSysPath()
+setupCrashInfoHook()
 
-#
-# If '-l' is specified, do not skip the long running tests.
-if not skip_long_running_test:
-os.environ["LLDB_SKIP_LONG_RUNNING_TEST"] = "NO"
-
-# For the time being, let's bracket the test runner within the
-# lldb.SBDebugger.Initialize()/Terminate() pair.
-import lldb
-
-# Create a singleton SBDebugger in the lldb namespace.
-lldb.DBG = lldb.SBDebugger.Create()
-
-if lldb_platform_name:
-print "Setting up remote platform '%s'" % (lldb_platform_name)
-lldb.remote_platform = lldb.SBPlatform(lldb_platform_name)
-if not lldb.remote_platform.IsValid():
-print "error: unable to create the LLDB platform named '%s'." % (lldb_platform_name)
-exitTestSuite(1)
-if lldb_platform_url:
-# We must connect to a remote platform if a LLDB platform URL was specified
-print "Connecting to remote platform '%s' at '%s'..." % (lldb_platform_name, lldb_platform_url)
-lldb.platform_url = lldb_platform_url
-platform_connect_options = lldb.SBPlatformConnectOptions(lldb_platform_url)
-err = lldb.remote_platform.ConnectRemote(platform_connect_options)
-if err.Success():
-print "Connected."
-else:
-print "error: failed to connect to remote platform using URL '%s': %s" % (lldb_platform_url, err)
+#
+# If '-l' is specified, do not skip the long running tests.
+if not skip_long_running_test:
+os.environ["LLDB_SKIP_LONG_RUNNING_TEST"] = "NO"
+
+# For the time being, let's bracket the test runner within the
+# lldb.SBDebugger.Initialize()/Terminate() pair.
+import lldb
+
+# Create a singleton SBDebugger in the lldb namespace.
+lldb.DBG = lldb.SBDebugger.Create()
+
+if lldb_platform_name:
+print "Setting up remote platform '%s'" % (lldb_platform_name)
+lldb.remote_platform = lldb.SBPlatform(lldb_platform_name)
+if not lldb.remote_platform.IsValid():
+print "error: unable to create the LLDB platform named '%s'." % (lldb_platform_name)
 exitTestSuite(1)
-else:
-lldb.platform_url = None
+if lldb_platform_url:
+# We must connect to a remote platform if a LLDB platform URL was specified
+print "Connecting to remote platform '%s' at '%s'..." % (lldb_platform_name, lldb_platform_url)
+lldb.platform_url = lldb_platform_url
+platform_connect_options = lldb.SBPlatformConnectOptions(lldb_platform_url)
+err = lldb.remote_platform.ConnectRemote(platform_conn

Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

http://reviews.llvm.org/D12612


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
http://reviews.llvm.org/D12612

On Thu, Sep 3, 2015 at 3:35 PM Zachary Turner  wrote:

> zturner added a comment.
>
> I'm testing a fix for this locally.  Hold tight
>
>
> http://reviews.llvm.org/D12587
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D12613: Lookup function using full name if one with mangled name is not found.

2015-09-03 Thread Siva Chandra via lldb-commits
sivachandra created this revision.
sivachandra added reviewers: clayborg, spyffe.
sivachandra added a subscriber: lldb-commits.

Remove expected failure decorators from tests which now should start
passing.

http://reviews.llvm.org/D12613

Files:
  source/Expression/ClangExpressionDeclMap.cpp
  test/expression_command/formatters/TestFormatters.py
  
test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py

Index: test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
===
--- test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
+++ test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
@@ -22,7 +22,6 @@
 @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
 @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
 @dwarf_test
-@expectedFailureLinux('llvm.org/pr19011', ['clang'])
 def test_with_dwarf_and_run_command(self):
 """Test using Python synthetic children provider to provide a value."""
 self.buildDwarf()
Index: test/expression_command/formatters/TestFormatters.py
===
--- test/expression_command/formatters/TestFormatters.py
+++ test/expression_command/formatters/TestFormatters.py
@@ -26,7 +26,6 @@
 self.do_my_test()
 
 @expectedFailureFreeBSD('llvm.org/pr19011') # Newer Clang omits C1 complete object constructor
-@expectedFailureLinux('llvm.org/pr19011', ['clang'])
 @expectedFailureWindows("llvm.org/pr21765")
 @skipIfTargetAndroid() # skipping to avoid crashing the test runner
 @expectedFailureAndroid('llvm.org/pr24691') # we hit an assertion in clang
Index: source/Expression/ClangExpressionDeclMap.cpp
===
--- source/Expression/ClangExpressionDeclMap.cpp
+++ source/Expression/ClangExpressionDeclMap.cpp
@@ -47,6 +47,8 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 
+#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace clang;
@@ -498,24 +500,25 @@
 (
 const ConstString &name,
 SymbolContext &sym_ctx,
+uint32_t name_type_mask,
 SymbolContextList &sc_list
 )
 {
 sc_list.Clear();
 SymbolContextList temp_sc_list;
 if (sym_ctx.module_sp)
 sym_ctx.module_sp->FindFunctions(name,
  NULL,
- eFunctionNameTypeAuto,
+ name_type_mask,
  true,  // include_symbols
  false, // include_inlines
  true,  // append
  temp_sc_list);
 if (temp_sc_list.GetSize() == 0)
 {
 if (sym_ctx.target_sp)
 sym_ctx.target_sp->GetImages().FindFunctions(name,
- eFunctionNameTypeAuto,
+ name_type_mask,
  true,  // include_symbols
  false, // include_inlines
  true,  // append
@@ -573,10 +576,33 @@
 
 SymbolContextList sc_list;
 
-FindCodeSymbolInContext(name, m_parser_vars->m_sym_ctx, sc_list);
+FindCodeSymbolInContext(name, m_parser_vars->m_sym_ctx, eFunctionNameTypeAuto, sc_list);
 
 uint32_t sc_list_size = sc_list.GetSize();
-
+
+if (sc_list_size == 0)
+{
+SymbolContext &sc = m_parser_vars->m_sym_ctx;
+if (sc.comp_unit)
+{
+LanguageType lang_type = sc.comp_unit->GetLanguage();
+if (Language::LanguageIsCPlusPlus(lang_type) &&
+CPlusPlusLanguage::IsCPPMangledName(name.AsCString()))
+{
+// 1. Demangle the name
+Mangled mangled(name, true);
+ConstString demangled = mangled.GetDemangledName(lang_type);
+
+if (demangled)
+{
+FindCodeSymbolInContext(
+demangled, m_parser_vars->m_sym_ctx, eFunctionNameTypeFull, sc_list);
+sc_list_size = sc_list.GetSize();
+}
+}
+}
+}
+
 if (sc_list_size == 0)
 {
 // We occasionally get debug information in which a const function is reported
@@ -592,7 +618,8 @@
 if (log)
 log->Printf("Failed to find symbols given non-const name %s; trying %s", name.GetCString(), fixed_name.GetCString());
 
-FindCodeSymbolInContext(fixed_name, m_par

Re: [Lldb-commits] [PATCH] D12612: Fix dotest on Windows after multiprocessing refactor

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

Okay I see, makes sense.  Particularly the discrepancy.

That code will get much nicer (in dotest.py) when that gets some energy put 
into cleaning it up.

Thanks for tracking it down, Zachary!


http://reviews.llvm.org/D12612



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Ying Chen via lldb-commits
chying added a comment.

Sorry, coming late to this thread.
This change works ok on linux and darwin systems.

But it has some problem on Windows, the main code has to be protected with the 
following statement on Windows,
if __name__ == '__main__': 
Otherwise it creates subprocesses recursively.

In http://reviews.llvm.org/D12587#239644, @tfiala wrote:

> In http://reviews.llvm.org/D12587#239625, @chying wrote:
>
> > Sorry, coming late to this thread.
> >  This change works ok on linux and darwin systems.
>
>
> Hi @chying,
>
> > But it has some problem on Windows, the main code has to be protected with 
> > the following statement on Windows,
>
> >  if __name__ == '__main__': 
>
> >  Otherwise it creates subprocesses recursively.
>
>
> Can you tell me more about this?  How are you calling it?  Which one 
> (dotest.py or dosep.py) is going recursively out of control?  On what kind of 
> machine?  Did you used to run it with dosep,py or dotest.py?  If you used to 
> use dotest.py, you'll start seeing a bunch of dotest.py test runners (one per 
> core, which you can control with the -t or --threads option).  If you're on a 
> machine that has 48 cores, you'll get 48 dotest runner processes.  Are you 
> sure that it is not running?


I call dotest directly, like "python.exe dotest.py --executable ..." on a 
Windows 7 machine.
I set LLDB_TEST_THREADS=8, and see 8 test runners from task manager. That has 
no problem.
But it seems each thread keeps calling dotest->dosep->dotest-... recursively.

> If it is not running and is truly recursing out of control, can you capture 
> the command line args for several of the processes?  All of the inferior 
> dotest.py worker bees should have been kicked off with the --inferior flag 
> added.  If *not*, then something sounds like it is going wrong.

> 

> Do you have a patch that fixes this?  (I'm not sure exactly which part you're 
> wanting to protect).


I don't have a patch yet, because the functions in dotest.py is pretty 
scattered.
I'm not sure which part to guard yet. I'm still looking at it.

> One more question - I recall sometimes having .pyc files not get cleared out 
> properly, and get used even when they're stale on some platforms in the past. 
>  Is it possible you have stale .pyc files that possibly don't have the 
> updated code (i.e. .py file is fresh, but .pyc file is getting used 
> accidentally)?  Easiest way to rule that out is to blow away the .pyc files 
> in the directory.  Having stale files in this case could go really badly.


Yes, I had a clean run.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
Hi Ying, check the patch I just posted, I think it fixes it.

On Thu, Sep 3, 2015 at 3:51 PM Ying Chen  wrote:

> chying added a comment.
>
> Sorry, coming late to this thread.
> This change works ok on linux and darwin systems.
>
> But it has some problem on Windows, the main code has to be protected with
> the following statement on Windows,
> if __name__ == '__main__':
> Otherwise it creates subprocesses recursively.
>
> In http://reviews.llvm.org/D12587#239644, @tfiala wrote:
>
> > In http://reviews.llvm.org/D12587#239625, @chying wrote:
> >
> > > Sorry, coming late to this thread.
> > >  This change works ok on linux and darwin systems.
> >
> >
> > Hi @chying,
> >
> > > But it has some problem on Windows, the main code has to be protected
> with the following statement on Windows,
> >
> > >  if __name__ == '__main__':
> >
> > >  Otherwise it creates subprocesses recursively.
> >
> >
> > Can you tell me more about this?  How are you calling it?  Which one
> (dotest.py or dosep.py) is going recursively out of control?  On what kind
> of machine?  Did you used to run it with dosep,py or dotest.py?  If you
> used to use dotest.py, you'll start seeing a bunch of dotest.py test
> runners (one per core, which you can control with the -t or --threads
> option).  If you're on a machine that has 48 cores, you'll get 48 dotest
> runner processes.  Are you sure that it is not running?
>
>
> I call dotest directly, like "python.exe dotest.py --executable ..." on a
> Windows 7 machine.
> I set LLDB_TEST_THREADS=8, and see 8 test runners from task manager. That
> has no problem.
> But it seems each thread keeps calling dotest->dosep->dotest-...
> recursively.
>
> > If it is not running and is truly recursing out of control, can you
> capture the command line args for several of the processes?  All of the
> inferior dotest.py worker bees should have been kicked off with the
> --inferior flag added.  If *not*, then something sounds like it is going
> wrong.
>
> >
>
> > Do you have a patch that fixes this?  (I'm not sure exactly which part
> you're wanting to protect).
>
>
> I don't have a patch yet, because the functions in dotest.py is pretty
> scattered.
> I'm not sure which part to guard yet. I'm still looking at it.
>
> > One more question - I recall sometimes having .pyc files not get cleared
> out properly, and get used even when they're stale on some platforms in the
> past.  Is it possible you have stale .pyc files that possibly don't have
> the updated code (i.e. .py file is fresh, but .pyc file is getting used
> accidentally)?  Easiest way to rule that out is to blow away the .pyc files
> in the directory.  Having stale files in this case could go really badly.
>
>
> Yes, I had a clean run.
>
>
> http://reviews.llvm.org/D12587
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Zachary Turner via lldb-commits
zturner added a comment.

Hi Ying, check the patch I just posted, I think it fixes it.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12613: Lookup function using full name if one with mangled name is not found.

2015-09-03 Thread Greg Clayton via lldb-commits
clayborg added a comment.

I worry a bit about performance here, but we should find any regressions and 
address them if we run into any.


http://reviews.llvm.org/D12613



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


Re: [Lldb-commits] [PATCH] D12613: Lookup function using full name if one with mangled name is not found.

2015-09-03 Thread Sean Callanan via lldb-commits
spyffe added a comment.

What is up with the name such that we have to look for its demangled version?  
Can you provide an example where this search would be required?


http://reviews.llvm.org/D12613



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


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D12587#239681, @chying wrote:

> Yes, I had a clean run.


Thanks for all the details, @chying!  It looks like Zachary found the culprit.  
I'm looking forward to hear if his patch fixes it for you.


http://reviews.llvm.org/D12587



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


Re: [Lldb-commits] [PATCH] D12602: Separate ClangExpressionVariable from ExpressionVariable

2015-09-03 Thread Sean Callanan via lldb-commits
spyffe removed rL LLVM as the repository for this revision.
spyffe updated this revision to Diff 33986.
spyffe added a comment.

Removed ClangExpressionVariable from the friend list for ValueObject.


http://reviews.llvm.org/D12602

Files:
  include/lldb/Core/ValueObject.h
  include/lldb/Expression/ClangExpressionDeclMap.h
  include/lldb/Expression/ClangFunction.h
  include/lldb/Expression/ClangPersistentVariables.h
  include/lldb/Expression/ClangUserExpression.h
  include/lldb/Expression/ClangUtilityFunction.h
  include/lldb/Expression/ExpressionVariable.h
  include/lldb/Expression/Materializer.h
  include/lldb/Target/StopInfo.h
  include/lldb/Target/Thread.h
  include/lldb/Target/ThreadPlan.h
  include/lldb/Target/ThreadPlanCallUserExpression.h
  include/lldb/lldb-forward.h
  source/API/SBFrame.cpp
  source/Breakpoint/BreakpointLocation.cpp
  source/Core/FormatEntity.cpp
  source/Core/ValueObject.cpp
  source/Expression/ClangExpressionDeclMap.cpp
  source/Expression/ClangPersistentVariables.cpp
  source/Expression/ClangUserExpression.cpp
  source/Expression/ExpressionVariable.cpp
  source/Expression/Materializer.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
  source/Target/ABI.cpp
  source/Target/StopInfo.cpp
  source/Target/Target.cpp
  source/Target/Thread.cpp

Index: include/lldb/lldb-forward.h
===
--- include/lldb/lldb-forward.h
+++ include/lldb/lldb-forward.h
@@ -52,8 +52,6 @@
 class   ClangExpressionDeclMap;
 class   ClangExpressionParser;
 class   ClangExpressionVariable;
-class   ClangExpressionVariableList;
-class   ClangExpressionVariableList;
 class   ClangExpressionVariables;
 class   ClangFunction;
 class   ClangModulesDeclVendor;
@@ -95,6 +93,8 @@
 class   ExecutionContextRef;
 class   ExecutionContextRefLocker;
 class   ExecutionContextScope;
+class   ExpressionVariable;
+class   ExpressionVariableList;
 class   File;
 class   FileSpec;
 class   FileSpecList;
@@ -305,7 +305,6 @@
 typedef std::unique_ptr ClangASTContextUP;
 typedef std::unique_ptr ClangASTImporterUP;
 typedef std::unique_ptr ClangASTSourceUP;
-typedef std::shared_ptr ClangExpressionVariableSP;
 typedef std::unique_ptr ClangModulesDeclVendorUP;
 typedef std::unique_ptr ClangPersistentVariablesUP;
 typedef std::shared_ptr ClangUserExpressionSP;
@@ -323,6 +322,7 @@
 typedef std::unique_ptr DynamicLoaderUP;
 typedef std::shared_ptr EventSP;
 typedef std::shared_ptr ExecutionContextRefSP;
+typedef std::shared_ptr ExpressionVariableSP;
 typedef std::shared_ptr FileSP;
 typedef std::shared_ptr FunctionSP;
 typedef std::shared_ptr FuncUnwindersSP;
Index: include/lldb/Target/ThreadPlanCallUserExpression.h
===
--- include/lldb/Target/ThreadPlanCallUserExpression.h
+++ include/lldb/Target/ThreadPlanCallUserExpression.h
@@ -52,7 +52,7 @@
 m_manage_materialization = true;
 }
 
-lldb::ClangExpressionVariableSP
+lldb::ExpressionVariableSP
 GetExpressionVariable() override
 {
 return m_result_var_sp;
@@ -64,7 +64,7 @@
  // User expression the initiated this ThreadPlan
  // lives as long as the thread plan does.
 bool m_manage_materialization = false;
-lldb::ClangExpressionVariableSP m_result_var_sp; // If we are left to manage the materialization,
+lldb::ExpressionVariableSP m_result_var_sp; // If we are left to manage the materialization,
  // then stuff the result expression variable here.
 
 DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);
Index: include/lldb/Target/ThreadPlan.h
===
--- include/lldb/Target/ThreadPlan.h
+++ include/lldb/Target/ThreadPlan.h
@@ -519,10 +519,10 @@
 // the user regained control at that point) a subsequent process control command step/continue/etc. might
 // complete the expression evaluations.  If so, the result of the expression evaluation will show up here.
 
-virtual lldb::ClangExpressionVariableSP
+virtual lldb::ExpressionVariableSP
 GetExpressionVariable ()
 {
-return lldb::ClangExpressionVariableSP();
+return lldb::ExpressionVariableSP();
 }
 
 // If a thread plan stores the state before it was run, then you might
Index: include/lldb/Target/Thread.h
===
--- include/lldb/Target/Thread.h
+++ include/lldb/Target/Thread.h
@@ -988,11 +988,11 @@
 /// Gets the outer-most expression variable from the completed plans
 ///
 /// @return
-/// A ClangExpressionVariableSP, either empty if there is no
+/// 

Re: [Lldb-commits] [PATCH] D12612: Fix dotest on Windows after multiprocessing refactor

2015-09-03 Thread Ying Chen via lldb-commits
chying accepted this revision.
chying added a comment.

This patch works for me.
Although I thought we could put less code in main() function.
Then have 
if __name__ == "__main__":

  main()

But that will require some more work to refactor the code. Probably that could 
wait for Todd's clean up.


http://reviews.llvm.org/D12612



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


[Lldb-commits] [lldb] r246816 - Protect dotest.py with an if __name__ == "__main__"

2015-09-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Sep  3 18:03:16 2015
New Revision: 246816

URL: http://llvm.org/viewvc/llvm-project?rev=246816&view=rev
Log:
Protect dotest.py with an if __name__ == "__main__"

Modified:
lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=246816&r1=246815&r2=246816&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Thu Sep  3 18:03:16 2015
@@ -1261,580 +1261,581 @@ def isMultiprocessTestRunner():
 # test runner
 return not (is_inferior_test_runner or no_multiprocess_test_runner)
 
-# On MacOS X, check to make sure that domain for com.apple.DebugSymbols 
defaults
-# does not exist before proceeding to running the test suite.
-if sys.platform.startswith("darwin"):
-checkDsymForUUIDIsNotOn()
-
-#
-# Start the actions by first parsing the options while setting up the test
-# directories, followed by setting up the search paths for lldb utilities;
-# then, we walk the directory trees and collect the tests into our test suite.
-#
-parseOptionsAndInitTestdirs()
-
-# If we are running as the multiprocess test runner, kick off the
-# multiprocess test runner here.
-if isMultiprocessTestRunner():
-import dosep
-dosep.main(output_on_success, num_threads, multiprocess_test_subdir)
-raise "should never get here"
-
-setupSysPath()
-setupCrashInfoHook()
-
-#
-# If '-l' is specified, do not skip the long running tests.
-if not skip_long_running_test:
-os.environ["LLDB_SKIP_LONG_RUNNING_TEST"] = "NO"
-
-# For the time being, let's bracket the test runner within the
-# lldb.SBDebugger.Initialize()/Terminate() pair.
-import lldb
-
-# Create a singleton SBDebugger in the lldb namespace.
-lldb.DBG = lldb.SBDebugger.Create()
-
-if lldb_platform_name:
-print "Setting up remote platform '%s'" % (lldb_platform_name)
-lldb.remote_platform = lldb.SBPlatform(lldb_platform_name)
-if not lldb.remote_platform.IsValid():
-print "error: unable to create the LLDB platform named '%s'." % 
(lldb_platform_name)
-exitTestSuite(1)
-if lldb_platform_url:
-# We must connect to a remote platform if a LLDB platform URL was 
specified
-print "Connecting to remote platform '%s' at '%s'..." % 
(lldb_platform_name, lldb_platform_url)
-lldb.platform_url = lldb_platform_url
-platform_connect_options = 
lldb.SBPlatformConnectOptions(lldb_platform_url)
-err = lldb.remote_platform.ConnectRemote(platform_connect_options)
-if err.Success():
-print "Connected."
-else:
-print "error: failed to connect to remote platform using URL '%s': 
%s" % (lldb_platform_url, err)
+if __name__ == "__main__":
+# On MacOS X, check to make sure that domain for com.apple.DebugSymbols 
defaults
+# does not exist before proceeding to running the test suite.
+if sys.platform.startswith("darwin"):
+checkDsymForUUIDIsNotOn()
+
+#
+# Start the actions by first parsing the options while setting up the test
+# directories, followed by setting up the search paths for lldb utilities;
+# then, we walk the directory trees and collect the tests into our test 
suite.
+#
+parseOptionsAndInitTestdirs()
+
+# If we are running as the multiprocess test runner, kick off the
+# multiprocess test runner here.
+if isMultiprocessTestRunner():
+import dosep
+dosep.main(output_on_success, num_threads, multiprocess_test_subdir)
+raise "should never get here"
+
+setupSysPath()
+setupCrashInfoHook()
+
+#
+# If '-l' is specified, do not skip the long running tests.
+if not skip_long_running_test:
+os.environ["LLDB_SKIP_LONG_RUNNING_TEST"] = "NO"
+
+# For the time being, let's bracket the test runner within the
+# lldb.SBDebugger.Initialize()/Terminate() pair.
+import lldb
+
+# Create a singleton SBDebugger in the lldb namespace.
+lldb.DBG = lldb.SBDebugger.Create()
+
+if lldb_platform_name:
+print "Setting up remote platform '%s'" % (lldb_platform_name)
+lldb.remote_platform = lldb.SBPlatform(lldb_platform_name)
+if not lldb.remote_platform.IsValid():
+print "error: unable to create the LLDB platform named '%s'." % 
(lldb_platform_name)
 exitTestSuite(1)
+if lldb_platform_url:
+# We must connect to a remote platform if a LLDB platform URL was 
specified
+print "Connecting to remote platform '%s' at '%s'..." % 
(lldb_platform_name, lldb_platform_url)
+lldb.platform_url = lldb_platform_url
+platform_connect_options = 
lldb.SBPlatformConnectOptions(lldb_platform_url)
+err = lldb.remote_platform.ConnectRemote(platform_connect_options)
+if err.Success():
+print "Connected."
+else:
+

Re: [Lldb-commits] [PATCH] D12612: Fix dotest on Windows after multiprocessing refactor

2015-09-03 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D12612#239698, @chying wrote:

> This patch works for me.
>  Although I thought we could put less code in main() function.
>  Then have 
>  if __name__ == "__main__":
>
>   main()
>
> But that will require some more work to refactor the code. Probably that 
> could wait for Todd's clean up.


Yep, let's wait on that.  There is a metric ton of code that needs to shift 
around in there, be broken down into bite-sized chunks of functionality, etc.  
We'll get it cleaned up with a main() function soon enough when we do some of 
that decomposition.


http://reviews.llvm.org/D12612



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


Re: [Lldb-commits] [PATCH] D12612: Fix dotest on Windows after multiprocessing refactor

2015-09-03 Thread Zachary Turner via lldb-commits
I tried that at first, but unfortunately in order to do that you have to
write a line like

global dont_do_dsym_test

for every global accessed by main.  Like you said, Todd can probably clean
that up, for now I just wanted to get something working.

On Thu, Sep 3, 2015 at 4:02 PM Ying Chen  wrote:

> chying accepted this revision.
> chying added a comment.
>
> This patch works for me.
> Although I thought we could put less code in main() function.
> Then have
> if __name__ == "__main__":
>
>   main()
>
> But that will require some more work to refactor the code. Probably that
> could wait for Todd's clean up.
>
>
> http://reviews.llvm.org/D12612
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12613: Lookup function using full name if one with mangled name is not found.

2015-09-03 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

About performance regression, I am not sure if it really does cause any; For 
those cases where looking up a function with mangled name actually works, the 
new lookup should not trigger. For those where it does not work, additional 
lookup could now make it work.

About cases where in looking up with full (demangled) name helps, the two test 
cases from which the expectedFailure decorators were removed are examples. 
Essentially, the issue is that the mangled name used by the inferior compiler 
is different from the mangled name as generated by LLDB (via Clang). However, 
since both the manglings resolve to the same demangled name, looking up a 
function using the demangled name works. Another example is 
std::vector::size(); GCC does not generate complete DWARF for the this 
method, and hence LLDB (via Clang) generates a different mangled name as 
compared to what is present in the SymTab.


http://reviews.llvm.org/D12613



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


[Lldb-commits] [lldb] r246820 - Lookup function using full name if one with mangled name is not found.

2015-09-03 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Thu Sep  3 18:27:10 2015
New Revision: 246820

URL: http://llvm.org/viewvc/llvm-project?rev=246820&view=rev
Log:
Lookup function using full name if one with mangled name is not found.

Summary:
Remove expected failure decorators from tests which now should start
passing.

Reviewers: clayborg, spyffe

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/test/expression_command/formatters/TestFormatters.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=246820&r1=246819&r2=246820&view=diff
==
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Thu Sep  3 18:27:10 
2015
@@ -47,6 +47,8 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 
+#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace clang;
@@ -498,6 +500,7 @@ FindCodeSymbolInContext
 (
 const ConstString &name,
 SymbolContext &sym_ctx,
+uint32_t name_type_mask,
 SymbolContextList &sc_list
 )
 {
@@ -506,7 +509,7 @@ FindCodeSymbolInContext
 if (sym_ctx.module_sp)
 sym_ctx.module_sp->FindFunctions(name,
  NULL,
- eFunctionNameTypeAuto,
+ name_type_mask,
  true,  // include_symbols
  false, // include_inlines
  true,  // append
@@ -515,7 +518,7 @@ FindCodeSymbolInContext
 {
 if (sym_ctx.target_sp)
 sym_ctx.target_sp->GetImages().FindFunctions(name,
- eFunctionNameTypeAuto,
+ name_type_mask,
  true,  // 
include_symbols
  false, // 
include_inlines
  true,  // append
@@ -573,10 +576,33 @@ ClangExpressionDeclMap::GetFunctionAddre
 
 SymbolContextList sc_list;
 
-FindCodeSymbolInContext(name, m_parser_vars->m_sym_ctx, sc_list);
+FindCodeSymbolInContext(name, m_parser_vars->m_sym_ctx, 
eFunctionNameTypeAuto, sc_list);
 
 uint32_t sc_list_size = sc_list.GetSize();
-
+
+if (sc_list_size == 0)
+{
+SymbolContext &sc = m_parser_vars->m_sym_ctx;
+if (sc.comp_unit)
+{
+LanguageType lang_type = sc.comp_unit->GetLanguage();
+if (Language::LanguageIsCPlusPlus(lang_type) &&
+CPlusPlusLanguage::IsCPPMangledName(name.AsCString()))
+{
+// 1. Demangle the name
+Mangled mangled(name, true);
+ConstString demangled = mangled.GetDemangledName(lang_type);
+
+if (demangled)
+{
+FindCodeSymbolInContext(
+demangled, m_parser_vars->m_sym_ctx, 
eFunctionNameTypeFull, sc_list);
+sc_list_size = sc_list.GetSize();
+}
+}
+}
+}
+
 if (sc_list_size == 0)
 {
 // We occasionally get debug information in which a const function is 
reported
@@ -592,7 +618,8 @@ ClangExpressionDeclMap::GetFunctionAddre
 if (log)
 log->Printf("Failed to find symbols given non-const name %s; 
trying %s", name.GetCString(), fixed_name.GetCString());
 
-FindCodeSymbolInContext(fixed_name, m_parser_vars->m_sym_ctx, 
sc_list);
+FindCodeSymbolInContext(
+fixed_name, m_parser_vars->m_sym_ctx, eFunctionNameTypeAuto, 
sc_list);
 sc_list_size = sc_list.GetSize();
 }
 }

Modified: lldb/trunk/test/expression_command/formatters/TestFormatters.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/formatters/TestFormatters.py?rev=246820&r1=246819&r2=246820&view=diff
==
--- lldb/trunk/test/expression_command/formatters/TestFormatters.py (original)
+++ lldb/trunk/test/expression_command/formatters/TestFormatters.py Thu Sep  3 
18:27:10 2015
@@ -26,7 +26,6 @@ class ExprFormattersTestCase(TestBase):
 self.do_my_test()
 
 @expectedFailureFreeBSD('llvm.org/pr19011') # Newer Clang omits C1 
complete object constructor
-@expectedFailureLinux('llvm.org/pr19011', ['cla

[Lldb-commits] [PATCH] D12615: Teach utilsOsType about NetBSD

2015-09-03 Thread Kamil Rytarowski via lldb-commits
krytarowski created this revision.
krytarowski added a reviewer: joerg.
krytarowski added a subscriber: lldb-commits.
krytarowski set the repository for this revision to rL LLVM.

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source 
operating system.

Repository:
  rL LLVM

http://reviews.llvm.org/D12615

Files:
  scripts/utilsOsType.py

Index: scripts/utilsOsType.py
===
--- scripts/utilsOsType.py
+++ scripts/utilsOsType.py
@@ -30,6 +30,7 @@
 values = [  "Unknown",
 "Darwin",
 "FreeBSD",
+"NetBSD",
 "Linux", 
 "Windows" ]
 class __metaclass__( type ):
@@ -69,6 +70,8 @@
 eOSType = EnumOsType.Darwin
 elif (strOS.startswith("freebsd")):
 eOSType = EnumOsType.FreeBSD
+elif (strOS.startswith("netbsd")):
+eOSType = EnumOsType.NetBSD
 elif (strOS.startswith("linux")):
 eOSType = EnumOsType.Linux
 elif strOS == "win32":


Index: scripts/utilsOsType.py
===
--- scripts/utilsOsType.py
+++ scripts/utilsOsType.py
@@ -30,6 +30,7 @@
 values = [  "Unknown",
 "Darwin",
 "FreeBSD",
+"NetBSD",
 "Linux", 
 "Windows" ]
 class __metaclass__( type ):
@@ -69,6 +70,8 @@
 eOSType = EnumOsType.Darwin
 elif (strOS.startswith("freebsd")):
 eOSType = EnumOsType.FreeBSD
+elif (strOS.startswith("netbsd")):
+eOSType = EnumOsType.NetBSD
 elif (strOS.startswith("linux")):
 eOSType = EnumOsType.Linux
 elif strOS == "win32":
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246821 - SystemRuntime/MacOSX no longer need ObjCRuntime header.

2015-09-03 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Thu Sep  3 18:57:09 2015
New Revision: 246821

URL: http://llvm.org/viewvc/llvm-project?rev=246821&view=rev
Log:
SystemRuntime/MacOSX no longer need ObjCRuntime header.

Summary:
The AppleGetQueuesHandler code no longer needs to include a header
from the AppleObjCRuntime, so we can remove workarounds that were
present in the build systems.

Reviewers: clayborg, jasonmolenda

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile

Modified: 
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp?rev=246821&r1=246820&r2=246821&view=diff
==
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp 
(original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp 
Thu Sep  3 18:57:09 2015
@@ -13,8 +13,6 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "AppleThreadPlanStepThroughObjCTrampoline.h"
-
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 
@@ -30,6 +28,8 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
 
 using namespace lldb;
 using namespace lldb_private;

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt?rev=246821&r1=246820&r2=246821&view=diff
==
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt Thu Sep  3 
18:57:09 2015
@@ -1,6 +1,3 @@
-# We depend on AppleThreadPlanStepThroughObjCTrampoline.h
-include_directories(../../LanguageRuntime/ObjC/AppleObjCRuntime)
-
 add_lldb_library(lldbPluginSystemRuntimeMacOSX
   AppleGetItemInfoHandler.cpp
   AppleGetPendingItemsHandler.cpp

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile?rev=246821&r1=246820&r2=246821&view=diff
==
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile Thu Sep  3 18:57:09 
2015
@@ -11,5 +11,4 @@ LLDB_LEVEL := ../../../..
 LIBRARYNAME := lldbPluginSystemRuntimeMacOSX
 BUILD_ARCHIVE = 1
 
-CPP.Flags += -I$(PROJ_SRC_DIR)/../../LanguageRuntime/ObjC/AppleObjCRuntime
 include $(LLDB_LEVEL)/Makefile


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


Re: [Lldb-commits] [PATCH] D12589: SystemRuntime/MacOSX no longer need ObjCRuntime header.

2015-09-03 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246821: SystemRuntime/MacOSX no longer need ObjCRuntime 
header. (authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D12589?vs=33903&id=33992#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12589

Files:
  lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
  lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
  lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile

Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile
===
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile
@@ -11,5 +11,4 @@
 LIBRARYNAME := lldbPluginSystemRuntimeMacOSX
 BUILD_ARCHIVE = 1
 
-CPP.Flags += -I$(PROJ_SRC_DIR)/../../LanguageRuntime/ObjC/AppleObjCRuntime
 include $(LLDB_LEVEL)/Makefile
Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
===
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
@@ -1,6 +1,3 @@
-# We depend on AppleThreadPlanStepThroughObjCTrampoline.h
-include_directories(../../LanguageRuntime/ObjC/AppleObjCRuntime)
-
 add_lldb_library(lldbPluginSystemRuntimeMacOSX
   AppleGetItemInfoHandler.cpp
   AppleGetPendingItemsHandler.cpp
Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
===
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
@@ -13,8 +13,6 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "AppleThreadPlanStepThroughObjCTrampoline.h"
-
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 
@@ -30,6 +28,8 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
 
 using namespace lldb;
 using namespace lldb_private;


Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile
===
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/Makefile
@@ -11,5 +11,4 @@
 LIBRARYNAME := lldbPluginSystemRuntimeMacOSX
 BUILD_ARCHIVE = 1
 
-CPP.Flags += -I$(PROJ_SRC_DIR)/../../LanguageRuntime/ObjC/AppleObjCRuntime
 include $(LLDB_LEVEL)/Makefile
Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
===
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/CMakeLists.txt
@@ -1,6 +1,3 @@
-# We depend on AppleThreadPlanStepThroughObjCTrampoline.h
-include_directories(../../LanguageRuntime/ObjC/AppleObjCRuntime)
-
 add_lldb_library(lldbPluginSystemRuntimeMacOSX
   AppleGetItemInfoHandler.cpp
   AppleGetPendingItemsHandler.cpp
Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
===
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
@@ -13,8 +13,6 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "AppleThreadPlanStepThroughObjCTrampoline.h"
-
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 
@@ -30,6 +28,8 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
 
 using namespace lldb;
 using namespace lldb_private;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12599: Only export public symbols with the cmake build.

2015-09-03 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

tfiala, on Mac OS X with this change, the liblldb.dylib went from 58468408 to 
53626572 bytes (release build).


http://reviews.llvm.org/D12599



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


[Lldb-commits] [lldb] r246822 - Only export public symbols with the cmake build.

2015-09-03 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Thu Sep  3 19:00:41 2015
New Revision: 246822

URL: http://llvm.org/viewvc/llvm-project?rev=246822&view=rev
Log:
Only export public symbols with the cmake build.

Summary:
This also moves the xcode support files to be near or the same
as the ones used for cmake.

The source/API/liblldb.xcodes.exports differs from the
source/API/liblldb.exports in that one contains the actual
symbol names (_ prefixed) while the other contains the symbol
names as they are in the code. The liblldb.exports file is
preprocessed by the cmake scripts into the correct per-platform
file needed (like a linker script on Linux).

This is not enabled on Windows as Windows doesn't use the same
name mangling and so it won't be valid there. Also, this is handled
already in a different way on Windows (via dll exports).

Reviewers: emaste, clayborg, labath, chaoren

Subscribers: lldb-commits

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

Added:
lldb/trunk/source/API/liblldb.exports
lldb/trunk/source/API/liblldb.xcode.exports
  - copied, changed from r246821, 
lldb/trunk/resources/lldb-framework-exports
lldb/trunk/tools/argdumper/argdumper.exports
  - copied, changed from r246821, lldb/trunk/tools/lldb-server/exports
lldb/trunk/tools/lldb-mi/lldb-mi.exports
  - copied, changed from r246821, lldb/trunk/tools/argdumper/exports
lldb/trunk/tools/lldb-server/lldb-server.exports
  - copied, changed from r246821, lldb/trunk/tools/lldb-server/exports
Removed:
lldb/trunk/resources/lldb-framework-exports
lldb/trunk/tools/argdumper/exports
lldb/trunk/tools/lldb-server/exports
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=246822&r1=246821&r2=246822&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Sep  3 19:00:41 2015
@@ -7257,7 +7257,7 @@
CURRENT_PROJECT_VERSION = 350.99.0;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 350.99.0;
-   EXPORTED_SYMBOLS_FILE = 
"resources/lldb-framework-exports";
+   EXPORTED_SYMBOLS_FILE = 
"source/API/liblldb.xcode.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",

"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7330,7 +7330,7 @@
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 350.99.0;
-   EXPORTED_SYMBOLS_FILE = 
"resources/lldb-framework-exports";
+   EXPORTED_SYMBOLS_FILE = 
"source/API/liblldb.xcode.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",

"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7720,7 +7720,7 @@
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 350.99.0;
-   EXPORTED_SYMBOLS_FILE = 
"resources/lldb-framework-exports";
+   EXPORTED_SYMBOLS_FILE = 
"source/API/liblldb.xcode.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",

"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8007,7 +8007,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
DEAD_CODE_STRIPPING = YES;
-   EXPORTED_SYMBOLS_FILE = 
"tools/lldb-server/exports";
+   EXPORTED_SYMBOLS_FILE = 
"tools/lldb-server/lldb-server.exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",

"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8080,7 +8080,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
DEAD_CODE_STRIPPING = YES;
-   EXPORTED_SYMBOLS_FILE = 
"tools/lldb-server/exports";
+   EXPORTED_SYMBOLS_FILE = 
"tools/lldb-server/lldb-server.exports";
FRAMEWORK_SE

Re: [Lldb-commits] [PATCH] D12599: Only export public symbols with the cmake build.

2015-09-03 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246822: Only export public symbols with the cmake build. 
(authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D12599?vs=33942&id=33993#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12599

Files:
  lldb/trunk/lldb.xcodeproj/project.pbxproj
  lldb/trunk/resources/lldb-framework-exports
  lldb/trunk/source/API/CMakeLists.txt
  lldb/trunk/source/API/liblldb.exports
  lldb/trunk/source/API/liblldb.xcode.exports
  lldb/trunk/tools/argdumper/argdumper.exports
  lldb/trunk/tools/argdumper/exports
  lldb/trunk/tools/lldb-mi/lldb-mi.exports
  lldb/trunk/tools/lldb-server/exports
  lldb/trunk/tools/lldb-server/lldb-server.exports

Index: lldb/trunk/source/API/liblldb.xcode.exports
===
--- lldb/trunk/source/API/liblldb.xcode.exports
+++ lldb/trunk/source/API/liblldb.xcode.exports
@@ -0,0 +1,3 @@
+__ZN4lldb*
+__ZNK4lldb*
+_init_lld*
Index: lldb/trunk/source/API/CMakeLists.txt
===
--- lldb/trunk/source/API/CMakeLists.txt
+++ lldb/trunk/source/API/CMakeLists.txt
@@ -82,6 +82,10 @@
   VERSION ${LLDB_VERSION}
   )
 
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+  add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
+endif()
+
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
   # so only it needs to explicitly link against ${PYTHON_LIBRARY}
Index: lldb/trunk/source/API/liblldb.exports
===
--- lldb/trunk/source/API/liblldb.exports
+++ lldb/trunk/source/API/liblldb.exports
@@ -0,0 +1,3 @@
+_ZN4lldb*
+_ZNK4lldb*
+init_lld*
Index: lldb/trunk/resources/lldb-framework-exports
===
--- lldb/trunk/resources/lldb-framework-exports
+++ lldb/trunk/resources/lldb-framework-exports
@@ -1,3 +0,0 @@
-__ZN4lldb*
-__ZNK4lldb*
-_init_lld*
Index: lldb/trunk/lldb.xcodeproj/project.pbxproj
===
--- lldb/trunk/lldb.xcodeproj/project.pbxproj
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj
@@ -7257,7 +7257,7 @@
 CURRENT_PROJECT_VERSION = 350.99.0;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7330,7 +7330,7 @@
 DEAD_CODE_STRIPPING = YES;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -7720,7 +7720,7 @@
 DEAD_CODE_STRIPPING = YES;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8007,7 +8007,7 @@
 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 "CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
 DEAD_CODE_STRIPPING = YES;
-EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8080,7 +8080,7 @@
 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 "CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
 DEAD_CODE_STRIPPING = YES;
-EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8150,7 +8150,7 @@
 			buildSettings = {
 COPY_PHASE_STRIP = YES;
 DEAD_CODE_STRIPPING = YES;
-EXPORTED_SYMBOLS_FILE = "tools/lldb-server/exports";
+EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8430,7 +8430,7 @@
 CURRENT_PROJECT_VERSION = 350.99.0;
 DYLIB_COMPATIBILITY_VERSION = 1;
 DYLIB_CURRENT_VERSION = 350.99.0;
-EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
+EXPORTED_SYMBOLS_FILE = "source/API/liblldb.xcode.exports";
 FRAMEWORK_SEARCH_PATHS = (
 	"$(inherited)",
 	"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -8556,7 +8556,7 @@
 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 "CODE_SIGN_

  1   2   >