[Lldb-commits] [lldb] r251522 - Fix build break on OS X from cleanup check-in.

2015-10-28 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Wed Oct 28 10:24:19 2015
New Revision: 251522

URL: http://llvm.org/viewvc/llvm-project?rev=251522&view=rev
Log:
Fix build break on OS X from cleanup check-in.

I'll track down why our CI is not sending out emails on build breaks.

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

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=251522&r1=251521&r2=251522&view=diff
==
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Wed Oct 28 10:24:19 2015
@@ -14,6 +14,9 @@
 #endif
 
 // C++ Includes
+#if defined(__APPLE__)
+#include 
+#endif
 #include 
 
 // Other libraries and framework includes
@@ -36,6 +39,8 @@
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/ThreadPlan.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] D14118: Changes for Bug 17384

2015-10-28 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

Hi,

looks like TestHelloWorld and TestInferiorAssert began to fail after this 
change - 
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/7880
Could you mark these tests as XFAILs for now?


http://reviews.llvm.org/D14118



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


[Lldb-commits] Buildbot e-mail notification has been changed

2015-10-28 Thread Galina Kistanova via lldb-commits
Hello everyone,

I continue works to reduce buildbot noise.
E-mail notification has been changed in the buildmaster. Now it should not
count interrupted builds to figure out if notification should be send.
So, some people might want to reconsider the notification rules for their
personal notifiers.

Please keep an eye on the notifications and let me know if something would
look wrong.

Thanks

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


Re: [Lldb-commits] [PATCH] D14136: Refactor Windows process plugin to enable sharing of code between live and post-mortem debugging

2015-10-28 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: source/Plugins/Process/Windows/Common/ProcessWindowsForward.h:20
@@ +19,1 @@
+#endif
\ No newline at end of file


Put a newline here


Comment at: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h:22
@@ -21,3 +21,3 @@
 
 class ProcessWinMiniDump : public lldb_private::Process
 {

I was expecting this to also derive from `ProcessWindows`, because I thought 
that was the whole point of moving `ProcessWindows` to common and then making 
`ProcessWindowsLive` inherit from it.  Is there goign to be some work on this 
in a followup patch or did I misunderstand the purpose of raising that up to 
the common area?


http://reviews.llvm.org/D14136



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


[Lldb-commits] [lldb] r251527 - Don't codesign lldbserver if debugserver codesigning is disabled, because it

2015-10-28 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Wed Oct 28 12:14:27 2015
New Revision: 251527

URL: http://llvm.org/viewvc/llvm-project?rev=251527&view=rev
Log:
Don't codesign lldbserver if debugserver codesigning is disabled, because it
probably won't work.

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

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=251527&r1=251526&r2=251527&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Oct 28 12:14:27 2015
@@ -6145,7 +6145,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
-   shellScript = "if [ \"${CONFIGURATION}\" != 
BuildAndIntegration ]\nthen\ncodesign -f -s lldb_codesign 
\"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\nfi\n";
+   shellScript = "if [ \"${CONFIGURATION}\" != 
BuildAndIntegration ]\nthen\nif [ \"${DEBUGSERVER_USE_FROM_SYSTEM}\" == 
\"\" ]\nthen\nif [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n  
  then\ncodesign -f -s lldb_codesign 
\"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\nfi\nfi\nfi\n";
};
940B04E21A89871F0045D5F7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;


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


Re: [Lldb-commits] [PATCH] D14136: Refactor Windows process plugin to enable sharing of code between live and post-mortem debugging

2015-10-28 Thread Adrian McCarthy via lldb-commits
amccarth added inline comments.


Comment at: source/Plugins/Process/Windows/Common/ProcessWindowsForward.h:20
@@ +19,1 @@
+#endif
\ No newline at end of file


zturner wrote:
> Put a newline here
Actually, this file is obsolete, so I'm deleting it instead.  It was included 
only from LocalDebugDelegate.cpp, which no longer needs it.


Comment at: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h:22
@@ -21,3 +21,3 @@
 
 class ProcessWinMiniDump : public lldb_private::Process
 {

zturner wrote:
> I was expecting this to also derive from `ProcessWindows`, because I thought 
> that was the whole point of moving `ProcessWindows` to common and then making 
> `ProcessWindowsLive` inherit from it.  Is there goign to be some work on this 
> in a followup patch or did I misunderstand the purpose of raising that up to 
> the common area?
Good eye!  Fixed.

The intent of this patch was to make it possible to start sharing code between 
the live and mini dump versions of the RegisterContextWindows classes.  (The 
next patch will actually do that.)  The other classes (Process, TargetThread) 
came along because of tight cooperation among them and the RegisterContext 
classes.  I wasn't really focused on making the mini dump versions deal with 
those (yet).  But this was trivial to fix now.


http://reviews.llvm.org/D14136



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


[Lldb-commits] [lldb] r251530 - Avoid using `..` in paths for include dirs.

2015-10-28 Thread Stephane Sezer via lldb-commits
Author: sas
Date: Wed Oct 28 12:34:45 2015
New Revision: 251530

URL: http://llvm.org/viewvc/llvm-project?rev=251530&view=rev
Log:
Avoid using `..` in paths for include dirs.

Summary:
This breaks when using a symlink from llvm/tools/lldb to the lldb source
tree, instead of cloning directly as a child. With this change, we can
build properly, even when using links.

Reviewers: dawn, brucem, zturner

Subscribers: lldb-commits

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

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

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


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


Re: [Lldb-commits] [PATCH] D14089: Avoid using `..` in paths for include dirs.

2015-10-28 Thread Stephane Sezer via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251530: Avoid using `..` in paths for include dirs. 
(authored by sas).

Changed prior to commit:
  http://reviews.llvm.org/D14089?vs=38454&id=38670#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14089

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

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


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


[Lldb-commits] [lldb] r251505 - Changes for Bug 17384

2015-10-28 Thread Ravitheja Addepally via lldb-commits
Author: ravitheja
Date: Wed Oct 28 04:47:29 2015
New Revision: 251505

URL: http://llvm.org/viewvc/llvm-project?rev=251505&view=rev
Log:
Changes for Bug 17384

Summary:
Virtual dynamic shared objects, or vdso files were 
not loaded for Linux OS.In Bug 17384 the call 
stack could not be unwinded from functions
residing in the vdso object.

This commit adds support for loading such files by
reading the Aux vectors since a vdso is invisibily 
mapped to the inferiors address space and the
 actual file is not present in the filesystem. The 
presence of the vdso is detected by inspecting 
the Aux vector for AT_SYSINFO_EHDR tag.

Reviewers: lldb-commits, ovyalov, tberghammer

Subscribers: lldb-commits

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

Modified:

lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
lldb/trunk/test/python_api/hello_world/TestHelloWorld.py

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=251505&r1=251504&r2=251505&view=diff
==
--- 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp 
Wed Oct 28 04:47:29 2015
@@ -91,7 +91,8 @@ DynamicLoaderPOSIXDYLD::DynamicLoaderPOS
   m_load_offset(LLDB_INVALID_ADDRESS),
   m_entry_point(LLDB_INVALID_ADDRESS),
   m_auxv(),
-  m_dyld_bid(LLDB_INVALID_BREAK_ID)
+  m_dyld_bid(LLDB_INVALID_BREAK_ID),
+  m_vdso_base(LLDB_INVALID_ADDRESS)
 {
 }
 
@@ -126,6 +127,8 @@ DynamicLoaderPOSIXDYLD::DidAttach()
 if (log)
 log->Printf ("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64 " executable 
'%s', load_offset 0x%" PRIx64, __FUNCTION__, m_process ? m_process->GetID () : 
LLDB_INVALID_PROCESS_ID, executable_sp ? 
executable_sp->GetFileSpec().GetPath().c_str () : "", 
load_offset);
 
+EvalVdsoStatus();
+
 // if we dont have a load address we cant re-base
 bool rebase_exec = (load_offset == LLDB_INVALID_ADDRESS) ? false : true;
 
@@ -213,6 +216,7 @@ DynamicLoaderPOSIXDYLD::DidLaunch()
 
 executable = GetTargetExecutable();
 load_offset = ComputeLoadOffset();
+EvalVdsoStatus();
 
 if (executable.get() && load_offset != LLDB_INVALID_ADDRESS)
 {
@@ -503,7 +507,15 @@ DynamicLoaderPOSIXDYLD::LoadAllCurrentMo
 // that ourselves here.
 ModuleSP executable = GetTargetExecutable();
 m_loaded_modules[executable] = m_rendezvous.GetLinkMapAddress();
-
+if (m_vdso_base != LLDB_INVALID_ADDRESS)
+{
+FileSpec file_spec("[vdso]", false);
+ModuleSP module_sp = LoadModuleAtAddress(file_spec, 
LLDB_INVALID_ADDRESS, m_vdso_base, false);
+if (module_sp.get())
+{
+module_list.Append(module_sp);
+}
+}
 for (I = m_rendezvous.begin(), E = m_rendezvous.end(); I != E; ++I)
 {
 ModuleSP module_sp = LoadModuleAtAddress(I->file_spec, I->link_addr, 
I->base_addr, true);
@@ -551,6 +563,16 @@ DynamicLoaderPOSIXDYLD::ComputeLoadOffse
 return m_load_offset;
 }
 
+void
+DynamicLoaderPOSIXDYLD::EvalVdsoStatus()
+{
+AuxVector::iterator I = m_auxv->FindEntry(AuxVector::AT_SYSINFO_EHDR);
+
+if (I != m_auxv->end())
+m_vdso_base = I->value;
+
+}
+
 addr_t
 DynamicLoaderPOSIXDYLD::GetEntryPoint()
 {

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h?rev=251505&r1=251504&r2=251505&view=diff
==
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h 
(original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h 
Wed Oct 28 04:47:29 2015
@@ -88,6 +88,10 @@ protected:
 /// Rendezvous breakpoint.
 lldb::break_id_t m_dyld_bid;
 
+/// Contains AT_SYSINFO_EHDR, which means a vDSO has been
+/// mapped to the address space
+lldb::addr_t m_vdso_base;
+
 /// Loaded module list. (link map for each module)
 std::map> 
m_loaded_modules;
 
@@ -159,6 +163,11 @@ protected:
 lldb::addr_t
 GetEntryPoint();
 
+/// Evaluate if Aux vectors contain vDSO information
+/// in case they do, read and assign the address to m_vdso_base
+void
+EvalVdsoStatus();
+
 /// Loads Module from inferior process.
 void
 ResolveExecutableModule(lldb::ModuleSP &module_sp);

Modified: lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
URL: 
http://llvm.org/viewvc/llvm-project/l

Re: [Lldb-commits] [PATCH] D14118: Changes for Bug 17384

2015-10-28 Thread Addepally, Ravitheja via lldb-commits
Hi,
I actually checked these two testcases, they are passing at my end, 
could u send me the logs and the lldb executables , so that I can check at my 
end ? I think I can try to resolve it, in other case I will mark them as XFAILS.


-Original Message-
From: Oleksiy Vyalov [mailto:ovya...@google.com] 
Sent: Wednesday, October 28, 2015 4:54 PM
To: Addepally, Ravitheja ; 
lldb-commits@lists.llvm.org; ovya...@google.com; tbergham...@google.com
Subject: Re: [PATCH] D14118: Changes for Bug 17384

ovyalov added a comment.

Hi,

looks like TestHelloWorld and TestInferiorAssert began to fail after this 
change - 
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/7880
Could you mark these tests as XFAILs for now?


http://reviews.llvm.org/D14118



Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14118: Changes for Bug 17384

2015-10-28 Thread Ravitheja Addepally via lldb-commits
ravitheja updated this revision to Diff 38637.
ravitheja added a comment.

Updates for previous comments.


http://reviews.llvm.org/D14118

Files:
  source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
  source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
  test/functionalities/inferior-assert/TestInferiorAssert.py
  test/python_api/hello_world/TestHelloWorld.py

Index: test/python_api/hello_world/TestHelloWorld.py
===
--- test/python_api/hello_world/TestHelloWorld.py
+++ test/python_api/hello_world/TestHelloWorld.py
@@ -73,7 +73,6 @@
 self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
 
 @add_test_categories(['pyapi'])
-@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
 @expectedFailureWindows("llvm.org/pr24600")
 def test_with_attach_to_process_with_id_api(self):
 """Create target, spawn a process, and attach to it with process id."""
@@ -102,7 +101,6 @@
'(int)argc=3'])
 
 @add_test_categories(['pyapi'])
-@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
 @expectedFailureWindows("llvm.org/pr24600")
 def test_with_attach_to_process_with_name_api(self):
 """Create target, spawn a process, and attach to it with process name."""
Index: test/functionalities/inferior-assert/TestInferiorAssert.py
===
--- test/functionalities/inferior-assert/TestInferiorAssert.py
+++ test/functionalities/inferior-assert/TestInferiorAssert.py
@@ -12,7 +12,6 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
 def test_inferior_asserting(self):
 """Test that lldb reliably catches the inferior asserting (command)."""
@@ -26,7 +25,6 @@
 self.build()
 self.inferior_asserting_registers()
 
-@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
 def test_inferior_asserting_disassemble(self):
 """Test that lldb reliably disassembles frames after asserting (command)."""
@@ -40,14 +38,12 @@
 self.build()
 self.inferior_asserting_python()
 
-@expectedFailurei386('llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly')
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
 def test_inferior_asserting_expr(self):
 """Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
 self.build()
 self.inferior_asserting_expr()
 
-@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
 def test_inferior_asserting_step(self):
 """Test that lldb functions correctly after stepping through a call to assert()."""
@@ -146,6 +142,12 @@
 thread = process.GetThreadAtIndex(0)
 self.assertTrue(thread.IsValid(), "current thread is valid")
 
+lastframeID = thread.GetFrameAtIndex(thread.GetNumFrames() - 1).GetFrameID()
+
+isi386Arch = False
+if "i386" in self.getArchitecture():
+isi386Arch = True
+
 # lldb should be able to disassemble frames from the inferior after asserting.
 for frame in thread:
 self.assertTrue(frame.IsValid(), "current frame is valid")
@@ -160,6 +162,9 @@
 pc_backup_offset = 1
 if frame.GetFrameID() == 0:
 pc_backup_offset = 0
+if isi386Arch == True:
+if lastframeID == frame.GetFrameID():
+pc_backup_offset = 0
 self.expect("disassemble -a %s" % (frame.GetPC() - pc_backup_offset),
 substrs = ['<+0>: '])
 
Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
===
--- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
+++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
@@ -88,6 +88,10 @@
 /// Rendezvous breakpoint.
 lldb::break_id_t m_dyld_bid;
 
+/// Contains AT_SYSINFO_EHDR, which means a vDSO has been
+/// mapped to the address space
+lldb::addr_t m_vdso_base;
+
 /// Loaded module list. (link map for each module)
 std::map> m_loaded_modules;
 

Re: [Lldb-commits] [PATCH] D14118: Changes for Bug 17384

2015-10-28 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

You can get test logs from this link - 
https://pantheon.corp.google.com/storage/browser/lldb_test_traces/lldb-x86_64-ubuntu-14.04-cmake/?project=android-devtools-lldb-build

I suspect that there are a few problems here:

1. TestHelloWorld - there is a race within the test since inferior  takes time 
to initialize llvm.org/pr24600
2. TestInferiorAssert - I think it's failing because of the way how GCE works 
with vdso



  looking at: Stack traces for SBProcess: pid = 12637, state = stopped, threads 
= 1, executable = test_with_attach_to_process_with_id_api_dwarf
  Stack trace for thread id=0x315d name=test_with_attac queue=None stop 
reason=signal
frame #0: 0x00f7788d80 None`None + -18446744069557678719
  
  
  
  Expecting sub string: main.c:30
  Not matched
  
  FAIL

I propose to mark these tests back as XFAIL for i386 - create a new bug for 
GCE-related failures and mark TestHelloWorld as failing due  llvm.org/pr24600 
as well.


http://reviews.llvm.org/D14118



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


[Lldb-commits] [lldb] r251537 - Make core files not crash when you load a core file into LLDB with just "lldb -c core".

2015-10-28 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct 28 13:04:38 2015
New Revision: 251537

URL: http://llvm.org/viewvc/llvm-project?rev=251537&view=rev
Log:
Make core files not crash when you load a core file into LLDB with just "lldb 
-c core". 

To do this I added a few new ways to determine the OS from PT_NOTE notes in the 
ELF file:
1 - Look for "LINUX" notes which indicate "linux" should be the OS
2 - Look through the "CORE" notes with NT_FILE as the type and sniff data from 
the paths listed in this section. On Ubuntu they contain 
"/lib/x86_64-linux-gnu" which has the triple and allows us to set "linux" as 
the OS in the architecture returned from ObjectFileELF::GetArchitecture(). 

Setting the OS correctly allows us to get the triple correct so we can extract 
registers without asserting and killing LLDB.

Also use the data from the NT_FILE to set the main executable if one isn't set 
in ProcessElfCore::DoLoadCore().
 

Modified:
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=251537&r1=251536&r2=251537&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Oct 28 
13:04:38 2015
@@ -49,6 +49,8 @@ const char *const LLDB_NT_OWNER_GNU
 const char *const LLDB_NT_OWNER_NETBSD  = "NetBSD";
 const char *const LLDB_NT_OWNER_CSR = "csr";
 const char *const LLDB_NT_OWNER_ANDROID = "Android";
+const char *const LLDB_NT_OWNER_CORE= "CORE";
+const char *const LLDB_NT_OWNER_LINUX   = "LINUX";
 
 // ELF note type definitions
 const elf_word LLDB_NT_FREEBSD_ABI_TAG  = 0x01;
@@ -67,6 +69,41 @@ const elf_word LLDB_NT_GNU_ABI_OS_LINUX
 const elf_word LLDB_NT_GNU_ABI_OS_HURD= 0x01;
 const elf_word LLDB_NT_GNU_ABI_OS_SOLARIS = 0x02;
 
+// LLDB_NT_OWNER_CORE and LLDB_NT_OWNER_LINUX note contants
+#define NT_PRSTATUS 1
+#define NT_PRFPREG  2
+#define NT_PRPSINFO 3
+#define NT_TASKSTRUCT   4
+#define NT_AUXV 6
+#define NT_SIGINFO  0x53494749
+#define NT_FILE 0x46494c45
+#define NT_PRXFPREG 0x46e62b7f
+#define NT_PPC_VMX  0x100
+#define NT_PPC_SPE  0x101
+#define NT_PPC_VSX  0x102
+#define NT_386_TLS  0x200
+#define NT_386_IOPERM   0x201
+#define NT_X86_XSTATE   0x202
+#define NT_S390_HIGH_GPRS   0x300
+#define NT_S390_TIMER   0x301
+#define NT_S390_TODCMP  0x302
+#define NT_S390_TODPREG 0x303
+#define NT_S390_CTRS0x304
+#define NT_S390_PREFIX  0x305
+#define NT_S390_LAST_BREAK  0x306
+#define NT_S390_SYSTEM_CALL 0x307
+#define NT_S390_TDB 0x308
+#define NT_S390_VXRS_LOW0x309
+#define NT_S390_VXRS_HIGH   0x30a
+#define NT_ARM_VFP  0x400
+#define NT_ARM_TLS  0x401
+#define NT_ARM_HW_BREAK 0x402
+#define NT_ARM_HW_WATCH 0x403
+#define NT_ARM_SYSTEM_CALL  0x404
+#define NT_METAG_CBUF   0x500
+#define NT_METAG_RPIPE  0x501
+#define NT_METAG_TLS0x502
+
 
//===--===//
 /// @class ELFRelocation
 /// @brief Generic wrapper for ELFRel and ELFRela.
@@ -1273,6 +1310,7 @@ ObjectFileELF::RefineModuleDetailsFromNo
 while (true)
 {
 // Parse the note header.  If this fails, bail out.
+const lldb::offset_t note_offset = offset;
 ELFNote note = ELFNote();
 if (!note.Parse(data, &offset))
 {
@@ -1280,11 +1318,6 @@ ObjectFileELF::RefineModuleDetailsFromNo
 return error;
 }
 
-// If a tag processor handles the tag, it should set processed to 
true, and
-// the loop will assume the tag processing has moved entirely past the 
note's payload.
-// Otherwise, leave it false and the end of the loop will handle the 
offset properly.
-bool processed = false;
-
 if (log)
 log->Printf ("ObjectFileELF::%s parsing note name='%s', type=%" 
PRIu32, __FUNCTION__, note.n_name.c_str (), note.n_type);
 
@@ -1293,9 +1326,6 @@ ObjectFileELF::RefineModuleDetailsFromNo
 (note.n_type == LLDB_NT_FREEBSD_ABI_TAG) &&
 (note.n_descsz == LLDB_NT_FREEBSD_ABI_SIZE))
 {
-// We'll consume the payload below.
-processed = true;
-
 // Pull out the min version info.
 uint32_t version_info;
 if (data.GetU32 (&offset, &version_info, 1) == nullptr)
@@ -1326,9 

[Lldb-commits] [lldb] r251542 - Mark TestHelloWorld and TestInferiorAssert.py as XFAIL due llvm.org/pr25338.

2015-10-28 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Wed Oct 28 13:36:11 2015
New Revision: 251542

URL: http://llvm.org/viewvc/llvm-project?rev=251542&view=rev
Log:
Mark TestHelloWorld and TestInferiorAssert.py as XFAIL due llvm.org/pr25338.


Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py?rev=251542&r1=251541&r2=251542&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
 Wed Oct 28 13:36:11 2015
@@ -13,6 +13,7 @@ class AssertingInferiorTestCase(TestBase
 mydir = TestBase.compute_mydir(__file__)
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
+@expectedFailurei386("llvm.org/pr25338")
 def test_inferior_asserting(self):
 """Test that lldb reliably catches the inferior asserting (command)."""
 self.build()
@@ -26,6 +27,7 @@ class AssertingInferiorTestCase(TestBase
 self.inferior_asserting_registers()
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
+@expectedFailurei386("llvm.org/pr25338")
 def test_inferior_asserting_disassemble(self):
 """Test that lldb reliably disassembles frames after asserting 
(command)."""
 self.build()
@@ -39,12 +41,14 @@ class AssertingInferiorTestCase(TestBase
 self.inferior_asserting_python()
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
+@expectedFailurei386("llvm.org/pr25338")
 def test_inferior_asserting_expr(self):
 """Test that the lldb expression interpreter can read from the 
inferior after asserting (command)."""
 self.build()
 self.inferior_asserting_expr()
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
+@expectedFailurei386("llvm.org/pr25338")
 def test_inferior_asserting_step(self):
 """Test that lldb functions correctly after stepping through a call to 
assert()."""
 self.build()

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py?rev=251542&r1=251541&r2=251542&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
 Wed Oct 28 13:36:11 2015
@@ -74,6 +74,7 @@ class HelloWorldTestCase(TestBase):
 
 @add_test_categories(['pyapi'])
 @expectedFailureWindows("llvm.org/pr24600")
+@expectedFailurei386("llvm.org/pr25338")
 def test_with_attach_to_process_with_id_api(self):
 """Create target, spawn a process, and attach to it with process id."""
 self.build(dictionary=self.d)
@@ -102,6 +103,7 @@ class HelloWorldTestCase(TestBase):
 
 @add_test_categories(['pyapi'])
 @expectedFailureWindows("llvm.org/pr24600")
+@expectedFailurei386("llvm.org/pr25338")
 def test_with_attach_to_process_with_name_api(self):
 """Create target, spawn a process, and attach to it with process 
name."""
 self.build(dictionary=self.d)


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


Re: [Lldb-commits] [PATCH] D14126: Make lldb-gdbserver to take explicit socket scheme as command line argument

2015-10-28 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

Greg, is it ok to submit the CL?


http://reviews.llvm.org/D14126



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


[Lldb-commits] [lldb] r251544 - Try to fix the linux buildbot.

2015-10-28 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Oct 28 14:18:53 2015
New Revision: 251544

URL: http://llvm.org/viewvc/llvm-project?rev=251544&view=rev
Log:
Try to fix the linux buildbot.

It's complaining that it doesn't under the "import" command, so
I guess I need this hashbang at the beginning so that it knows
it's a Python script.

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=251544&r1=251543&r2=251544&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Oct 28 14:18:53 2015
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 import use_lldb_suite
 
 import lldbsuite.test


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


[Lldb-commits] [lldb] r251547 - Make lldb-gdbserver to take explicit socket scheme as command line argument.

2015-10-28 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Wed Oct 28 14:49:50 2015
New Revision: 251547

URL: http://llvm.org/viewvc/llvm-project?rev=251547&view=rev
Log:
Make lldb-gdbserver to take explicit socket scheme as command line argument.

http://reviews.llvm.org/D14126


Modified:

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

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
lldb/trunk/tools/lldb-server/Acceptor.cpp
lldb/trunk/tools/lldb-server/Acceptor.h
lldb/trunk/tools/lldb-server/lldb-platform.cpp

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp?rev=251547&r1=251546&r2=251547&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
 Wed Oct 28 14:49:50 2015
@@ -46,9 +46,11 @@ using namespace lldb_private::process_gd
 //--
 // GDBRemoteCommunicationServerPlatform constructor
 //--
-GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(const
 Socket::SocketProtocol socket_protocol) :
+GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(const
 Socket::SocketProtocol socket_protocol,
+   
const char* socket_scheme) :
 GDBRemoteCommunicationServerCommon ("gdb-remote.server", 
"gdb-remote.server.rx_packet"),
 m_socket_protocol(socket_protocol),
+m_socket_scheme(socket_scheme),
 m_spawned_pids_mutex (Mutex::eMutexTypeRecursive),
 m_platform_sp (Platform::GetHostPlatform ()),
 m_port_map (),
@@ -150,6 +152,7 @@ GDBRemoteCommunicationServerPlatform::Ha
 std::ostringstream url;
 
 uint16_t* port_ptr = &port;
+url << m_socket_scheme << "://";
 if (m_socket_protocol == Socket::ProtocolTcp)
 url << platform_ip << ":" << port;
 else

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h?rev=251547&r1=251546&r2=251547&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
 (original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
 Wed Oct 28 14:49:50 2015
@@ -29,7 +29,8 @@ class GDBRemoteCommunicationServerPlatfo
 public:
 typedef std::map PortMap;
 
-GDBRemoteCommunicationServerPlatform(const Socket::SocketProtocol 
socket_protocol);
+GDBRemoteCommunicationServerPlatform(const Socket::SocketProtocol 
socket_protocol,
+ const char* socket_scheme);
 
 ~GDBRemoteCommunicationServerPlatform() override;
 
@@ -67,6 +68,7 @@ public:
 
 protected:
 const Socket::SocketProtocol m_socket_protocol;
+const std::string m_socket_scheme;
 Mutex m_spawned_pids_mutex;
 std::set m_spawned_pids;
 lldb::PlatformSP m_platform_sp;

Modified: lldb/trunk/tools/lldb-server/Acceptor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/Acceptor.cpp?rev=251547&r1=251546&r2=251547&view=diff
==
--- lldb/trunk/tools/lldb-server/Acceptor.cpp (original)
+++ lldb/trunk/tools/lldb-server/Acceptor.cpp Wed Oct 28 14:49:50 2015
@@ -37,7 +37,8 @@ SocketScheme socket_schemes[] = {
 {"unix-abstract", Socket::ProtocolUnixAbstract},
 };
 
-bool FindProtocolByScheme(const char* scheme, Socket::SocketProtocol& protocol)
+bool
+FindProtocolByScheme(const char* scheme, Socket::SocketProtocol& protocol)
 {
 for (auto s: socket_schemes)
 {
@@ -50,6 +51,17 @@ bool FindProtocolByScheme(const char* sc
 return false;
 }
 
+const char*
+FindSchemeByProtocol(const Socket::SocketProtocol protocol)
+{
+for (auto s: socket_schemes)
+{
+if (s.m_protocol == protocol)
+return s.m_scheme;
+}
+return nullptr;
+}
+
 }
 
 Error
@@ -78,6 +90,12 @@ Acceptor::GetSocketProtocol() const
 return m_listener_socket_up->GetSocketProtocol();
 }
 
+const char*
+Acceptor::GetSocketScheme() const
+{
+return FindSchemeByProtocol(GetSocketProtocol());
+}
+
 std::string
 Acceptor::GetLocalSocketId() const
 {

Modified: lldb/trunk/tools/lldb-server/Acceptor.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/Acceptor.h?rev=251547&r1=251546&r2=251547&view=diff

Re: [Lldb-commits] [PATCH] D14126: Make lldb-gdbserver to take explicit socket scheme as command line argument

2015-10-28 Thread Oleksiy Vyalov via lldb-commits
ovyalov closed this revision.
ovyalov added a comment.

Files:

  
/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
  
/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
  /lldb/trunk/tools/lldb-server/Acceptor.cpp
  /lldb/trunk/tools/lldb-server/Acceptor.h
  /lldb/trunk/tools/lldb-server/lldb-platform.cpp

Users:

  ovyalov (Author)

http://reviews.llvm.org/rL251547


http://reviews.llvm.org/D14126



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


[Lldb-commits] [lldb] r251549 - Add check for __main__ in dotest.py to ensure problems with multiprocessing on some Windows machines.

2015-10-28 Thread Adrian McCarthy via lldb-commits
Author: amccarth
Date: Wed Oct 28 14:59:18 2015
New Revision: 251549

URL: http://llvm.org/viewvc/llvm-project?rev=251549&view=rev
Log:
Add check for __main__ in dotest.py to ensure problems with multiprocessing on 
some Windows machines.

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=251549&r1=251548&r2=251549&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Oct 28 14:59:18 2015
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
-import use_lldb_suite
+if __name__ == "__main__":
+import use_lldb_suite
 
-import lldbsuite.test
-lldbsuite.test.run_suite()
+import lldbsuite.test
+lldbsuite.test.run_suite()


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


[Lldb-commits] [lldb] r251550 - Removed an unecessary code-signing phase on lldb-tool.

2015-10-28 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Wed Oct 28 15:07:46 2015
New Revision: 251550

URL: http://llvm.org/viewvc/llvm-project?rev=251550&view=rev
Log:
Removed an unecessary code-signing phase on lldb-tool.

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

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=251550&r1=251549&r2=251550&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Oct 28 15:07:46 2015
@@ -5944,7 +5944,6 @@
buildPhases = (
26F5C26710F3D9A4009D5894 /* Sources */,
26F5C26810F3D9A4009D5894 /* Frameworks */,
-   25ED0ED41A70979C00E3DA2E /* ShellScript */,
);
buildRules = (
);
@@ -6061,19 +6060,6 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
-   25ED0ED41A70979C00E3DA2E /* ShellScript */ = {
-   isa = PBXShellScriptBuildPhase;
-   buildActionMask = 2147483647;
-   files = (
-   );
-   inputPaths = (
-   );
-   outputPaths = (
-   );
-   runOnlyForDeploymentPostprocessing = 0;
-   shellPath = /bin/sh;
-   shellScript = "if [ \"${CONFIGURATION}\" != 
BuildAndIntegration ]\nthen\ncodesign -f -s lldb_codesign 
\"${TARGET_BUILD_DIR}/${PRODUCT_NAME}\"\nfi";
-   };
261B5A7511C3FA6F00AABD0A /* Fixup Framework Headers */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;


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


[Lldb-commits] [PATCH] D14157: Make dosep correctly invoke the top level script when doing the multiprocessing fork

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

This patch disables the ability to run 
`packages/Python/lldbsuite/test/dotest.py` as a standalone script by explicitly 
erroring out if it detects that to be the case.  Then, it fixes up the place 
where `dosep` exec's the script to actually exect the main script that we're 
running from, instead of hardcoding a path to `dotest.py`, which is now wrong 
in the presence of being imported as a package.

http://reviews.llvm.org/D14157

Files:
  packages/Python/lldbsuite/test/dosep.py
  packages/Python/lldbsuite/test/dotest.py

Index: packages/Python/lldbsuite/test/dotest.py
===
--- packages/Python/lldbsuite/test/dotest.py
+++ packages/Python/lldbsuite/test/dotest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 """
 A simple testing framework for lldb using python's unit testing framework.
 
@@ -2036,4 +2034,5 @@
 exitTestSuite(failed)
 
 if __name__ == "__main__":
-run_suite()
\ No newline at end of file
+print(__file__ + " is for use as a module only.  It should not be run as a 
standalone script.")
+sys.exit(-1)
Index: packages/Python/lldbsuite/test/dosep.py
===
--- packages/Python/lldbsuite/test/dosep.py
+++ packages/Python/lldbsuite/test/dosep.py
@@ -279,11 +279,12 @@
 return process_driver.results
 
 
-def process_dir(root, files, test_root, dotest_argv, inferior_pid_events):
+def process_dir(root, files, dotest_argv, inferior_pid_events):
 """Examine a directory for tests, and invoke any found within it."""
 results = []
 for name in files:
-script_file = os.path.join(test_root, "dotest.py")
+import __main__ as main
+script_file = main.__file__
 command = ([sys.executable, script_file] +
dotest_argv +
["--inferior", "-p", name, root])
@@ -966,7 +967,7 @@
 test_work_items = []
 find_test_files_in_dir_tree(
 test_subdir, lambda testdir, test_files: test_work_items.append([
-test_subdir, test_files, test_directory, dotest_argv, None]))
+test_subdir, test_files, dotest_argv, None]))
 
 # Convert test work items into test results using whatever
 # was provided as the test run function.


Index: packages/Python/lldbsuite/test/dotest.py
===
--- packages/Python/lldbsuite/test/dotest.py
+++ packages/Python/lldbsuite/test/dotest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 """
 A simple testing framework for lldb using python's unit testing framework.
 
@@ -2036,4 +2034,5 @@
 exitTestSuite(failed)
 
 if __name__ == "__main__":
-run_suite()
\ No newline at end of file
+print(__file__ + " is for use as a module only.  It should not be run as a standalone script.")
+sys.exit(-1)
Index: packages/Python/lldbsuite/test/dosep.py
===
--- packages/Python/lldbsuite/test/dosep.py
+++ packages/Python/lldbsuite/test/dosep.py
@@ -279,11 +279,12 @@
 return process_driver.results
 
 
-def process_dir(root, files, test_root, dotest_argv, inferior_pid_events):
+def process_dir(root, files, dotest_argv, inferior_pid_events):
 """Examine a directory for tests, and invoke any found within it."""
 results = []
 for name in files:
-script_file = os.path.join(test_root, "dotest.py")
+import __main__ as main
+script_file = main.__file__
 command = ([sys.executable, script_file] +
dotest_argv +
["--inferior", "-p", name, root])
@@ -966,7 +967,7 @@
 test_work_items = []
 find_test_files_in_dir_tree(
 test_subdir, lambda testdir, test_files: test_work_items.append([
-test_subdir, test_files, test_directory, dotest_argv, None]))
+test_subdir, test_files, dotest_argv, None]))
 
 # Convert test work items into test results using whatever
 # was provided as the test run function.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251555 - Don't crash when opening a fuzzed mach-o file that has bad dyld trie data.

2015-10-28 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct 28 15:49:34 2015
New Revision: 251555

URL: http://llvm.org/viewvc/llvm-project?rev=251555&view=rev
Log:
Don't crash when opening a fuzzed mach-o file that has bad dyld trie data.




Modified:
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=251555&r1=251554&r2=251555&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Wed Oct 28 
15:49:34 2015
@@ -2068,7 +2068,7 @@ struct TrieEntryWithOffset
 }
 };
 
-static void
+static bool
 ParseTrieEntries (DataExtractor &data,
   lldb::offset_t offset,
   const bool is_arm,
@@ -2077,7 +2077,7 @@ ParseTrieEntries (DataExtractor &data,
   std::vector& output)
 {
if (!data.ValidOffset(offset))
-return;
+return true;
 
const uint64_t terminalSize = data.GetULEB128(&offset);
lldb::offset_t children_offset = offset + terminalSize;
@@ -2128,19 +2128,27 @@ ParseTrieEntries (DataExtractor &data,
 
const uint8_t childrenCount = data.GetU8(&children_offset);
for (uint8_t i=0; i < childrenCount; ++i) {
-nameSlices.push_back(data.GetCStr(&children_offset));
+const char *cstr = data.GetCStr(&children_offset);
+if (cstr)
+nameSlices.push_back(llvm::StringRef(cstr));
+else
+return false; // Corrupt data
 lldb::offset_t childNodeOffset = data.GetULEB128(&children_offset);
if (childNodeOffset)
 {
-ParseTrieEntries(data,
- childNodeOffset,
- is_arm,
- nameSlices,
- resolver_addresses,
- output);
+if (!ParseTrieEntries(data,
+ childNodeOffset,
+ is_arm,
+ nameSlices,
+ resolver_addresses,
+ output))
+{
+return false;
+}
 }
 nameSlices.pop_back();
}
+return true;
 }
 
 size_t


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


[Lldb-commits] [lldb] r251556 - Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Core; other minor fixes.

2015-10-28 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Wed Oct 28 15:53:04 2015
New Revision: 251556

URL: http://llvm.org/viewvc/llvm-project?rev=251556&view=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in 
include/lldb/Core; other minor fixes.

Modified:
lldb/trunk/include/lldb/Core/ModuleSpec.h
lldb/trunk/include/lldb/Core/Opcode.h
lldb/trunk/include/lldb/Core/PluginManager.h
lldb/trunk/include/lldb/Core/RangeMap.h
lldb/trunk/include/lldb/Core/RegisterValue.h
lldb/trunk/include/lldb/Core/RegularExpression.h

Modified: lldb/trunk/include/lldb/Core/ModuleSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleSpec.h?rev=251556&r1=251555&r2=251556&view=diff
==
--- lldb/trunk/include/lldb/Core/ModuleSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleSpec.h Wed Oct 28 15:53:04 2015
@@ -10,6 +10,12 @@
 #ifndef liblldb_ModuleSpec_h_
 #define liblldb_ModuleSpec_h_
 
+// C Includes
+// C++ Includes
+#include 
+
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Stream.h"
 #include "lldb/Core/UUID.h"
@@ -100,17 +106,13 @@ public:
 FileSpec *
 GetFileSpecPtr ()
 {
-if (m_file)
-return &m_file;
-return NULL;
+return (m_file ? &m_file : nullptr);
 }
 
 const FileSpec *
 GetFileSpecPtr () const
 {
-if (m_file)
-return &m_file;
-return NULL;
+return (m_file ? &m_file : nullptr);
 }
 
 FileSpec &
@@ -118,6 +120,7 @@ public:
 {
 return m_file;
 }
+
 const FileSpec &
 GetFileSpec () const
 {
@@ -127,17 +130,13 @@ public:
 FileSpec *
 GetPlatformFileSpecPtr ()
 {
-if (m_platform_file)
-return &m_platform_file;
-return NULL;
+return (m_platform_file ? &m_platform_file : nullptr);
 }
 
 const FileSpec *
 GetPlatformFileSpecPtr () const
 {
-if (m_platform_file)
-return &m_platform_file;
-return NULL;
+return (m_platform_file ? &m_platform_file : nullptr);
 }
 
 FileSpec &
@@ -155,17 +154,13 @@ public:
 FileSpec *
 GetSymbolFileSpecPtr ()
 {
-if (m_symbol_file)
-return &m_symbol_file;
-return NULL;
+return (m_symbol_file ? &m_symbol_file : nullptr);
 }
 
 const FileSpec *
 GetSymbolFileSpecPtr () const
 {
-if (m_symbol_file)
-return &m_symbol_file;
-return NULL;
+return (m_symbol_file ? &m_symbol_file : nullptr);
 }
 
 FileSpec &
@@ -180,21 +175,16 @@ public:
 return m_symbol_file;
 }
 
-
 ArchSpec *
 GetArchitecturePtr ()
 {
-if (m_arch.IsValid())
-return &m_arch;
-return NULL;
+return (m_arch.IsValid() ? &m_arch : nullptr);
 }
 
 const ArchSpec *
 GetArchitecturePtr () const
 {
-if (m_arch.IsValid())
-return &m_arch;
-return NULL;
+return (m_arch.IsValid() ? &m_arch : nullptr);
 }
 
 ArchSpec &
@@ -212,17 +202,13 @@ public:
 UUID *
 GetUUIDPtr ()
 {
-if (m_uuid.IsValid())
-return &m_uuid;
-return NULL;
+return (m_uuid.IsValid() ? &m_uuid : nullptr);
 }
 
 const UUID *
 GetUUIDPtr () const
 {
-if (m_uuid.IsValid())
-return &m_uuid;
-return NULL;
+return (m_uuid.IsValid() ? &m_uuid : nullptr);
 }
 
 UUID &
@@ -306,7 +292,6 @@ public:
 m_object_mod_time.Clear();
 }
 
-
 explicit operator bool () const
 {
 if (m_file)
@@ -477,9 +462,7 @@ public:
 m_specs = rhs.m_specs;
 }
 
-~ModuleSpecList ()
-{
-}
+~ModuleSpecList() = default;
 
 ModuleSpecList &
 operator = (const ModuleSpecList &rhs)
@@ -529,6 +512,7 @@ public:
 {
 return m_specs[i];
 }
+
 bool
 GetModuleSpecAtIndex (size_t i, ModuleSpec &module_spec) const
 {
@@ -541,8 +525,7 @@ public:
 module_spec.Clear();
 return false;
 }
-
-
+
 bool
 FindMatchingModuleSpec (const ModuleSpec &module_spec, ModuleSpec 
&match_module_spec) const
 {
@@ -621,4 +604,4 @@ protected:
 
 } // namespace lldb_private
 
-#endif  // liblldb_ModuleSpec_h_
+#endif // liblldb_ModuleSpec_h_

Modified: lldb/trunk/include/lldb/Core/Opcode.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Opcode.h?rev=251556&r1=251555&r2=251556&view=diff
==
--- lldb/trunk/include/lldb/Core/Opcode.h (original)
+++ lldb/trunk/include/lldb/Core/Opcode.h Wed Oct 28 15:53:04 2015
@@ -16,6 +16,7 @@
 // C++ Includes
 // Other libraries and framework includes
 #include "llvm/Support/MathExtras.h"
+
 // Pr

[Lldb-commits] [PATCH] D14159: Add a Visual Studio solution for LLDB's Python code

2015-10-28 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added a reviewer: amccarth.
zturner added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer.

If you have PTVS [https://github.com/Microsoft/PTVS] installed, you can open 
this solution in Visual Studio and get an integrated debugging and development 
experience for LLDB's Python integration.

There are a few bugs with PTVS surrounding solution relocatability, so please 
try this out and see if it works for you.

http://reviews.llvm.org/D14159

Files:
  pyproj/lldb.pyproj

Index: pyproj/lldb.pyproj
===
--- /dev/null
+++ pyproj/lldb.pyproj
@@ -0,0 +1,972 @@
+
+http://schemas.microsoft.com/developer/msbuild/2003"; DefaultTargets="Build">
+  
+Debug
+2.0
+{23840f15-a3f8-48d0-b15f-d5a704504456}
+..\
+test\dotest.py
+
+.
+.
+{88a0-9f3d-457c-b088-3a5042f75d52}
+Standard Python launcher
+
+
+True
+-q --arch=i686 --executable D:/src/llvmbuild/ninja/bin/lldb.exe -s D:/src/llvmbuild/ninja/lldb-test-traces -u CXXFLAGS -u CFLAGS --enable-crash-dialog -C d:\src\llvmbuild\ninja_release\bin\clang.exe"
+  
+  
+  
+  
+10.0
+$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

[Lldb-commits] [lldb] r251559 - Skip this test is the test suite is running in a mode where it has no WindowServer access

2015-10-28 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Oct 28 17:08:09 2015
New Revision: 251559

URL: http://llvm.org/viewvc/llvm-project?rev=251559&view=rev
Log:
Skip this test is the test suite is running in a mode where it has no 
WindowServer access

Modified:

lldb/trunk/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py?rev=251559&r1=251558&r2=251559&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
 Wed Oct 28 17:08:09 2015
@@ -37,9 +37,12 @@ class Rdar12408181TestCase(TestBase):
 lldbutil.run_break_set_by_file_and_line (self, self.main_source, 
self.line, num_expected_locations=1, loc_exact=True)
 
 self.runCmd("run", RUN_SUCCEEDED)
-window = self.frame().FindVariable("window")
-window_dynamic = window.GetDynamicValue(lldb.eDynamicCanRunTarget)
-self.assertTrue(window.GetNumChildren() > 1, "NSWindow (static) only 
has 1 child!")
-self.assertTrue(window_dynamic.GetNumChildren() > 1, "NSWindow 
(dynamic) only has 1 child!")
-self.assertTrue(window.GetChildAtIndex(0).IsValid(), "NSWindow 
(static) has an invalid child")
-self.assertTrue(window_dynamic.GetChildAtIndex(0).IsValid(), "NSWindow 
(dynamic) has an invalid child")
+if 
self.frame().EvaluateExpression('(void*)_CGSDefaultConnection()').GetValueAsUnsigned()
 != 0:
+window = self.frame().FindVariable("window")
+window_dynamic = window.GetDynamicValue(lldb.eDynamicCanRunTarget)
+self.assertTrue(window.GetNumChildren() > 1, "NSWindow (static) 
only has 1 child!")
+self.assertTrue(window_dynamic.GetNumChildren() > 1, "NSWindow 
(dynamic) only has 1 child!")
+self.assertTrue(window.GetChildAtIndex(0).IsValid(), "NSWindow 
(static) has an invalid child")
+self.assertTrue(window_dynamic.GetChildAtIndex(0).IsValid(), 
"NSWindow (dynamic) has an invalid child")
+else:
+self.skipTest('no WindowServer connection')


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


[Lldb-commits] [lldb] r251561 - Fix Clang-tidy modernize-use-nullptr warnings in remaining files in include/lldb/Core; other minor fixes.

2015-10-28 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Wed Oct 28 17:11:25 2015
New Revision: 251561

URL: http://llvm.org/viewvc/llvm-project?rev=251561&view=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in remaining files in 
include/lldb/Core; other minor fixes.

Modified:
lldb/trunk/include/lldb/Core/STLUtils.h
lldb/trunk/include/lldb/Core/SourceManager.h
lldb/trunk/include/lldb/Core/Stream.h
lldb/trunk/include/lldb/Core/StringList.h
lldb/trunk/include/lldb/Core/StructuredData.h
lldb/trunk/include/lldb/Core/Timer.h
lldb/trunk/include/lldb/Core/UUID.h
lldb/trunk/include/lldb/Core/UniqueCStringMap.h
lldb/trunk/include/lldb/Core/Value.h
lldb/trunk/include/lldb/Core/ValueObject.h
lldb/trunk/include/lldb/Core/ValueObjectCast.h
lldb/trunk/include/lldb/Core/ValueObjectConstResult.h
lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h
lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h

Modified: lldb/trunk/include/lldb/Core/STLUtils.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/STLUtils.h?rev=251561&r1=251560&r2=251561&view=diff
==
--- lldb/trunk/include/lldb/Core/STLUtils.h (original)
+++ lldb/trunk/include/lldb/Core/STLUtils.h Wed Oct 28 17:11:25 2015
@@ -9,14 +9,18 @@
 
 #ifndef liblldb_STLUtils_h_
 #define liblldb_STLUtils_h_
-#if defined(__cplusplus)
 
+// C Includes
 #include 
 
+// C++ Includes
 #include 
 #include 
 #include 
 
+// Other libraries and framework includes
+// Project includes
+
 //--
 // C string less than compare function object
 //--
@@ -28,7 +32,6 @@ struct CStringCompareFunctionObject
 }
 };
 
-
 //--
 // C string equality function object (binary predicate).
 //--
@@ -40,7 +43,6 @@ struct CStringEqualBinaryPredicate
 }
 };
 
-
 //--
 // Templated type for finding an entry in a std::map whose value
 // is equal to something
@@ -48,21 +50,26 @@ struct CStringEqualBinaryPredicate
 template 
 class ValueEquals
 {
-private:
-S second_value;
-
 public:
 ValueEquals (const S& val) : second_value(val)
 {}
+
 // Compare the second item
 bool operator() (std::pair elem)
 {
 return elem.second == second_value;
 }
+
+private:
+S second_value;
 };
 
 template 
-inline void PrintAllCollectionElements (std::ostream &s, const T& coll, const 
char* header_cstr=NULL, const char* separator_cstr=" ")
+inline void
+PrintAllCollectionElements(std::ostream &s,
+   const T& coll,
+   const char* header_cstr = nullptr,
+   const char* separator_cstr = " ")
 {
 typename T::const_iterator pos;
 
@@ -88,7 +95,4 @@ struct for_each_cplusplus_delete
 typedef std::vector STLStringArray;
 typedef std::vector CStringArray;
 
-
-
-#endif  // #if defined(__cplusplus)
-#endif  // liblldb_STLUtils_h_
+#endif // liblldb_STLUtils_h_

Modified: lldb/trunk/include/lldb/Core/SourceManager.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SourceManager.h?rev=251561&r1=251560&r2=251561&view=diff
==
--- lldb/trunk/include/lldb/Core/SourceManager.h (original)
+++ lldb/trunk/include/lldb/Core/SourceManager.h Wed Oct 28 17:11:25 2015
@@ -13,6 +13,7 @@
 // C Includes
 // C++ Includes
 #include 
+#include 
 #include 
 
 // Other libraries and framework includes
@@ -26,12 +27,11 @@ class SourceManager
 {
 public:
 #ifndef SWIG
-
 class File
 {
-friend bool operator== (const SourceManager::File &lhs, const 
SourceManager::File &rhs);
+friend bool operator== (const SourceManager::File &lhs, const 
SourceManager::File &rhs);
+
 public:
-
 File (const FileSpec &file_spec, Target *target);
 ~File();
 
@@ -83,7 +83,6 @@ public:
 GetNumLines ();
 
 protected:
-
 bool
 CalculateLineOffsets (uint32_t line = UINT32_MAX);
 
@@ -95,20 +94,18 @@ public:
 typedef std::vector LineOffsets;
 LineOffsets m_offsets;
 };
-
 #endif // SWIG
 
 typedef std::shared_ptr FileSP;
 
 #ifndef SWIG
-
// The SourceFileCache class separates the source manager from the cache of 
source files, so the 
// cache can be stored in the Debugger, but the source managers can be per 
target. 
 class SourceFileCache
 {
 public:
-SourceFileCache () {}
-~SourceFileCache() {}
+SourceFileCache() = default;
+~SourceFileCache() = default;
 
 void

[Lldb-commits] [lldb] r251563 - Remove unused SUN_LEN macro for Android.

2015-10-28 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Wed Oct 28 17:21:02 2015
New Revision: 251563

URL: http://llvm.org/viewvc/llvm-project?rev=251563&view=rev
Log:
Remove unused SUN_LEN macro for Android.

Modified:
lldb/trunk/source/Host/posix/DomainSocket.cpp

Modified: lldb/trunk/source/Host/posix/DomainSocket.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/DomainSocket.cpp?rev=251563&r1=251562&r2=251563&view=diff
==
--- lldb/trunk/source/Host/posix/DomainSocket.cpp (original)
+++ lldb/trunk/source/Host/posix/DomainSocket.cpp Wed Oct 28 17:21:02 2015
@@ -17,13 +17,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-#ifdef __ANDROID__
-// Android does not have SUN_LEN
-#ifndef SUN_LEN
-#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + 
strlen((ptr)->sun_path))
-#endif
-#endif // #ifdef __ANDROID__
-
 namespace {
 
 const int kDomain = AF_UNIX;


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


[Lldb-commits] [PATCH] D14162: Create Python library `seven` in lldbsuite.support

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

The purpose of this file is to fill in the gaps where `six` is lacking support 
for some operation that we need.

Initially this just provides a replacement for the `commands` module which is 
no longer present in Python 3.


http://reviews.llvm.org/D14162

Files:
  packages/Python/lldbsuite/support/__init__.py
  packages/Python/lldbsuite/support/seven.py

Index: packages/Python/lldbsuite/support/seven.py
===
--- /dev/null
+++ packages/Python/lldbsuite/support/seven.py
@@ -0,0 +1,17 @@
+import six
+
+if six.PY2:
+import commands
+get_command_output = commands.getoutput
+get_command_status_output = commands.getstatusoutput
+
+else:
+def get_command_status_output(command):
+try:
+import subprocess
+return (0, subprocess.check_output(command, shell=True))
+except subprocess.CalledProcessError as e:
+return (e.returncode, e.output)
+
+def get_command_output(command):
+return get_command_status_output(command)[1]


Index: packages/Python/lldbsuite/support/seven.py
===
--- /dev/null
+++ packages/Python/lldbsuite/support/seven.py
@@ -0,0 +1,17 @@
+import six
+
+if six.PY2:
+import commands
+get_command_output = commands.getoutput
+get_command_status_output = commands.getstatusoutput
+
+else:
+def get_command_status_output(command):
+try:
+import subprocess
+return (0, subprocess.check_output(command, shell=True))
+except subprocess.CalledProcessError as e:
+return (e.returncode, e.output)
+
+def get_command_output(command):
+return get_command_status_output(command)[1]
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251564 - Change Target::EvaluateExpression to take an ExecutionContextScope * rather than a

2015-10-28 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Wed Oct 28 17:23:17 2015
New Revision: 251564

URL: http://llvm.org/viewvc/llvm-project?rev=251564&view=rev
Log:
Change Target::EvaluateExpression to take an ExecutionContextScope * rather 
than a
StackFrame * (StackFrame is an ExecutionContextScope.)  That allows you to call 
an
expression on a particular Thread, but not using the context of any particular 
frame.
That in turn is useful for injecting utility functions that don't actually 
depend on
locals/self/etc of the current frame.

I also had to include StackFrame.h in a couple of places so the compiler knew
how to downcast StackFrame to ExecutionContextScope.



Modified:
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/include/lldb/Target/Target.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=251564&r1=251563&r2=251564&view=diff
==
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Wed Oct 28 17:23:17 2015
@@ -1381,7 +1381,7 @@ public:
 // in in th execution context. 
 lldb::ExpressionResults
 EvaluateExpression (const char *expression,
-StackFrame *frame,
+ExecutionContextScope *exe_scope,
 lldb::ValueObjectSP &result_valobj_sp,
 const EvaluateExpressionOptions& options = 
EvaluateExpressionOptions());
 

Modified: lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/CF.cpp?rev=251564&r1=251563&r2=251564&view=diff
==
--- lldb/trunk/source/Plugins/Language/ObjC/CF.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/CF.cpp Wed Oct 28 17:23:17 2015
@@ -19,6 +19,7 @@
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Target/Language.h"
 #include "lldb/Target/ObjCLanguageRuntime.h"
+#include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp?rev=251564&r1=251563&r2=251564&view=diff
==
--- lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp Wed Oct 28 
17:23:17 2015
@@ -27,6 +27,7 @@
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Target/Language.h"
 #include "lldb/Target/ObjCLanguageRuntime.h"
+#include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Target/Target.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=251564&r1=251563&r2=251564&view=diff
==
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Wed Oct 28 17:23:17 2015
@@ -2165,7 +2165,7 @@ Target::GetTargetFromContexts (const Exe
 
 ExpressionResults
 Target::EvaluateExpression(const char *expr_cstr,
-   StackFrame *frame,
+   ExecutionContextScope *exe_scope,
lldb::ValueObjectSP &result_valobj_sp,
const EvaluateExpressionOptions& options)
 {
@@ -2183,9 +2183,9 @@ Target::EvaluateExpression(const char *e
 
 ExecutionContext exe_ctx;
 
-if (frame)
+if (exe_scope)
 {
-frame->CalculateExecutionContext(exe_ctx);
+exe_scope->CalculateExecutionContext(exe_ctx);
 }
 else if (m_process_sp)
 {


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


[Lldb-commits] [PATCH] D14163: Address another race condition running tests on Windows

2015-10-28 Thread Adrian McCarthy via lldb-commits
amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.

Another case where sleep-and-retry avoids file access errors on Windows.

http://reviews.llvm.org/D14163

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

Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -1820,7 +1820,14 @@
 # destination first if it already exists.
 os.remove(dst)
 
-os.rename(src, dst)
+try:
+os.rename(src, dst)
+except:
+# We've seen consistent rename failures on Windows, 
perhaps because the
+# just-created log file is being scanned by 
anti-virus.  Empirically, this
+# sleep-and-retry approach allows tests to succeed 
much more reliably.
+time.sleep(0.5)
+os.rename(src, dst)
 else:
 # success!  (and we don't want log files) delete log files
 for log_file in log_files_for_this_test:


Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -1820,7 +1820,14 @@
 # destination first if it already exists.
 os.remove(dst)
 
-os.rename(src, dst)
+try:
+os.rename(src, dst)
+except:
+# We've seen consistent rename failures on Windows, perhaps because the
+# just-created log file is being scanned by anti-virus.  Empirically, this
+# sleep-and-retry approach allows tests to succeed much more reliably.
+time.sleep(0.5)
+os.rename(src, dst)
 else:
 # success!  (and we don't want log files) delete log files
 for log_file in log_files_for_this_test:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14163: Address another race condition running tests on Windows

2015-10-28 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: packages/Python/lldbsuite/test/lldbtest.py:1823-1830
@@ -1822,3 +1822,10 @@
 
-os.rename(src, dst)
+try:
+os.rename(src, dst)
+except:
+# We've seen consistent rename failures on Windows, 
perhaps because the
+# just-created log file is being scanned by 
anti-virus.  Empirically, this
+# sleep-and-retry approach allows tests to succeed 
much more reliably.
+time.sleep(0.5)
+os.rename(src, dst)
 else:

I have a patch pending to create an `lldbsuite.support` package.  I wonder if 
it would be worth sinking this "rename with retry" (and similar for 
delete-with-retry) into this library.  Then you could call this as:

lldbsuite.support.filesystem.rename_with_retry(src, dst, 1)  # Retry up to 
1 time

I only mention this because this is now the second time we've had to do this 
(other time right below), so perhaps we might need this again in the future too.

I don't feel too strongly, so up to you.  If you think it's a good idea though, 
you'll probably need to wait until my CL goes in first so that you can add this 
method to the package (which doesn't exist yet)


http://reviews.llvm.org/D14163



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


Re: [Lldb-commits] [PATCH] D14163: Address another race condition running tests on Windows

2015-10-28 Thread Adrian McCarthy via lldb-commits
amccarth added inline comments.


Comment at: packages/Python/lldbsuite/test/lldbtest.py:1823-1830
@@ -1822,3 +1822,10 @@
 
-os.rename(src, dst)
+try:
+os.rename(src, dst)
+except:
+# We've seen consistent rename failures on Windows, 
perhaps because the
+# just-created log file is being scanned by 
anti-virus.  Empirically, this
+# sleep-and-retry approach allows tests to succeed 
much more reliably.
+time.sleep(0.5)
+os.rename(src, dst)
 else:

zturner wrote:
> I have a patch pending to create an `lldbsuite.support` package.  I wonder if 
> it would be worth sinking this "rename with retry" (and similar for 
> delete-with-retry) into this library.  Then you could call this as:
> 
> lldbsuite.support.filesystem.rename_with_retry(src, dst, 1)  # Retry up 
> to 1 time
> 
> I only mention this because this is now the second time we've had to do this 
> (other time right below), so perhaps we might need this again in the future 
> too.
> 
> I don't feel too strongly, so up to you.  If you think it's a good idea 
> though, you'll probably need to wait until my CL goes in first so that you 
> can add this method to the package (which doesn't exist yet)
I'm happy to wait.  I just glad I found the root cause.


http://reviews.llvm.org/D14163



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


[Lldb-commits] [lldb] r251578 - Initialize data_len to 0 in source/Plugins/Platform/Android/AdbClient.cpp

2015-10-28 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Oct 28 18:23:44 2015
New Revision: 251578

URL: http://llvm.org/viewvc/llvm-project?rev=251578&view=rev
Log:
Initialize data_len to 0 in source/Plugins/Platform/Android/AdbClient.cpp


Modified:
lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp

Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp?rev=251578&r1=251577&r2=251578&view=diff
==
--- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp Wed Oct 28 
18:23:44 2015
@@ -359,7 +359,7 @@ AdbClient::PushFile (const FileSpec &loc
 return error;
 
 std::string response_id;
-uint32_t data_len;
+uint32_t data_len = 0;
 error = ReadSyncHeader (response_id, data_len);
 if (error.Fail ())
 return Error ("Failed to read DONE response: %s", error.AsCString ());


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


[Lldb-commits] [lldb] r251579 - Make sure we don't over specify an architecture when we connect to KDP and use the CPU type and subtype to fill out an architecture. We do this by letting the vendor be

2015-10-28 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct 28 18:26:59 2015
New Revision: 251579

URL: http://llvm.org/viewvc/llvm-project?rev=251579&view=rev
Log:
Make sure we don't over specify an architecture when we connect to KDP and use 
the CPU type and subtype to fill out an architecture. We do this by letting the 
vendor be an unspecified unknown, or any. We also grab the target architecture, 
get the KDP host arch, and then merge the two before putting it back into the 
target.

Also change MH_PRELOAD to be use "unspecified unknown" (any) for the OS and 
vendor since these mach files can really be anything.


Modified:
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=251579&r1=251578&r2=251579&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Wed Oct 28 
18:26:59 2015
@@ -4768,16 +4768,22 @@ ObjectFileMachO::GetArchitecture (const
 if (arch.IsValid())
 {
 llvm::Triple &triple = arch.GetTriple();
+
+// Set OS to an unspecified unknown or a "*" so it can match any OS
+triple.setOS(llvm::Triple::UnknownOS);
+triple.setOSName(llvm::StringRef());
+
 if (header.filetype == MH_PRELOAD)
 {
-// Set OS to "unknown" - this is a standalone binary with no dyld 
et al
-triple.setOS(llvm::Triple::UnknownOS);
+// Set vendor to an unspecified unknown or a "*" so it can match 
any vendor
+triple.setVendor(llvm::Triple::UnknownVendor);
+triple.setVendorName(llvm::StringRef());
 return true;
 }
 else
 {
 struct load_command load_cmd;
-
+
 lldb::offset_t offset = lc_offset;
 for (uint32_t i=0; ihttp://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=251579&r1=251578&r2=251579&view=diff
==
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Wed Oct 28 
18:26:59 2015
@@ -244,6 +244,23 @@ ProcessKDP::WillAttachToProcessWithName
 return error;
 }
 
+bool
+ProcessKDP::GetHostArchitecture(ArchSpec &arch)
+{
+uint32_t cpu = m_comm.GetCPUType();
+if (cpu)
+{
+uint32_t sub = m_comm.GetCPUSubtype();
+arch.SetArchitecture(eArchTypeMachO, cpu, sub);
+// Leave architecture vendor as unspecified unknown
+arch.GetTriple().setVendor(llvm::Triple::UnknownVendor);
+arch.GetTriple().setVendorName(llvm::StringRef());
+return true;
+}
+arch.Clear();
+return false;
+}
+
 Error
 ProcessKDP::DoConnectRemote (Stream *strm, const char *remote_url)
 {
@@ -288,13 +305,16 @@ ProcessKDP::DoConnectRemote (Stream *str
 if (m_comm.SendRequestConnect(reply_port, reply_port, 
"Greetings from LLDB..."))
 {
 m_comm.GetVersion();
-uint32_t cpu = m_comm.GetCPUType();
-uint32_t sub = m_comm.GetCPUSubtype();
-ArchSpec kernel_arch;
-kernel_arch.SetArchitecture(eArchTypeMachO, cpu, sub);
+
 Target &target = GetTarget();
-
-target.SetArchitecture(kernel_arch);
+ArchSpec kernel_arch;
+// The host architecture
+GetHostArchitecture(kernel_arch);
+ArchSpec target_arch = target.GetArchitecture();
+// Merge in any unspecified stuff into the target 
architecture in
+// case the target arch isn't set at all or incompletely.
+target_arch.MergeFrom(kernel_arch);
+target.SetArchitecture(target_arch);
 
 /* Get the kernel's UUID and load address via 
KDP_KERNELVERSION packet.  */
 /* An EFI kdp session has neither UUID nor load address. */
@@ -333,8 +353,8 @@ ProcessKDP::DoConnectRemote (Stream *str
 
 if (module_spec.GetFileSpec().Exists())
 {
-ModuleSP module_sp(new Module 
(module_spec.GetFileSpec(), target.GetArchitecture()));
-if (module_sp.get() && 
module_sp->MatchesModuleSpec (module_spec))
+ModuleSP module_sp(new Module (module_spec));
+  

[Lldb-commits] [lldb] r251580 - Revert r251578. I was in the middle of editing the commit message

2015-10-28 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Oct 28 18:31:03 2015
New Revision: 251580

URL: http://llvm.org/viewvc/llvm-project?rev=251580&view=rev
Log:
Revert r251578.  I was in the middle of editing the commit message
and decided to not commit the change, but accidentally committed
it anyway.

This was based on a static analysis complaint; it thought there
was a code path where AdbClient::PushFile would call AdbClient::ReadSyncHeader
and AdbClient::ReadSyncHeader wouldn't set data_len.  But in that
case, the Error object returned will be Fail and we won't use
the data_len or response_id contents.


Modified:
lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp

Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp?rev=251580&r1=251579&r2=251580&view=diff
==
--- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp Wed Oct 28 
18:31:03 2015
@@ -359,7 +359,7 @@ AdbClient::PushFile (const FileSpec &loc
 return error;
 
 std::string response_id;
-uint32_t data_len = 0;
+uint32_t data_len;
 error = ReadSyncHeader (response_id, data_len);
 if (error.Fail ())
 return Error ("Failed to read DONE response: %s", error.AsCString ());


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


[Lldb-commits] [lldb] r251581 - Remove an unused local variable

2015-10-28 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Oct 28 18:36:44 2015
New Revision: 251581

URL: http://llvm.org/viewvc/llvm-project?rev=251581&view=rev
Log:
Remove an unused local variable

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

Modified: lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp?rev=251581&r1=251580&r2=251581&view=diff
==
--- lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp Wed Oct 28 18:36:44 
2015
@@ -385,7 +385,6 @@ TypeCategoryMap::LoopThrough(CallbackTyp
 for (begin = m_active_categories.begin(); begin != end; begin++)
 {
 lldb::TypeCategoryImplSP category = *begin;
-ConstString type = ConstString(category->GetName());
 if (!callback(param, category))
 break;
 }


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


[Lldb-commits] [lldb] r251583 - Fix potential null deref; after SymbolContextSpecifier::SymbolContextMatches

2015-10-28 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Oct 28 18:49:55 2015
New Revision: 251583

URL: http://llvm.org/viewvc/llvm-project?rev=251583&view=rev
Log:
Fix potential null deref; after SymbolContextSpecifier::SymbolContextMatches
has tested that sc.function is null, it would try to deref sc.function.
It should be calling sc.symbol here.

Modified:
lldb/trunk/source/Symbol/SymbolContext.cpp

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=251583&r1=251582&r2=251583&view=diff
==
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Wed Oct 28 18:49:55 2015
@@ -1089,7 +1089,7 @@ SymbolContextSpecifier::SymbolContextMat
 }
 else if (sc.symbol != nullptr)
 {
-if (!sc.symbol->GetMangled().NameMatches(func_name, 
sc.function->GetLanguage()))
+if (!sc.symbol->GetMangled().NameMatches(func_name, 
sc.symbol->GetLanguage()))
 return false;
 }
 }


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


[Lldb-commits] [lldb] r251584 - Static analyzer noticed that a null get_pending_items_caller could

2015-10-28 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Oct 28 19:08:03 2015
New Revision: 251584

URL: http://llvm.org/viewvc/llvm-project?rev=251584&view=rev
Log:
Static analyzer noticed that a null get_pending_items_caller could
be used.  Guard against that.

Modified:

lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp

Modified: 
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp?rev=251584&r1=251583&r2=251584&view=diff
==
--- 
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp 
Wed Oct 28 19:08:03 2015
@@ -178,7 +178,6 @@ AppleGetPendingItemsHandler::SetupGetPen
 {
 if (log)
 log->Printf("No pending-items introspection code found.");
-errors.Printf ("No pending-items introspection code found.");
 return LLDB_INVALID_ADDRESS;
 }
 
@@ -202,6 +201,13 @@ AppleGetPendingItemsHandler::SetupGetPen
 
 errors.Clear();
 
+if (get_pending_items_caller == nullptr)
+{
+if (log)
+log->Printf ("Failed to get get_pending_items_caller.");
+return LLDB_INVALID_ADDRESS;
+}
+
 // Now write down the argument values for this particular call.  This 
looks like it might be a race condition
 // if other threads were calling into here, but actually it isn't because 
we allocate a new args structure for
 // this call by passing args_addr = LLDB_INVALID_ADDRESS...


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


[Lldb-commits] [lldb] r251585 - Explicitly cast size_t var to (uint64_t) when printf format is PRIx64.

2015-10-28 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Oct 28 19:13:42 2015
New Revision: 251585

URL: http://llvm.org/viewvc/llvm-project?rev=251585&view=rev
Log:
Explicitly cast size_t var to (uint64_t) when printf format is PRIx64.

Modified:

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=251585&r1=251584&r2=251585&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 Wed Oct 28 19:13:42 2015
@@ -1586,7 +1586,7 @@ RenderScriptRuntime::LoadAllocation(Stre
 if (alloc_size != length)
 {
 strm.Printf("Warning: Mismatched allocation sizes - file 0x%" PRIx64 " 
bytes, allocation 0x%x bytes",
-length, alloc_size);
+(uint64_t) length, alloc_size);
 strm.EOL();
 length = alloc_size < length ? alloc_size : length; // Set length to 
copy to minimum
 }
@@ -1685,7 +1685,7 @@ RenderScriptRuntime::SaveAllocation(Stre
 // Write allocation data to file
 num_bytes = static_cast(*alloc->size.get());
 if (log)
-log->Printf("RenderScriptRuntime::SaveAllocation - Writing %" PRIx64  
"bytes from %p", num_bytes, buffer.get());
+log->Printf("RenderScriptRuntime::SaveAllocation - Writing 0x%" PRIx64 
" bytes from %p", (uint64_t) num_bytes, buffer.get());
 
 err = file.Write(buffer.get(), num_bytes);
 if (!err.Success())


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


[Lldb-commits] [lldb] r251586 - Xcode suggested enabling a "no common blocks" warning

2015-10-28 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Oct 28 19:21:14 2015
New Revision: 251586

URL: http://llvm.org/viewvc/llvm-project?rev=251586&view=rev
Log:
Xcode suggested enabling a "no common blocks" warning
(whatever that is) and wanted to clean up some duplicated
entries in the project files.  

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme

lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/launcherRootXPCService.xcscheme
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/launcherXPCService.xcscheme
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-gtest.xcscheme
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj

lldb/trunk/tools/debugserver/debugserver.xcodeproj/xcshareddata/xcschemes/debugserver.xcscheme

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=251586&r1=251585&r2=251586&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Oct 28 19:21:14 2015
@@ -93,7 +93,6 @@
239504E41BDD454B00963CEA /* TaskPoolTest.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 2321F9451BDD346100BA9A93 /* TaskPoolTest.cpp */; 
};
239504E51BDD454B00963CEA /* UriParserTest.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 2321F9461BDD346100BA9A93 /* UriParserTest.cpp 
*/; };
23DDF226196C3EE600BB8417 /* CommandOptionValidators.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 23DDF224196C3EE600BB8417 /* 
CommandOptionValidators.cpp */; };
-   23EDE33319269E7C00F6A132 /* NativeRegisterContext.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 23EDE3301926839700F6A132 /* 
NativeRegisterContext.cpp */; };
23EFE389193D1ABC00E54E54 /* SBTypeEnumMember.h in Headers */ = 
{isa = PBXBuildFile; fileRef = 23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h 
*/; settings = {ATTRIBUTES = (Public, ); }; };
23EFE38B193D1AEC00E54E54 /* SBTypeEnumMember.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 23EFE38A193D1AEC00E54E54 /* 
SBTypeEnumMember.cpp */; };
23F4034D1926E0F60046DC9B /* 
NativeRegisterContextRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; 
fileRef = 23F403481926CC250046DC9B /* NativeRegisterContextRegisterInfo.cpp */; 
};
@@ -312,7 +311,6 @@
26744EF31338317700EF765A /* GDBRemoteCommunicationServer.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 26744EEF1338317700EF765A /* 
GDBRemoteCommunicationServer.cpp */; };
26780C611867C33D00234593 /* libncurses.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; 
};
267A47FB1B1411C40021A5BC /* NativeRegisterContext.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 267A47FA1B1411C40021A5BC /* 
NativeRegisterContext.cpp */; };
-   267A47FD1B1411CC0021A5BC /* 
NativeRegisterContextRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; 
fileRef = 267A47FC1B1411CC0021A5BC /* NativeRegisterContextRegisterInfo.cpp */; 
};
267A47FF1B1411D90021A5BC /* NativeWatchpointList.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 267A47FE1B1411D90021A5BC /* 
NativeWatchpointList.cpp */; };
267A48011B1411E40021A5BC /* XML.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 267A48001B1411E40021A5BC /* XML.cpp */; };
267C012B136880DF006E963E /* OptionGroupValueObjectDisplay.cpp 
in Sources */ = {isa = PBXBuildFile; fileRef = 267C012A136880DF006E963E /* 
OptionGroupValueObjectDisplay.cpp */; };
@@ -875,7 +873,6 @@
AF77E08F1A033C700096C0EA /* ABISysV_ppc.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF77E08D1A033C700096C0EA /* ABISysV_ppc.cpp */; 
};
AF77E0931A033C7F0096C0EA /* ABISysV_ppc64.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF77E0911A033C7F0096C0EA /* ABISysV_ppc64.cpp 
*/; };
AF77E0A11A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp 
in Sources */ = {isa = PBXBuildFile; fileRef = AF77E09A1A033D360096C0EA /* 
RegisterContextFreeBSD_powerpc.cpp */; };
-   AF77E0A31A033D360096C0EA /* 
RegisterContextMacOSXFrameBackchain.cpp in Sources */ = {isa = PBXBuildFile; 
fileRef = AF77E09C1A033D360096C0EA /* RegisterContextMacOSXFrameBackchain.cpp 
*/; };
AF77E0A41A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = AF77E09D1A033D360096C0EA /* 
RegisterContextPOSIX_powerpc.cpp */; };
AF77E0A91A033D740096C0EA /* 
RegisterContextP

[Lldb-commits] [lldb] r251587 - Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Expression and Host; other minor fixes.

2015-10-28 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Wed Oct 28 19:27:24 2015
New Revision: 251587

URL: http://llvm.org/viewvc/llvm-project?rev=251587&view=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Expression and 
Host; other minor fixes.

Modified:
lldb/trunk/include/lldb/Expression/ExpressionVariable.h
lldb/trunk/include/lldb/Expression/FunctionCaller.h
lldb/trunk/include/lldb/Expression/IRExecutionUnit.h
lldb/trunk/include/lldb/Expression/Materializer.h
lldb/trunk/include/lldb/Expression/UserExpression.h
lldb/trunk/include/lldb/Expression/UtilityFunction.h
lldb/trunk/include/lldb/Host/Condition.h
lldb/trunk/include/lldb/Host/Debug.h
lldb/trunk/include/lldb/Host/File.h
lldb/trunk/include/lldb/Host/FileSpec.h
lldb/trunk/include/lldb/Host/Mutex.h
lldb/trunk/include/lldb/Host/Predicate.h
lldb/trunk/include/lldb/Host/ProcessRunLock.h
lldb/trunk/include/lldb/Host/XML.h

Modified: lldb/trunk/include/lldb/Expression/ExpressionVariable.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionVariable.h?rev=251587&r1=251586&r2=251587&view=diff
==
--- lldb/trunk/include/lldb/Expression/ExpressionVariable.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionVariable.h Wed Oct 28 19:27:24 
2015
@@ -10,7 +10,9 @@
 #ifndef liblldb_ExpressionVariable_h_
 #define liblldb_ExpressionVariable_h_
 
+// C Includes
 // C++ Includes
+#include 
 #include 
 
 // Other libraries and framework includes
@@ -44,7 +46,9 @@ public:
 m_kind(kind)
 {
 }
-
+
+virtual ~ExpressionVariable();
+
 size_t
 GetByteSize ()
 {
@@ -110,18 +114,16 @@ public:
 void
 TransferAddress (bool force = false)
 {
-if (m_live_sp.get() == NULL)
+if (m_live_sp.get() == nullptr)
 return;
 
-if (m_frozen_sp.get() == NULL)
+if (m_frozen_sp.get() == nullptr)
 return;
 
 if (force || (m_frozen_sp->GetLiveAddress() == LLDB_INVALID_ADDRESS))
 m_frozen_sp->SetLiveAddress(m_live_sp->GetLiveAddress());
 }
 
-virtual ~ExpressionVariable();
-
 enum Flags
 {
 EVNone  = 0,
@@ -207,7 +209,7 @@ public:
 /// The name of the requested variable.
 ///
 /// @return
-/// The variable requested, or NULL if that variable is not in the 
list.
+/// The variable requested, or nullptr if that variable is not in the 
list.
 //--
 lldb::ExpressionVariableSP
 GetVariable (const ConstString &name)
@@ -286,7 +288,9 @@ public:
 m_kind(kind)
 {
 }
-
+
+virtual ~PersistentExpressionState();
+
 virtual lldb::ExpressionVariableSP
 CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp) = 0;
 
@@ -297,8 +301,6 @@ public:
   lldb::ByteOrder byte_order,
   uint32_t addr_byte_size) = 0;
 
-virtual ~PersistentExpressionState ();
-
 virtual ConstString
 GetNextPersistentVariableName () = 0;
 
@@ -312,6 +314,6 @@ private:
 LLVMCastKind m_kind;
 };
 
-}
+} // namespace lldb_private
 
-#endif /* liblldb_ExpressionVariable_h_ */
+#endif // liblldb_ExpressionVariable_h_

Modified: lldb/trunk/include/lldb/Expression/FunctionCaller.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/FunctionCaller.h?rev=251587&r1=251586&r2=251587&view=diff
==
--- lldb/trunk/include/lldb/Expression/FunctionCaller.h (original)
+++ lldb/trunk/include/lldb/Expression/FunctionCaller.h Wed Oct 28 19:27:24 2015
@@ -1,4 +1,4 @@
-//===-- FunctionCaller.h -*- C++ 
-*-===//
+//===-- FunctionCaller.h *- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -12,8 +12,11 @@
 
 // C Includes
 // C++ Includes
-#include 
 #include 
+#include 
+#include 
+#include 
+
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Core/Address.h"
@@ -55,7 +58,7 @@ namespace lldb_private
 /// a pointer set to LLDB_INVALID_ADDRESS and new structure will be allocated
 /// and its address returned in that variable.
 /// 
-/// Any of the methods that take arg_addr_ptr can be passed NULL, and the
+/// Any of the methods that take arg_addr_ptr can be passed nullptr, and the
 /// argument space will be managed for you.
 //--
 class FunctionCaller : public Expression
@@ -202,7 +205,7 @@ public:
 /// The thread & process in which this function will run.
 ///
 /// @param[in] args_addr_ptr
-/// If NULL, the function will take care of allocating & dea

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

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

http://reviews.llvm.org/D14166

Files:
  cmake/modules/LLDBConfig.cmake

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


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


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

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

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


http://reviews.llvm.org/D13819



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


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

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

LGTM


http://reviews.llvm.org/D14166



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


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

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

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

Reviewers: sas, ovyalov

Subscribers: lldb-commits

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

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

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


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


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

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

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

Repository:
  rL LLVM

http://reviews.llvm.org/D14166

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

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


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


[Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

2015-10-28 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added reviewers: labath, zturner, jasonmolenda.
tfiala added a subscriber: lldb-commits.

Distributions that put lldb binaries in /usr/bin and whatnot are going to put 
argdumper in the same place.  argdumper is way too generic a name.  Rename to 
lldb-argdumper, to match our lldb- prefix for lldb executables.

This change fixes the Xcode and cmake builds to use lldb-argdumper as the 
binary name.

I've tested this patch on OS X 10.11 and Ubuntu 14.04 x86_64.

I will make follow-up changes (after verifying the name change works) to:
* eliminate the dependence on liblldb - that is silly for this binary.
* rename the directory and source file names to match lldb-argdumper.

I'd rather break this into an end-product change (this one) and the 
file/directory naming change rather than jam those together.

http://reviews.llvm.org/D14169

Files:
  lldb.xcodeproj/project.pbxproj
  scripts/Python/finish-swig-Python-LLDB.sh
  source/Host/macosx/Host.mm
  source/Host/windows/Host.cpp
  tools/argdumper/CMakeLists.txt

Index: tools/argdumper/CMakeLists.txt
===
--- tools/argdumper/CMakeLists.txt
+++ tools/argdumper/CMakeLists.txt
@@ -1,8 +1,8 @@
-add_lldb_executable(argdumper
+add_lldb_executable(lldb-argdumper
   argdumper.cpp
   )
 
-target_link_libraries(argdumper liblldb)
+target_link_libraries(lldb-argdumper liblldb)
 
-install(TARGETS argdumper
+install(TARGETS lldb-argdumper
   RUNTIME DESTINATION bin)
Index: source/Host/windows/Host.cpp
===
--- source/Host/windows/Host.cpp
+++ source/Host/windows/Host.cpp
@@ -230,13 +230,13 @@
 FileSpec expand_tool_spec;
 if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, expand_tool_spec))
 {
-error.SetErrorString("could not find argdumper tool");
+error.SetErrorString("could not find support executable directory for the lldb-argdumper tool");
 return error;
 }
-expand_tool_spec.AppendPathComponent("argdumper.exe");
+expand_tool_spec.AppendPathComponent("lldb-argdumper.exe");
 if (!expand_tool_spec.Exists())
 {
-error.SetErrorString("could not find argdumper tool");
+error.SetErrorString("could not find the lldb-argdumper tool");
 return error;
 }
 
@@ -255,7 +255,7 @@
 
 if (status != 0)
 {
-error.SetErrorStringWithFormat("argdumper exited with error %d", status);
+error.SetErrorStringWithFormat("lldb-argdumper exited with error %d", status);
 return error;
 }
 
Index: source/Host/macosx/Host.mm
===
--- source/Host/macosx/Host.mm
+++ source/Host/macosx/Host.mm
@@ -1356,13 +1356,13 @@
 FileSpec expand_tool_spec;
 if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, expand_tool_spec))
 {
-error.SetErrorString("could not get support executable directory for argdumper tool");
+error.SetErrorString("could not get support executable directory for lldb-argdumper tool");
 return error;
 }
-expand_tool_spec.AppendPathComponent("argdumper");
+expand_tool_spec.AppendPathComponent("lldb-argdumper");
 if (!expand_tool_spec.Exists())
 {
-error.SetErrorStringWithFormat("could not find argdumper tool: %s", expand_tool_spec.GetPath().c_str());
+error.SetErrorStringWithFormat("could not find the lldb-argdumper tool: %s", expand_tool_spec.GetPath().c_str());
 return error;
 }
 
@@ -1375,7 +1375,7 @@
 
 if (status != 0)
 {
-error.SetErrorStringWithFormat("argdumper exited with error %d", status);
+error.SetErrorStringWithFormat("lldb-argdumper exited with error %d", status);
 return error;
 }
 
Index: scripts/Python/finish-swig-Python-LLDB.sh
===
--- scripts/Python/finish-swig-Python-LLDB.sh
+++ scripts/Python/finish-swig-Python-LLDB.sh
@@ -188,23 +188,23 @@
 fi
 fi
 
-# Make symlink for argdumper on any platform
+# Make symlink for lldb-argdumper on any platform
 if [ $MakefileCalled -ne 0 ]
 then
 # We are being built by CMake
 
-if [ ! -L "${framework_python_dir}/argdumper" ]
+if [ ! -L "${framework_python_dir}/lldb-argdumper" ]
 then
 if [ $Debug -eq 1 ]
 then
-echo "Creating symlink for argdumper"
+echo "Creating symlink for lldb-argdumper"
 fi
 cd "${framework_python_dir}"
-ln -s "../../../../bin/argdumper" argdumper
+ln -s "../../../../bin/lldb-argdumper" lldb-argdumper
 else
 if [ $Debug -eq 1 ]
 then
-echo "${framew

[Lldb-commits] [lldb] r251590 - Leave TestAttachResume as flakey on linux

2015-10-28 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Oct 28 20:18:45 2015
New Revision: 251590

URL: http://llvm.org/viewvc/llvm-project?rev=251590&view=rev
Log:
Leave TestAttachResume as flakey on linux

there must be (at least) one more race hidden there...

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py?rev=251590&r1=251589&r2=251590&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py
 Wed Oct 28 20:18:45 2015
@@ -20,6 +20,7 @@ class AttachResumeTestCase(TestBase):
 @skipIfRemote
 @expectedFailureFreeBSD('llvm.org/pr19310')
 @expectedFailureWindows("llvm.org/pr24778")
+@expectedFlakeyLinux('llvm.org/pr19310')
 def test_attach_continue_interrupt_detach(self):
 """Test attach/continue/interrupt/detach"""
 self.build()


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


Re: [Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

2015-10-28 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.

argdumper should probably go to /usr/libexec, but then I guess we won't be able 
to find it, so that's a different story...


http://reviews.llvm.org/D14169



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


Re: [Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

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

In http://reviews.llvm.org/D14169#277545, @labath wrote:

> Looks good.
>
> argdumper should probably go to /usr/libexec, but then I guess we won't be 
> able to find it, so that's a different story...


Exactly right. That will require more work.


http://reviews.llvm.org/D14169



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


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

2015-10-28 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

I have successfully compiled this patch on FreeBSD.

  $   uname -a
  FreeBSD 10.1-RELEASE-p19 FreeBSD 10.1-RELEASE-p19 #0: Sat Aug 22 03:55:09 UTC 
2015 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


Repository:
  rL LLVM

http://reviews.llvm.org/D14042



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


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

2015-10-28 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

I have successfully compiled this patch on FreeBSD.

  $   uname -a
  FreeBSD 10.1-RELEASE-p19 FreeBSD 10.1-RELEASE-p19 #0: Sat Aug 22 03:55:09 UTC 
2015 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


Repository:
  rL LLVM

http://reviews.llvm.org/D14037



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


Re: [Lldb-commits] [lldb] r251537 - Make core files not crash when you load a core file into LLDB with just "lldb -c core".

2015-10-28 Thread Ed Maste via lldb-commits
On 28 October 2015 at 18:04, Greg Clayton via lldb-commits
 wrote:
> +// LLDB_NT_OWNER_CORE and LLDB_NT_OWNER_LINUX note contants
> +#define NT_PRSTATUS 1
> +#define NT_PRFPREG  2
> +#define NT_PRPSINFO 3
> +#define NT_TASKSTRUCT   4
> +#define NT_AUXV 6
> +#define NT_SIGINFO  0x53494749
> +#define NT_FILE 0x46494c45
> +#define NT_PRXFPREG 0x46e62b7f
...

These should really be in a Linux namespace of some sort as they're
Linux-specific note types (although in a number of cases they happen
to be common on FreeBSD).
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14157: Make dosep correctly invoke the top level script when doing the multiprocessing fork

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

Looks good.

We were having trouble running the script from the top level earlier and were 
directly calling the one that you're disabling.  That'll be nice to get the top 
level one working again.

I hadn't seen the "import __main___ as main" trick before.  Interesting 
approach!


http://reviews.llvm.org/D14157



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


Re: [Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

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

> scripts/Python/finish-swig-Python-LLDB.sh


Hmm I think there is a python implementation of this script that I may have 
missed.  Checking on that now.


http://reviews.llvm.org/D14169



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


Re: [Lldb-commits] [PATCH] D14162: Create Python library `seven` in lldbsuite.support

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

Just one question on the python 3 return code for non-exceptional exit.



Comment at: packages/Python/lldbsuite/support/seven.py:12
@@ +11,3 @@
+import subprocess
+return (0, subprocess.check_output(command, shell=True))
+except subprocess.CalledProcessError as e:

Is it correct to assume a 0 return code here?  Couldn't we have output and have 
a non-zero status return that ins't a call exception?


http://reviews.llvm.org/D14162



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


Re: [Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

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

In http://reviews.llvm.org/D14169#277587, @tfiala wrote:

> > scripts/Python/finish-swig-Python-LLDB.sh
>
>
> Hmm I think there is a python implementation of this script that I may have 
> missed.  Checking on that now.


Yes there is.  I need to adjust one other place.  I'll update the patch.


http://reviews.llvm.org/D14169



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


Re: [Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

2015-10-28 Thread Todd Fiala via lldb-commits
tfiala updated this revision to Diff 38715.
tfiala added a comment.

Fixed up one missed spot, the python-based class completion script.

I think the original clean build and test run on Linux missed this because I 
don't think we actually use it on Linux.  It's primarily useful on OS X 10.11 
and beyond where we cannot launch inferiors through the shell any longer with 
System Integrity Protection.

In any event, the latest patch fixes up the symbolic link creation within the 
python module directory on non-OS X systems.


http://reviews.llvm.org/D14169

Files:
  lldb.xcodeproj/project.pbxproj
  scripts/Python/finish-swig-Python-LLDB.sh
  scripts/Python/finishSwigPythonLLDB.py
  source/Host/macosx/Host.mm
  source/Host/windows/Host.cpp
  tools/argdumper/CMakeLists.txt

Index: tools/argdumper/CMakeLists.txt
===
--- tools/argdumper/CMakeLists.txt
+++ tools/argdumper/CMakeLists.txt
@@ -1,8 +1,8 @@
-add_lldb_executable(argdumper
+add_lldb_executable(lldb-argdumper
   argdumper.cpp
   )
 
-target_link_libraries(argdumper liblldb)
+target_link_libraries(lldb-argdumper liblldb)
 
-install(TARGETS argdumper
+install(TARGETS lldb-argdumper
   RUNTIME DESTINATION bin)
Index: source/Host/windows/Host.cpp
===
--- source/Host/windows/Host.cpp
+++ source/Host/windows/Host.cpp
@@ -230,13 +230,13 @@
 FileSpec expand_tool_spec;
 if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, expand_tool_spec))
 {
-error.SetErrorString("could not find argdumper tool");
+error.SetErrorString("could not find support executable directory for the lldb-argdumper tool");
 return error;
 }
-expand_tool_spec.AppendPathComponent("argdumper.exe");
+expand_tool_spec.AppendPathComponent("lldb-argdumper.exe");
 if (!expand_tool_spec.Exists())
 {
-error.SetErrorString("could not find argdumper tool");
+error.SetErrorString("could not find the lldb-argdumper tool");
 return error;
 }
 
@@ -255,7 +255,7 @@
 
 if (status != 0)
 {
-error.SetErrorStringWithFormat("argdumper exited with error %d", status);
+error.SetErrorStringWithFormat("lldb-argdumper exited with error %d", status);
 return error;
 }
 
Index: source/Host/macosx/Host.mm
===
--- source/Host/macosx/Host.mm
+++ source/Host/macosx/Host.mm
@@ -1356,13 +1356,13 @@
 FileSpec expand_tool_spec;
 if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, expand_tool_spec))
 {
-error.SetErrorString("could not get support executable directory for argdumper tool");
+error.SetErrorString("could not get support executable directory for lldb-argdumper tool");
 return error;
 }
-expand_tool_spec.AppendPathComponent("argdumper");
+expand_tool_spec.AppendPathComponent("lldb-argdumper");
 if (!expand_tool_spec.Exists())
 {
-error.SetErrorStringWithFormat("could not find argdumper tool: %s", expand_tool_spec.GetPath().c_str());
+error.SetErrorStringWithFormat("could not find the lldb-argdumper tool: %s", expand_tool_spec.GetPath().c_str());
 return error;
 }
 
@@ -1375,7 +1375,7 @@
 
 if (status != 0)
 {
-error.SetErrorStringWithFormat("argdumper exited with error %d", status);
+error.SetErrorStringWithFormat("lldb-argdumper exited with error %d", status);
 return error;
 }
 
Index: scripts/Python/finishSwigPythonLLDB.py
===
--- scripts/Python/finishSwigPythonLLDB.py
+++ scripts/Python/finishSwigPythonLLDB.py
@@ -411,16 +411,16 @@
 return (bOk, strErrMsg);
 
 #++---
-# Details:  Make the symbolic link to the argdumper.
+# Details:  Make the symbolic link to the lldb-argdumper.
 # Args: vDictArgs   - (R) Program input parameters.
 #   vstrFrameworkPythonDir  - (R) Python framework directory.
-#   vstrArgdumperFileName   - (R) File name for argdumper.
+#   vstrArgdumperFileName   - (R) File name for lldb-argdumper.
 # Returns:  Bool - True = function success, False = failure.
 #   Str - Error description on task failure.
 # Throws:   None.
 #--
-def make_symlink_argdumper( vDictArgs, vstrFrameworkPythonDir, vstrArgdumperFileName ):
-dbg = utilsDebug.CDebugFnVerbose( "Python script make_symlink_argdumper()" );
+def make_symlink_lldb_argdumper( vDictArgs, vstrFrameworkPythonDir, vstrArgdumperFileName ):
+dbg = utilsDebug.CDebugFnVerbose( "Python script make_symlink_lldb_argd

Re: [Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

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

I'm out the next couple days at the LLVM conference.  I'm going to put this in. 
 We'll revert it out if it causes any trouble on Windows and fix it up.


http://reviews.llvm.org/D14169



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


[Lldb-commits] [lldb] r251616 - Rename argdumper to lldb-argdumper

2015-10-28 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct 29 00:07:12 2015
New Revision: 251616

URL: http://llvm.org/viewvc/llvm-project?rev=251616&view=rev
Log:
Rename argdumper to lldb-argdumper

http://reviews.llvm.org/D14169

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh
lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
lldb/trunk/source/Host/macosx/Host.mm
lldb/trunk/source/Host/windows/Host.cpp
lldb/trunk/tools/argdumper/CMakeLists.txt

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=251616&r1=251615&r2=251616&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Oct 29 00:07:12 2015
@@ -742,7 +742,7 @@
94094C6B163B6F840083A547 /* ValueObjectCast.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 94094C69163B6CD90083A547 /* ValueObjectCast.cpp 
*/; };
940B02F619DC96E700AD0F52 /* SBExecutionContext.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 940B02F519DC96E700AD0F52 /* 
SBExecutionContext.cpp */; };
940B04D91A8984FF0045D5F7 /* argdumper.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 940B04D81A8984FF0045D5F7 /* argdumper.cpp */; };
-   940B04E41A8987680045D5F7 /* argdumper in CopyFiles */ = {isa = 
PBXBuildFile; fileRef = 942829C01A89835300521B30 /* argdumper */; settings = 
{ATTRIBUTES = (CodeSignOnCopy, ); }; };
+   940B04E41A8987680045D5F7 /* lldb-argdumper in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 942829C01A89835300521B30 /* lldb-argdumper */; 
settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
94145431175E63B500284436 /* lldb-versioning.h in Headers */ = 
{isa = PBXBuildFile; fileRef = 94145430175D7FDE00284436 /* lldb-versioning.h 
*/; settings = {ATTRIBUTES = (Public, ); }; };
9418EBCD1AA910910058B02E /* VectorType.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 9418EBCC1AA910910058B02E /* VectorType.cpp */; };
941BCC7F14E48C4000BB969C /* SBTypeFilter.h in Headers */ = {isa 
= PBXBuildFile; fileRef = 9461568614E355F2003A195C /* SBTypeFilter.h */; 
settings = {ATTRIBUTES = (Public, ); }; };
@@ -1081,7 +1081,7 @@
dstPath = "";
dstSubfolderSpec = 7;
files = (
-   940B04E41A8987680045D5F7 /* argdumper in 
CopyFiles */,
+   940B04E41A8987680045D5F7 /* lldb-argdumper in 
CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2484,7 +2484,7 @@
942612F61B9500EF842E /* LanguageCategory.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = LanguageCategory.cpp; path = source/DataFormatters/LanguageCategory.cpp; 
sourceTree = ""; };
942829541A89614000521B30 /* JSON.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = 
include/lldb/Utility/JSON.h; sourceTree = ""; };
942829551A89614C00521B30 /* JSON.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = JSON.cpp; path = source/Utility/JSON.cpp; sourceTree = ""; };
-   942829C01A89835300521B30 /* argdumper */ = {isa = 
PBXFileReference; explicitFileType = "compiled.mach-o.executable"; 
includeInIndex = 0; path = argdumper; sourceTree = BUILT_PRODUCTS_DIR; };
+   942829C01A89835300521B30 /* lldb-argdumper */ = {isa = 
PBXFileReference; explicitFileType = "compiled.mach-o.executable"; 
includeInIndex = 0; path = "lldb-argdumper"; sourceTree = BUILT_PRODUCTS_DIR; };
94380B8019940B0300BFE4A8 /* StringLexer.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringLexer.h; 
path = include/lldb/Utility/StringLexer.h; sourceTree = ""; };
94380B8119940B0A00BFE4A8 /* StringLexer.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = StringLexer.cpp; path = source/Utility/StringLexer.cpp; sourceTree = 
""; };
943B90FC1B991586007BA499 /* VectorIterator.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorIterator.h; 
path = include/lldb/DataFormatters/VectorIterator.h; sourceTree = ""; };
@@ -2968,7 +2968,7 @@
26579F68126A25920007C5CB /* darwin-debug */,
26DC6A101337FE6900FF7998 /* lldb-server */,
2690CD171A6DC0D000E717C8 /* lldb-mi */,
-   942829C01A89835300521B30 /* argdumper */,
+   942829C01A89835300521B30 /* lldb-argdumper */,
  

Re: [Lldb-commits] [PATCH] D14169: Rename argdumper to lldb-argdumper.

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

Closed by commit:

  $ svn commit
  Sendinglldb.xcodeproj/project.pbxproj
  Sendingscripts/Python/finish-swig-Python-LLDB.sh
  Sendingscripts/Python/finishSwigPythonLLDB.py
  Sendingsource/Host/macosx/Host.mm
  Sendingsource/Host/windows/Host.cpp
  Sendingtools/argdumper/CMakeLists.txt
  Transmitting file data ..
  Committed revision 251616.


http://reviews.llvm.org/D14169



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


Re: [Lldb-commits] [PATCH] D14162: Create Python library `seven` in lldbsuite.support

2015-10-28 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: packages/Python/lldbsuite/support/seven.py:12
@@ +11,3 @@
+import subprocess
+return (0, subprocess.check_output(command, shell=True))
+except subprocess.CalledProcessError as e:

tfiala wrote:
> Is it correct to assume a 0 return code here?  Couldn't we have output and 
> have a non-zero status return that ins't a call exception?
The documentation of `check_output` says this:

Run command with arguments and return its output as a byte string.

If the return code was non-zero it raises a CalledProcessError. The 
CalledProcessError object will have the return code in the returncode attribute 
and any output in the output attribute.

So I think it's correct.  Might not hurt to have a comment to that effect though


http://reviews.llvm.org/D14162



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