[Lldb-commits] [lldb] r237426 - Fix a reason of *stopped notifications due to SIGINT/SIGSTOP signals (MI)

2015-05-15 Thread Ilia K
Author: ki.stfu
Date: Fri May 15 04:29:09 2015
New Revision: 237426

URL: http://llvm.org/viewvc/llvm-project?rev=237426view=rev
Log:
Fix a reason of *stopped notifications due to SIGINT/SIGSTOP signals (MI)

# Add SBProcess::GetInterruptedFromEvent
# Add vrEvent arg in 
CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateStopped
  and CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal
# Refactor CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal
## Clean up and fix typos
## Remove vwrbShouldBrk arg
# Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_{local,remote}
  to expect SIGSTOP instead of SIGINT


Modified:
lldb/trunk/include/lldb/API/SBProcess.h
lldb/trunk/scripts/interface/SBProcess.i
lldb/trunk/source/API/SBProcess.cpp
lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h

Modified: lldb/trunk/include/lldb/API/SBProcess.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=237426r1=237425r2=237426view=diff
==
--- lldb/trunk/include/lldb/API/SBProcess.h (original)
+++ lldb/trunk/include/lldb/API/SBProcess.h Fri May 15 04:29:09 2015
@@ -260,6 +260,9 @@ public:
 
 static lldb::SBProcess
 GetProcessFromEvent (const lldb::SBEvent event);
+
+static bool
+GetInterruptedFromEvent (const lldb::SBEvent event);
 
 static bool
 EventIsProcessEvent (const lldb::SBEvent event);

Modified: lldb/trunk/scripts/interface/SBProcess.i
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBProcess.i?rev=237426r1=237425r2=237426view=diff
==
--- lldb/trunk/scripts/interface/SBProcess.i (original)
+++ lldb/trunk/scripts/interface/SBProcess.i Fri May 15 04:29:09 2015
@@ -349,6 +349,9 @@ public:
 GetProcessFromEvent (const lldb::SBEvent event);
 
 static bool
+GetInterruptedFromEvent (const lldb::SBEvent event);
+
+static bool
 EventIsProcessEvent (const lldb::SBEvent event);
 
 lldb::SBBroadcaster

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=237426r1=237425r2=237426view=diff
==
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Fri May 15 04:29:09 2015
@@ -999,6 +999,12 @@ SBProcess::GetProcessFromEvent (const SB
 }
 
 bool
+SBProcess::GetInterruptedFromEvent (const SBEvent event)
+{
+return Process::ProcessEventData::GetInterruptedFromEvent(event.get());
+}
+
+bool
 SBProcess::EventIsProcessEvent (const SBEvent event)
 {
 return event.GetBroadcasterClass() == SBProcess::GetBroadcasterClass();

Modified: lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py?rev=237426r1=237425r2=237426view=diff
==
--- lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py (original)
+++ lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py Fri May 15 04:29:09 
2015
@@ -66,9 +66,9 @@ class MiSignalTestCase(lldbmi_testcase.M
 
 # Test that *stopped is printed
 # Note that message is different in Darwin and Linux:
-# Darwin: 
*stopped,reason=\signal-received\,signal-name=\SIGINT\,signal-meaning=\Interrupt\,frame={level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\??\,fullname=\??\,line=\-1\},thread-id=\1\,stopped-threads=\all\
+# Darwin: 
*stopped,reason=\signal-received\,signal-name=\SIGSTOP\,signal-meaning=\Stop\,frame={level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\??\,fullname=\??\,line=\-1\},thread-id=\1\,stopped-threads=\all\
 # Linux:  
*stopped,reason=\end-stepping-range\,frame={addr=\0x[0-9a-f]+\,func=\??\,args=[],file=\??\,fullname=\??\,line=\-1\},thread-id=\1\,stopped-threads=\all\
-self.expect([ 
\*stopped,reason=\signal-received\,signal-name=\SIGINT\,signal-meaning=\Interrupt\,frame=\{level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\\?\?\,fullname=\\?\?\,line=\-1\\},thread-id=\1\,stopped-threads=\all\,
+self.expect([ 
\*stopped,reason=\signal-received\,signal-name=\SIGSTOP\,signal-meaning=\Stop\,frame=\{level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\\?\?\,fullname=\\?\?\,line=\-1\\},thread-id=\1\,stopped-threads=\all\,
   
\*stopped,reason=\end-stepping-range\,frame={addr=\0x[0-9a-f]+\,func=\\?\?\,args=\[\],file=\\?\?\,fullname=\\?\?\,line=\-1\},thread-id=\1\,stopped-threads=\all\
 ])
 
 # Run to main to make sure we have not exited the application
@@ -111,7 +111,7 @@ class MiSignalTestCase(lldbmi_testcase.M
 self.expect(\^done)
 

[Lldb-commits] [lldb] r237421 - LLDB build broke after applying patch http://reviews.llvm.org/D9706

2015-05-15 Thread Omair Javaid
Author: omjavaid
Date: Fri May 15 03:30:29 2015
New Revision: 237421

URL: http://llvm.org/viewvc/llvm-project?rev=237421view=rev
Log:
LLDB build broke after applying patch http://reviews.llvm.org/D9706

This patch fixes the issue.


Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=237421r1=237420r2=237421view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Fri May 15 
03:30:29 2015
@@ -762,10 +762,9 @@ namespace
 #endif
 }
 
-#if defined (__arm64__) || defined (__aarch64__)
 
//--
 /// @class ReadDBGROperation
-/// @brief Implements NativeProcessLinux::ReadDBGR.
+/// @brief Implements NativeProcessLinux::ReadHardwareDebugInfo.
 class ReadDBGROperation : public Operation
 {
 public:
@@ -786,6 +785,7 @@ namespace
 void
 ReadDBGROperation::Execute(NativeProcessLinux *monitor)
 {
+#if defined (__arm64__) || defined (__aarch64__)
int regset = NT_ARM_HW_WATCH;
struct iovec ioVec;
struct user_hwdebug_state dreg_state;
@@ -800,8 +800,9 @@ namespace
 
PTRACE(PTRACE_GETREGSET, m_tid, regset, ioVec, ioVec.iov_len, 
m_error);
m_count_bp = dreg_state.dbg_info  0xff;
-}
 #endif
+}
+
 
 
//--
 /// @class ReadRegisterSetOperation
@@ -894,10 +895,9 @@ namespace
 #endif
 }
 
-#if defined (__arm64__) || defined (__aarch64__)
 
//--
 /// @class WriteDBGROperation
-/// @brief Implements NativeProcessLinux::WriteFPR.
+/// @brief Implements NativeProcessLinux::WriteHardwareDebugRegs.
 class WriteDBGROperation : public Operation
 {
 public:
@@ -923,6 +923,7 @@ namespace
 void
 WriteDBGROperation::Execute(NativeProcessLinux *monitor)
 {
+#if defined (__arm64__) || defined (__aarch64__)
 struct iovec ioVec;
 struct user_hwdebug_state dreg_state;
 
@@ -942,8 +943,9 @@ namespace
 }
 
 PTRACE(PTRACE_SETREGSET, m_tid, m_type, ioVec, ioVec.iov_len, 
m_error);
-}
 #endif
+}
+
 
 
//--
 /// @class WriteRegisterSetOperation
@@ -3933,8 +3935,6 @@ NativeProcessLinux::ReadRegisterSet(lldb
 return op.GetError();
 }
 
-#if defined (__arm64__) || defined (__aarch64__)
-
 Error
 NativeProcessLinux::ReadHardwareDebugInfo (lldb::tid_t tid, unsigned int 
watch_count , unsigned int break_count)
 {
@@ -3951,8 +3951,6 @@ NativeProcessLinux::WriteHardwareDebugRe
 return op.GetError();
 }
 
-#endif
-
 Error
 NativeProcessLinux::WriteGPR(lldb::tid_t tid, void *buf, size_t buf_size)
 {

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h?rev=237421r1=237420r2=237421view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h Fri May 15 
03:30:29 2015
@@ -151,7 +151,6 @@ namespace process_linux {
 Error
 ReadFPR(lldb::tid_t tid, void *buf, size_t buf_size);
 
-#if defined (__arm64__) || defined (__aarch64__)
 /// Reads hardware breakpoints and watchpoints capability information.
 Error
 ReadHardwareDebugInfo (lldb::tid_t tid, unsigned int watch_count ,
@@ -161,7 +160,7 @@ namespace process_linux {
 Error
 WriteHardwareDebugRegs (lldb::tid_t tid, lldb::addr_t *addr_buf,
 uint32_t *cntrl_buf, int type, int count);
-#endif
+
 /// Reads the specified register set into the specified buffer.
 /// For instance, the extended floating-point register set.
 Error


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237420 - Assembly profiler for mips32

2015-05-15 Thread Bhushan D. Attarde
Author: bhushan.attarde
Date: Fri May 15 01:53:30 2015
New Revision: 237420

URL: http://llvm.org/viewvc/llvm-project?rev=237420view=rev
Log:
Assembly profiler for mips32

Summary:
Implementation of assembly profiler for MIPS32 using EmulateInstruction which 
currently scans only prologue/epilogue assembly instructions. It uses 
llvm::MCDisassembler to decode assembly instructions.

Reviewers: clayborg, jasonmolenda

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

Added:
lldb/trunk/source/Plugins/Instruction/MIPS/
lldb/trunk/source/Plugins/Instruction/MIPS/CMakeLists.txt
lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h
lldb/trunk/source/Plugins/Instruction/MIPS/Makefile
Modified:
lldb/trunk/cmake/LLDBDependencies.cmake
lldb/trunk/lib/Makefile
lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
lldb/trunk/source/Plugins/Instruction/CMakeLists.txt
lldb/trunk/source/Plugins/Makefile
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Target/Thread.cpp

Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=237420r1=237419r2=237420view=diff
==
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Fri May 15 01:53:30 2015
@@ -54,6 +54,7 @@ set( LLDB_USED_LIBS
   lldbPluginABISysV_ppc64
   lldbPluginInstructionARM
   lldbPluginInstructionARM64
+  lldbPluginInstructionMIPS
   lldbPluginInstructionMIPS64
   lldbPluginObjectFilePECOFF
   lldbPluginOSPython

Modified: lldb/trunk/lib/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lib/Makefile?rev=237420r1=237419r2=237420view=diff
==
--- lldb/trunk/lib/Makefile (original)
+++ lldb/trunk/lib/Makefile Fri May 15 01:53:30 2015
@@ -48,6 +48,7 @@ USEDLIBS = lldbAPI.a \
lldbPluginDynamicLoaderMacOSX.a \
lldbPluginEmulateInstructionARM.a \
lldbPluginEmulateInstructionARM64.a \
+lldbPluginEmulateInstructionMIPS.a \
 lldbPluginEmulateInstructionMIPS64.a \
lldbPluginInstrumentationRuntimeAddressSanitizer.a \
lldbPluginLanguageRuntimeCPlusPlusItaniumABI.a \

Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=237420r1=237419r2=237420view=diff
==
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Fri May 15 
01:53:30 2015
@@ -18,6 +18,7 @@
 #include Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
 #include Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
 #include Plugins/Instruction/ARM/EmulateInstructionARM.h
+#include Plugins/Instruction/MIPS/EmulateInstructionMIPS.h
 #include Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
 #include Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
 #include 
Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h
@@ -113,6 +114,7 @@ SystemInitializerCommon::Initialize()
 platform_android::PlatformAndroid::Initialize();
 
 EmulateInstructionARM::Initialize();
+EmulateInstructionMIPS::Initialize();
 EmulateInstructionMIPS64::Initialize();
 
 //--
@@ -163,6 +165,7 @@ SystemInitializerCommon::Terminate()
 PlatformiOSSimulator::Terminate();
 
 EmulateInstructionARM::Terminate();
+EmulateInstructionMIPS::Terminate();
 EmulateInstructionMIPS64::Terminate();
 
 #if defined(__APPLE__)

Modified: lldb/trunk/source/Plugins/Instruction/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/CMakeLists.txt?rev=237420r1=237419r2=237420view=diff
==
--- lldb/trunk/source/Plugins/Instruction/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Instruction/CMakeLists.txt Fri May 15 01:53:30 
2015
@@ -1,3 +1,4 @@
 add_subdirectory(ARM)
 add_subdirectory(ARM64)
+add_subdirectory(MIPS)
 add_subdirectory(MIPS64)

Added: lldb/trunk/source/Plugins/Instruction/MIPS/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/CMakeLists.txt?rev=237420view=auto
==
--- lldb/trunk/source/Plugins/Instruction/MIPS/CMakeLists.txt (added)
+++ lldb/trunk/source/Plugins/Instruction/MIPS/CMakeLists.txt Fri May 15 
01:53:30 2015
@@ -0,0 +1,5 @@
+set(LLVM_NO_RTTI 1)
+

[Lldb-commits] [lldb] r237419 - This patch adds support for setting/clearing hardware watchpoints and breakpoints on AArch64 (Arm v8) 64-bit hardware.

2015-05-15 Thread Omair Javaid
Author: omjavaid
Date: Fri May 15 01:29:58 2015
New Revision: 237419

URL: http://llvm.org/viewvc/llvm-project?rev=237419view=rev
Log:
This patch adds support for setting/clearing hardware watchpoints and 
breakpoints on AArch64 (Arm v8) 64-bit hardware.

http://reviews.llvm.org/D9706


Modified:
lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h
lldb/trunk/source/Host/common/NativeRegisterContext.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h

lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.h

Modified: lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h?rev=237419r1=237418r2=237419view=diff
==
--- lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h (original)
+++ lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h Fri May 15 
01:29:58 2015
@@ -103,7 +103,7 @@ public:
 IsWatchpointHit(uint32_t wp_index, bool is_hit);
 
 virtual Error
-GetWatchpointHitIndex(uint32_t wp_index);
+GetWatchpointHitIndex(uint32_t wp_index, lldb::addr_t trap_addr);
 
 virtual Error
 IsWatchpointVacant (uint32_t wp_index, bool is_vacant);

Modified: lldb/trunk/source/Host/common/NativeRegisterContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeRegisterContext.cpp?rev=237419r1=237418r2=237419view=diff
==
--- lldb/trunk/source/Host/common/NativeRegisterContext.cpp (original)
+++ lldb/trunk/source/Host/common/NativeRegisterContext.cpp Fri May 15 01:29:58 
2015
@@ -309,7 +309,7 @@ NativeRegisterContext::IsWatchpointHit(u
 }
 
 Error
-NativeRegisterContext::GetWatchpointHitIndex(uint32_t wp_index)
+NativeRegisterContext::GetWatchpointHitIndex(uint32_t wp_index, lldb::addr_t 
trap_addr)
 {
 wp_index = LLDB_INVALID_INDEX32;
 return Error (not implemented);

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=237419r1=237418r2=237419view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Fri May 15 
01:29:58 2015
@@ -762,6 +762,47 @@ namespace
 #endif
 }
 
+#if defined (__arm64__) || defined (__aarch64__)
+
//--
+/// @class ReadDBGROperation
+/// @brief Implements NativeProcessLinux::ReadDBGR.
+class ReadDBGROperation : public Operation
+{
+public:
+ReadDBGROperation(lldb::tid_t tid, unsigned int count_wp, unsigned 
int count_bp)
+: m_tid(tid),
+  m_count_wp(count_wp),
+  m_count_bp(count_bp)
+{ }
+
+void Execute(NativeProcessLinux *monitor) override;
+
+private:
+lldb::tid_t m_tid;
+unsigned int m_count_wp;
+unsigned int m_count_bp;
+};
+
+void
+ReadDBGROperation::Execute(NativeProcessLinux *monitor)
+{
+   int regset = NT_ARM_HW_WATCH;
+   struct iovec ioVec;
+   struct user_hwdebug_state dreg_state;
+
+   ioVec.iov_base = dreg_state;
+   ioVec.iov_len = sizeof (dreg_state);
+
+   PTRACE(PTRACE_GETREGSET, m_tid, regset, ioVec, ioVec.iov_len, 
m_error);
+
+   m_count_wp = dreg_state.dbg_info  0xff;
+   regset = NT_ARM_HW_BREAK;
+
+   PTRACE(PTRACE_GETREGSET, m_tid, regset, ioVec, ioVec.iov_len, 
m_error);
+   m_count_bp = dreg_state.dbg_info  0xff;
+}
+#endif
+
 
//--
 /// @class ReadRegisterSetOperation
 /// @brief Implements NativeProcessLinux::ReadRegisterSet.
@@ -853,6 +894,57 @@ namespace
 #endif
 }
 
+#if defined (__arm64__) || defined (__aarch64__)
+
//--
+/// @class WriteDBGROperation
+/// @brief Implements NativeProcessLinux::WriteFPR.
+class WriteDBGROperation : public Operation
+{
+public:
+WriteDBGROperation(lldb::tid_t tid, lldb::addr_t *addr_buf,
+   uint32_t *cntrl_buf, int type, int count)
+: 

[Lldb-commits] [lldb] r237425 - Fix a few compile warnings

2015-05-15 Thread Ilia K
Author: ki.stfu
Date: Fri May 15 04:15:27 2015
New Revision: 237425

URL: http://llvm.org/viewvc/llvm-project?rev=237425view=rev
Log:
Fix a few compile warnings


Modified:

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

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

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=237425r1=237424r2=237425view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 Fri May 15 04:15:27 2015
@@ -559,7 +559,7 @@ protected:
 ObjCLanguageRuntime::TaggedPointerVendor *tagged_ptr_vendor = 
objc_runtime-GetTaggedPointerVendor();
 if (tagged_ptr_vendor)
 {
-for (auto i = 0;
+for (size_t i = 0;
  i  command.GetArgumentCount();
  i++)
 {

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=237425r1=237424r2=237425view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
 Fri May 15 04:15:27 2015
@@ -1858,7 +1858,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 if (bytes_read == 0)
 {
 if (log)
-log-Printf (GDBRemoteCommunicationServerLLGS::%s pid % PRIu64  
mem 0x% PRIx64 : read % PRIu64  of % PRIu64  requested bytes, 
__FUNCTION__, m_debugged_process_sp-GetID (), read_addr, bytes_read, 
byte_count);
+log-Printf (GDBRemoteCommunicationServerLLGS::%s pid % PRIu64  
mem 0x% PRIx64 : read 0 of % PRIu64  requested bytes, __FUNCTION__, 
m_debugged_process_sp-GetID (), read_addr, byte_count);
 return SendErrorResponse (0x08);
 }
 
@@ -1938,7 +1938,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 if (bytes_written == 0)
 {
 if (log)
-log-Printf (GDBRemoteCommunicationServerLLGS::%s pid % PRIu64  
mem 0x% PRIx64 : wrote % PRIu64  of % PRIu64  requested bytes, 
__FUNCTION__, m_debugged_process_sp-GetID (), write_addr, bytes_written, 
byte_count);
+log-Printf (GDBRemoteCommunicationServerLLGS::%s pid % PRIu64  
mem 0x% PRIx64 : wrote 0 of % PRIu64  requested bytes, __FUNCTION__, 
m_debugged_process_sp-GetID (), write_addr, byte_count);
 return SendErrorResponse (0x09);
 }
 


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237435 - Fix virtual step handling in ThreadPlanStepInRange

2015-05-15 Thread Tamas Berghammer
Author: tberghammer
Date: Fri May 15 05:14:15 2015
New Revision: 237435

URL: http://llvm.org/viewvc/llvm-project?rev=237435view=rev
Log:
Fix virtual step handling in ThreadPlanStepInRange

Differential revision: http://reviews.llvm.org/D9773

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

Modified: lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepInRange.cpp?rev=237435r1=237434r2=237435view=diff
==
--- lldb/trunk/source/Target/ThreadPlanStepInRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepInRange.cpp Fri May 15 05:14:15 2015
@@ -524,6 +524,7 @@ ThreadPlanStepInRange::DoPlanExplainsSto
 bool
 ThreadPlanStepInRange::DoWillResume (lldb::StateType resume_state, bool 
current_plan)
 {
+m_virtual_step = false;
 if (resume_state == eStateStepping  current_plan)
 {
 // See if we are about to step over a virtual inlined call.


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r237429 - Fix parsing of print-values arg (MI)

2015-05-15 Thread Ilia K
Hello Tamas,

Thanks for attentiveness. I committed it in r237437.

Thanks,
Ilia

On Fri, May 15, 2015 at 2:18 PM, Tamas Berghammer tbergham...@google.com
wrote:

 Hi Ilia,

 This CL cause 2 new failure on the Linux build bots (
 http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2414).
 Please fix them if it is a trivial or XFAIL them to get the bot green again.

 Thanks
 Tamas

 On Fri, May 15, 2015 at 10:46 AM, Ilia K ki.s...@gmail.com wrote:

 Author: ki.stfu
 Date: Fri May 15 04:46:28 2015
 New Revision: 237429

 URL: http://llvm.org/viewvc/llvm-project?rev=237429view=rev
 Log:
 Fix parsing of print-values arg (MI)

 # Add CMICmdArgValPrintValues argument
 # Rework
 -stack-list-arguments/-stack-list-locals/-stack-list-variables/-var-update/-var-list-children
   commands to use the CMICmdArgValPrintValues argument instead of usage
 of pair of non-mandatory
   arguments like: CMICmdArgValNumber(0) ||
 CMICmdArgValLongOptions(no-values)


 Added:
 lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp
 lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.h
 Modified:
 lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
 lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
 lldb/trunk/tools/lldb-mi/CMakeLists.txt
 lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp
 lldb/trunk/tools/lldb-mi/MICmdCmdStack.h
 lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp
 lldb/trunk/tools/lldb-mi/MICmdCmdVar.h

 Modified: lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py?rev=237429r1=237428r2=237429view=diff

 ==
 --- lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py (original)
 +++ lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py Fri May 15
 04:46:28 2015
 @@ -43,16 +43,14 @@ class MiStackTestCase(lldbmi_testcase.Mi
  # Test that -stack-list-arguments lists stack arguments with all
 values
  self.runCmd(-stack-list-arguments 1 0 0)

  
 self.expect(\^done,stack-args=\[frame={level=\0\,args=\[{name=\argc\,value=\1\},{name=\argv\,value=\.*\}\]}\])
 -# FIXME: first 0 is treated as --no-values
  self.runCmd(-stack-list-arguments --all-values 0 0)
 -
 #self.expect(\^done,stack-args=\[frame={level=\0\,args=\[{name=\argc\,value=\1\},{name=\argv\,value=\.*\}\]}\])
 +
 self.expect(\^done,stack-args=\[frame={level=\0\,args=\[{name=\argc\,value=\1\},{name=\argv\,value=\.*\}\]}\])

  # Test that -stack-list-arguments lists stack arguments with
 simple values
  self.runCmd(-stack-list-arguments 2 0 1)

  
 self.expect(\^done,stack-args=\[frame={level=\0\,args=\[{name=\argc\,value=\1\},{name=\argv\,value=\.*\}\]})
 -# FIXME: first 0 is treated as --no-values
  self.runCmd(-stack-list-arguments --simple-values 0 1)
 -
 #self.expect(\^done,stack-args=\[frame={level=\0\,args=\[{name=\argc\,value=\1\},{name=\argv\,value=\.*\}\]})
 +
 self.expect(\^done,stack-args=\[frame={level=\0\,args=\[{name=\argc\,value=\1\},{name=\argv\,value=\.*\}\]})

  # Test that an invalid low-frame is handled
  # FIXME: -1 is treated as unsigned int

 Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237429r1=237428r2=237429view=diff

 ==
 --- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)
 +++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15
 04:46:28 2015
 @@ -254,12 +254,12 @@ class MiVarTestCase(lldbmi_testcase.MiTe

  
 self.expect(\^done,name=\var_complx_array\,numchild=\2\,value=\\[2\]\,type=\complex_type
 \[2\]\,thread-id=\1\,has_more=\0\)

  # Test that -var-list-children lists empty children if range is
 empty
 -# FIXME (and that print-values is optional)
 -self.runCmd(-var-list-children 0 var_complx 0 0)
 +# (and that print-values is optional)
 +self.runCmd(-var-list-children var_complx 0 0)
  self.expect(\^done,numchild=\0\,has_more=\1\)
 -self.runCmd(-var-list-children 0 var_complx 99 0)
 +self.runCmd(-var-list-children var_complx 99 0)
  self.expect(\^done,numchild=\0\,has_more=\1\)
 -self.runCmd(-var-list-children 0 var_complx 99 3)
 +self.runCmd(-var-list-children var_complx 99 3)
  self.expect(\^done,numchild=\0\,has_more=\0\)

  # Test that -var-list-children lists all children with their
 values
 @@ -272,39 +272,32 @@ class MiVarTestCase(lldbmi_testcase.MiTe
  # Test that -var-list-children lists children without values
  self.runCmd(-var-list-children 0 var_complx 0 1)

  
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
 -

[Lldb-commits] [lldb] r237437 - XFAIL 4 lldb-mi tests to get Linux build green back (MI)

2015-05-15 Thread Ilia K
Author: ki.stfu
Date: Fri May 15 06:51:52 2015
New Revision: 237437

URL: http://llvm.org/viewvc/llvm-project?rev=237437view=rev
Log:
XFAIL 4 lldb-mi tests to get Linux build green back (MI)


Modified:
lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py

Modified: lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py?rev=237437r1=237436r2=237437view=diff
==
--- lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py (original)
+++ lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py Fri May 15 06:51:52 2015
@@ -11,6 +11,7 @@ class MiStackTestCase(lldbmi_testcase.Mi
 mydir = TestBase.compute_mydir(__file__)
 
 @lldbmi_test
+@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_stack_list_arguments(self):
@@ -73,6 +74,7 @@ class MiStackTestCase(lldbmi_testcase.Mi
 self.expect(\^error,msg=\Command 'stack-list-arguments'\. Thread 
frame range invalid\)
 
 @lldbmi_test
+@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_stack_list_locals(self):
@@ -200,6 +202,7 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
self.expect(\^done,locals=\[{name=\test_str\,value=\.*?Rakaposhi.*?\},{name=\var_e\,value=\24\},{name=\ptr\,value=\.*?\}\])
 
 @lldbmi_test
+@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_stack_list_variables(self):

Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237437r1=237436r2=237437view=diff
==
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15 06:51:52 2015
@@ -11,6 +11,7 @@ class MiVarTestCase(lldbmi_testcase.MiTe
 mydir = TestBase.compute_mydir(__file__)
 
 @lldbmi_test
+@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_eval(self):


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237446 - Add EmulateInstructionMIPS to the xcode project file to fix build after r237420.

2015-05-15 Thread Robert Flack
Author: flackr
Date: Fri May 15 08:37:02 2015
New Revision: 237446

URL: http://llvm.org/viewvc/llvm-project?rev=237446view=rev
Log:
Add EmulateInstructionMIPS to the xcode project file to fix build after r237420.

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=237446r1=237445r2=237446view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri May 15 08:37:02 2015
@@ -959,6 +959,7 @@
E7723D451AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.h in 
Headers */ = {isa = PBXBuildFile; fileRef = E7723D431AC4A7FB002BA082 /* 
RegisterContextPOSIXCore_arm64.h */; };
E7723D481AC4A8C8002BA082 /* RegisterContextFreeBSD_arm64.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = E7723D461AC4A8C8002BA082 /* 
RegisterContextFreeBSD_arm64.cpp */; };
E7723D4C1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = E7723D4A1AC4A944002BA082 /* 
RegisterContextPOSIX_arm64.cpp */; };
+   E778E9A21B062D1700247609 /* EmulateInstructionMIPS.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = E778E99F1B062D1700247609 /* 
EmulateInstructionMIPS.cpp */; };
ED88244E15114A9200BC98B9 /* Security.framework in Frameworks */ 
= {isa = PBXBuildFile; fileRef = EDB919B414F6F10D008FF64B /* Security.framework 
*/; };
ED88245015114CA200BC98B9 /* main.mm in Sources */ = {isa = 
PBXBuildFile; fileRef = ED88244F15114CA200BC98B9 /* main.mm */; };
ED88245115114CA200BC98B9 /* main.mm in Sources */ = {isa = 
PBXBuildFile; fileRef = ED88244F15114CA200BC98B9 /* main.mm */; };
@@ -2751,6 +2752,8 @@
E7723D471AC4A8C8002BA082 /* RegisterContextFreeBSD_arm64.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
name = RegisterContextFreeBSD_arm64.h; path = 
Utility/RegisterContextFreeBSD_arm64.h; sourceTree = group; };
E7723D4A1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; name = RegisterContextPOSIX_arm64.cpp; path = 
Utility/RegisterContextPOSIX_arm64.cpp; sourceTree = group; };
E7723D4B1AC4A944002BA082 /* RegisterContextPOSIX_arm64.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
name = RegisterContextPOSIX_arm64.h; path = 
Utility/RegisterContextPOSIX_arm64.h; sourceTree = group; };
+   E778E99F1B062D1700247609 /* EmulateInstructionMIPS.cpp */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; path = EmulateInstructionMIPS.cpp; sourceTree = group; 
};
+   E778E9A01B062D1700247609 /* EmulateInstructionMIPS.h */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path 
= EmulateInstructionMIPS.h; sourceTree = group; };
ED88244F15114CA200BC98B9 /* main.mm */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; 
path = main.mm; sourceTree = group; };
ED88245215114CFC00BC98B9 /* LauncherRootXPCService.mm */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.objcpp; path = LauncherRootXPCService.mm; sourceTree = 
group; };
EDB919B214F6EC85008FF64B /* LauncherXPCService.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LauncherXPCService.h; sourceTree = group; };
@@ -4725,6 +4728,7 @@
26D9FDCA12F785120003F2EE /* Instruction */ = {
isa = PBXGroup;
children = (
+   E778E99D1B062D1700247609 /* MIPS */,
26D9FDCB12F785270003F2EE /* ARM */,
264A12F91372522000875C42 /* ARM64 */,
94A5B3941AB9FE5F00A5EE7F /* MIPS64 */,
@@ -5299,6 +5303,15 @@
name = lldb-server;
sourceTree = group;
};
+   E778E99D1B062D1700247609 /* MIPS */ = {
+   isa = PBXGroup;
+   children = (
+   E778E99F1B062D1700247609 /* 
EmulateInstructionMIPS.cpp */,
+   E778E9A01B062D1700247609 /* 
EmulateInstructionMIPS.h */,
+   );
+   path = MIPS;
+   sourceTree = group;
+   };
EDC6D49114E5C15C001B75F8 /* launcherXPCService */ = {
isa = PBXGroup;
children = (
@@ -6367,6 +6380,7 @@
26BC17AB18C7F4CB00D2196D 

[Lldb-commits] [lldb] r237443 - Fix CMICmdArgValPrintValues::Validate enable 4 tests that were XFAIL'ed in r237437 (MI)

2015-05-15 Thread Ilia K
Author: ki.stfu
Date: Fri May 15 07:33:04 2015
New Revision: 237443

URL: http://llvm.org/viewvc/llvm-project?rev=237443view=rev
Log:
Fix CMICmdArgValPrintValues::Validate  enable 4 tests that were XFAIL'ed in 
r237437 (MI)


Modified:
lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp

Modified: lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py?rev=237443r1=237442r2=237443view=diff
==
--- lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py (original)
+++ lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py Fri May 15 07:33:04 2015
@@ -11,7 +11,6 @@ class MiStackTestCase(lldbmi_testcase.Mi
 mydir = TestBase.compute_mydir(__file__)
 
 @lldbmi_test
-@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_stack_list_arguments(self):
@@ -74,7 +73,6 @@ class MiStackTestCase(lldbmi_testcase.Mi
 self.expect(\^error,msg=\Command 'stack-list-arguments'\. Thread 
frame range invalid\)
 
 @lldbmi_test
-@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_stack_list_locals(self):
@@ -202,7 +200,6 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
self.expect(\^done,locals=\[{name=\test_str\,value=\.*?Rakaposhi.*?\},{name=\var_e\,value=\24\},{name=\ptr\,value=\.*?\}\])
 
 @lldbmi_test
-@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_stack_list_variables(self):

Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237443r1=237442r2=237443view=diff
==
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15 07:33:04 2015
@@ -11,7 +11,6 @@ class MiVarTestCase(lldbmi_testcase.MiTe
 mydir = TestBase.compute_mydir(__file__)
 
 @lldbmi_test
-@expectedFailureLinux # The print-values argument can't be parsed 
correctly on Linux
 @expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for 
windows)
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
 def test_lldbmi_eval(self):

Modified: lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp?rev=237443r1=237442r2=237443view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp Fri May 15 07:33:04 2015
@@ -64,13 +64,13 @@ CMICmdArgValPrintValues::Validate(CMICmd
 if (vwArgContext.IsEmpty())
 return MIstatus::success;
 
-const CMIUtilString rArg(vwArgContext.GetArgs()[0]);
-if (IsArgPrintValues(rArg)  ExtractPrintValues(rArg))
+const CMIUtilString strArg(vwArgContext.GetArgs()[0]);
+if (IsArgPrintValues(strArg)  ExtractPrintValues(strArg))
 {
 m_bFound = true;
 m_bValid = true;
 m_argValue = GetPrintValues();
-vwArgContext.RemoveArg(rArg);
+vwArgContext.RemoveArg(strArg);
 return MIstatus::success;
 }
 


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237454 - Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)

2015-05-15 Thread Ilia K
Author: ki.stfu
Date: Fri May 15 11:13:51 2015
New Revision: 237454

URL: http://llvm.org/viewvc/llvm-project?rev=237454view=rev
Log:
Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)

Modified:
lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
lldb/trunk/test/tools/lldb-mi/variable/main.cpp

Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237454r1=237453r2=237454view=diff
==
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15 11:13:51 2015
@@ -239,8 +239,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe
 self.runCmd(-file-exec-and-symbols %s % self.myexe)
 self.expect(\^done)
 
-# Run to BP_var_list_children
-line = line_number('main.cpp', '// BP_var_list_children')
+# Run to BP_var_list_children_test
+line = line_number('main.cpp', '// BP_var_list_children_test')
 self.runCmd(-break-insert main.cpp:%d % line)
 self.expect(\^done,bkpt={number=\1\)
 self.runCmd(-exec-run)
@@ -252,6 +252,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe
 
self.expect(\^done,name=\var_complx\,numchild=\3\,value=\\{\.\.\.\}\,type=\complex_type\,thread-id=\1\,has_more=\0\)
 self.runCmd(-var-create var_complx_array * complx_array)
 
self.expect(\^done,name=\var_complx_array\,numchild=\2\,value=\\[2\]\,type=\complex_type
 \[2\]\,thread-id=\1\,has_more=\0\)
+self.runCmd(-var-create var_pcomplx * pcomplx)
+
self.expect(\^done,name=\var_pcomplx\,numchild=\2\,value=\\{\.\.\.\}\,type=\pcomplex_type\,thread-id=\1\,has_more=\0\)
 
 # Test that -var-list-children lists empty children if range is empty
 # (and that print-values is optional)
@@ -268,24 +270,38 @@ class MiVarTestCase(lldbmi_testcase.MiTe
 
self.expect(\^done,numchild=\3\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,value=\3\,has_more=\0\\},child=\{name=\var_complx\.inner\,exp=\inner\,numchild=\1\,type=\complex_type::\(anonymous
 
struct\)\,thread-id=\1\,value=\\{\.\.\.\}\,has_more=\0\\},child=\{name=\var_complx\.complex_ptr\,exp=\complex_ptr\,numchild=\3\,type=\complex_type
 \*\,thread-id=\1\,value=\0x[0-9a-f]+\,has_more=\0\\}\],has_more=\0\)
 self.runCmd(-var-list-children --simple-values var_complx_array)
 
self.expect(\^done,numchild=\2\,children=\[child=\{name=\var_complx_array\.\[0\]\,exp=\\[0\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\},child=\{name=\var_complx_array\.\[1\]\,exp=\\[1\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\0\)
+self.runCmd(-var-list-children 0 var_pcomplx)
+
self.expect(\^done,numchild=\2\,children=\[child=\{name=\var_pcomplx\.complex_type\,exp=\complex_type\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\},child={name=\var_pcomplx\.complx\,exp=\complx\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\0\)
 
 # Test that -var-list-children lists children without values
 self.runCmd(-var-list-children 0 var_complx 0 1)
 
self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
 self.runCmd(-var-list-children --no-values var_complx 0 1)
 
self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
+self.runCmd(-var-list-children --no-values var_complx_array 0 1)
+
self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx_array\.\[0\]\,exp=\\[0\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
+self.runCmd(-var-list-children --no-values var_pcomplx 0 1)
+
self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_pcomplx\.complex_type\,exp=\complex_type\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
 
 # Test that -var-list-children lists children with all values
 self.runCmd(-var-list-children 1 var_complx 1 2)
 
self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.inner\,exp=\inner\,numchild=\1\,type=\complex_type::\(anonymous
 
struct\)\,thread-id=\1\,value=\\{\.\.\.\}\,has_more=\0\\}\],has_more=\1\)
 self.runCmd(-var-list-children --all-values var_complx 1 2)
 
self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.inner\,exp=\inner\,numchild=\1\,type=\complex_type::\(anonymous
 
struct\)\,thread-id=\1\,value=\\{\.\.\.\}\,has_more=\0\\}\],has_more=\1\)
+self.runCmd(-var-list-children --all-values var_complx_array 1 2)
+

Re: [Lldb-commits] [lldb] r237426 - Fix a reason of *stopped notifications due to SIGINT/SIGSTOP signals (MI)

2015-05-15 Thread jingham
I can't comment on the MI side, but exposing GetInterruptedFromEvent is fine.

Jim

 On May 15, 2015, at 2:29 AM, Ilia K ki.s...@gmail.com wrote:
 
 Author: ki.stfu
 Date: Fri May 15 04:29:09 2015
 New Revision: 237426
 
 URL: http://llvm.org/viewvc/llvm-project?rev=237426view=rev
 Log:
 Fix a reason of *stopped notifications due to SIGINT/SIGSTOP signals (MI)
 
 # Add SBProcess::GetInterruptedFromEvent
 # Add vrEvent arg in 
 CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateStopped
  and CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal
 # Refactor CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal
 ## Clean up and fix typos
 ## Remove vwrbShouldBrk arg
 # Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_{local,remote}
  to expect SIGSTOP instead of SIGINT
 
 
 Modified:
lldb/trunk/include/lldb/API/SBProcess.h
lldb/trunk/scripts/interface/SBProcess.i
lldb/trunk/source/API/SBProcess.cpp
lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h
 
 Modified: lldb/trunk/include/lldb/API/SBProcess.h
 URL: 
 http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=237426r1=237425r2=237426view=diff
 ==
 --- lldb/trunk/include/lldb/API/SBProcess.h (original)
 +++ lldb/trunk/include/lldb/API/SBProcess.h Fri May 15 04:29:09 2015
 @@ -260,6 +260,9 @@ public:
 
 static lldb::SBProcess
 GetProcessFromEvent (const lldb::SBEvent event);
 +
 +static bool
 +GetInterruptedFromEvent (const lldb::SBEvent event);
 
 static bool
 EventIsProcessEvent (const lldb::SBEvent event);
 
 Modified: lldb/trunk/scripts/interface/SBProcess.i
 URL: 
 http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBProcess.i?rev=237426r1=237425r2=237426view=diff
 ==
 --- lldb/trunk/scripts/interface/SBProcess.i (original)
 +++ lldb/trunk/scripts/interface/SBProcess.i Fri May 15 04:29:09 2015
 @@ -349,6 +349,9 @@ public:
 GetProcessFromEvent (const lldb::SBEvent event);
 
 static bool
 +GetInterruptedFromEvent (const lldb::SBEvent event);
 +
 +static bool
 EventIsProcessEvent (const lldb::SBEvent event);
 
 lldb::SBBroadcaster
 
 Modified: lldb/trunk/source/API/SBProcess.cpp
 URL: 
 http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=237426r1=237425r2=237426view=diff
 ==
 --- lldb/trunk/source/API/SBProcess.cpp (original)
 +++ lldb/trunk/source/API/SBProcess.cpp Fri May 15 04:29:09 2015
 @@ -999,6 +999,12 @@ SBProcess::GetProcessFromEvent (const SB
 }
 
 bool
 +SBProcess::GetInterruptedFromEvent (const SBEvent event)
 +{
 +return Process::ProcessEventData::GetInterruptedFromEvent(event.get());
 +}
 +
 +bool
 SBProcess::EventIsProcessEvent (const SBEvent event)
 {
 return event.GetBroadcasterClass() == SBProcess::GetBroadcasterClass();
 
 Modified: lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
 URL: 
 http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py?rev=237426r1=237425r2=237426view=diff
 ==
 --- lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py (original)
 +++ lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py Fri May 15 04:29:09 
 2015
 @@ -66,9 +66,9 @@ class MiSignalTestCase(lldbmi_testcase.M
 
 # Test that *stopped is printed
 # Note that message is different in Darwin and Linux:
 -# Darwin: 
 *stopped,reason=\signal-received\,signal-name=\SIGINT\,signal-meaning=\Interrupt\,frame={level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\??\,fullname=\??\,line=\-1\},thread-id=\1\,stopped-threads=\all\
 +# Darwin: 
 *stopped,reason=\signal-received\,signal-name=\SIGSTOP\,signal-meaning=\Stop\,frame={level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\??\,fullname=\??\,line=\-1\},thread-id=\1\,stopped-threads=\all\
 # Linux:  
 *stopped,reason=\end-stepping-range\,frame={addr=\0x[0-9a-f]+\,func=\??\,args=[],file=\??\,fullname=\??\,line=\-1\},thread-id=\1\,stopped-threads=\all\
 -self.expect([ 
 \*stopped,reason=\signal-received\,signal-name=\SIGINT\,signal-meaning=\Interrupt\,frame=\{level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\\?\?\,fullname=\\?\?\,line=\-1\\},thread-id=\1\,stopped-threads=\all\,
 +self.expect([ 
 \*stopped,reason=\signal-received\,signal-name=\SIGSTOP\,signal-meaning=\Stop\,frame=\{level=\0\,addr=\0x[0-9a-f]+\,func=\_dyld_start\,file=\\?\?\,fullname=\\?\?\,line=\-1\\},thread-id=\1\,stopped-threads=\all\,
   
 

[Lldb-commits] [lldb] r237484 - Don't crash if a function has no name by calling 'strcmp(name, main)'.

2015-05-15 Thread Greg Clayton
Author: gclayton
Date: Fri May 15 17:20:29 2015
New Revision: 237484

URL: http://llvm.org/viewvc/llvm-project?rev=237484view=rev
Log:
Don't crash if a function has no name by calling 'strcmp(name, main)'.

rdar://problem/20925061


Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=237484r1=237483r2=237484view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri May 15 
17:20:29 2015
@@ -1103,7 +1103,7 @@ SymbolFileDWARF::ParseCompileUnitFunctio
 func_name.SetValue(ConstString(mangled), true);
 else if (die-GetParent()-Tag() == DW_TAG_compile_unit 
  
LanguageRuntime::LanguageIsCPlusPlus(dwarf_cu-GetLanguageType()) 
- strcmp(name, main) != 0)
+ name  strcmp(name, main) != 0)
 {
 // If the mangled name is not present in the DWARF, generate 
the demangled name
 // using the decl context. We skip if the function is main 
as its name is


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r237454 - Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)

2015-05-15 Thread Vince Harron
XFAIL'd MiVarTestCase.test_lldbmi_eval on gcc-4.9/i386

It times out on TestMyVar:113

self.expect(\^done,value=\0x[0-9a-f]+\)


On Fri, May 15, 2015 at 2:07 PM, Vince Harron vi...@nethacker.com wrote:

 Please let us know if you need help.

 On Fri, May 15, 2015 at 2:02 PM, Vince Harron vi...@nethacker.com wrote:

 Hi Illia,

 This appears to have broken Linux i386 gcc 4.9.2


 http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2419

 Is it a quick fix?

 If not, can you roll back?

 Thanks,

 Vince


 On Fri, May 15, 2015 at 9:13 AM, Ilia K ki.s...@gmail.com wrote:

 Author: ki.stfu
 Date: Fri May 15 11:13:51 2015
 New Revision: 237454

 URL: http://llvm.org/viewvc/llvm-project?rev=237454view=rev
 Log:
 Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)

 Modified:
 lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
 lldb/trunk/test/tools/lldb-mi/variable/main.cpp

 Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237454r1=237453r2=237454view=diff

 ==
 --- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)
 +++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15
 11:13:51 2015
 @@ -239,8 +239,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe
  self.runCmd(-file-exec-and-symbols %s % self.myexe)
  self.expect(\^done)

 -# Run to BP_var_list_children
 -line = line_number('main.cpp', '// BP_var_list_children')
 +# Run to BP_var_list_children_test
 +line = line_number('main.cpp', '// BP_var_list_children_test')
  self.runCmd(-break-insert main.cpp:%d % line)
  self.expect(\^done,bkpt={number=\1\)
  self.runCmd(-exec-run)
 @@ -252,6 +252,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe

  
 self.expect(\^done,name=\var_complx\,numchild=\3\,value=\\{\.\.\.\}\,type=\complex_type\,thread-id=\1\,has_more=\0\)
  self.runCmd(-var-create var_complx_array * complx_array)

  
 self.expect(\^done,name=\var_complx_array\,numchild=\2\,value=\\[2\]\,type=\complex_type
 \[2\]\,thread-id=\1\,has_more=\0\)
 +self.runCmd(-var-create var_pcomplx * pcomplx)
 +
 self.expect(\^done,name=\var_pcomplx\,numchild=\2\,value=\\{\.\.\.\}\,type=\pcomplex_type\,thread-id=\1\,has_more=\0\)

  # Test that -var-list-children lists empty children if range is
 empty
  # (and that print-values is optional)
 @@ -268,24 +270,38 @@ class MiVarTestCase(lldbmi_testcase.MiTe

  
 self.expect(\^done,numchild=\3\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,value=\3\,has_more=\0\\},child=\{name=\var_complx\.inner\,exp=\inner\,numchild=\1\,type=\complex_type::\(anonymous
 struct\)\,thread-id=\1\,value=\\{\.\.\.\}\,has_more=\0\\},child=\{name=\var_complx\.complex_ptr\,exp=\complex_ptr\,numchild=\3\,type=\complex_type
 \*\,thread-id=\1\,value=\0x[0-9a-f]+\,has_more=\0\\}\],has_more=\0\)
  self.runCmd(-var-list-children --simple-values
 var_complx_array)

  
 self.expect(\^done,numchild=\2\,children=\[child=\{name=\var_complx_array\.\[0\]\,exp=\\[0\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\},child=\{name=\var_complx_array\.\[1\]\,exp=\\[1\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\0\)
 +self.runCmd(-var-list-children 0 var_pcomplx)
 +
 self.expect(\^done,numchild=\2\,children=\[child=\{name=\var_pcomplx\.complex_type\,exp=\complex_type\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\},child={name=\var_pcomplx\.complx\,exp=\complx\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\0\)

  # Test that -var-list-children lists children without values
  self.runCmd(-var-list-children 0 var_complx 0 1)

  
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
  self.runCmd(-var-list-children --no-values var_complx 0 1)

  
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
 +self.runCmd(-var-list-children --no-values var_complx_array 0
 1)
 +
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx_array\.\[0\]\,exp=\\[0\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
 +self.runCmd(-var-list-children --no-values var_pcomplx 0 1)
 +
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_pcomplx\.complex_type\,exp=\complex_type\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)

  # Test that -var-list-children lists children with all values
  self.runCmd(-var-list-children 1 var_complx 1 2)

  
 

[Lldb-commits] [lldb] r237485 - Don't crash if we have bad debug info that has a DW_TAG_inheritance with a bad DW_AT_type reference. Emit an error with instructions to file a bug.

2015-05-15 Thread Greg Clayton
Author: gclayton
Date: Fri May 15 17:31:18 2015
New Revision: 237485

URL: http://llvm.org/viewvc/llvm-project?rev=237485view=rev
Log:
Don't crash if we have bad debug info that has a DW_TAG_inheritance with a bad 
DW_AT_type reference. Emit an error with instructions to file a bug.

rdar://problem/20944860


Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=237485r1=237484r2=237485view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri May 15 
17:31:18 2015
@@ -2333,8 +2333,15 @@ SymbolFileDWARF::ParseChildMembers
 }
 
 Type *base_class_type = ResolveTypeUID(encoding_uid);
-assert(base_class_type);
-
+if (base_class_type == NULL)
+{
+GetObjectFile()-GetModule()-ReportError(0x%8.8x: 
DW_TAG_inheritance failed to resolve a the base class at 0x%8.8 PRIx64  from 
enclosing type 0x%8.8x. \nPlease file a bug and attach the file at the start of 
this error message,
+  
die-GetOffset(),
+  encoding_uid,
+  
parent_die-GetOffset());
+break;
+}
+
 ClangASTType base_class_clang_type = 
base_class_type-GetClangFullType();
 assert (base_class_clang_type);
 if (class_language == eLanguageTypeObjC)


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r237411 - The StopInfo base class has an m_description std::string.

2015-05-15 Thread Jason Molenda
Sorry for causing the testsuite regression, Vince.  If I do break another 
platform with a checkin, reverting the change is fine -- I don't want to leave 
the sources in a broken state until I get back on-line to look at it.

Thanks for coming up with a fix Pavel.  I don't see a problem with your change 
but if there's fallout we can start by reverting both and I'll investigate more 
closely.

Jason

 On May 15, 2015, at 3:22 AM, Pavel Labath lab...@google.com wrote:
 
 Hi all,
 
 I have tracked this issue down to the processing of the description
 field of the gdb-remote stop reply packets. If the packet has a
 description field, we use it to override the description of the
 StopInfo class. However, in the case of watchpoints the description
 field contains the raw address that got hit, which is not exactly what
 we want to display to the user. I have committed a fix for this in
 r237436. I think it's a fairly low-risk change, but could you please
 take a look at it and see if you think it's the correct way to address
 this. Feel free to replace it with a more appropriate fix.
 
 cheers,
 pl
 
 
 On 15 May 2015 at 06:35, Vince Harron vi...@nethacker.com wrote:
 Hi Jason,
 
 Unfortunately, this broke watchpoints on Linux.  (I just confirmed by
 building  testing both this revision and the previous.)
 
 Do you have any guesses?  Would you like one of us to take a look?
 
 How do you feel about reverting it to get the build green while it's being
 investigated?
 
 http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2406
 
 Vince
 
 
 On Thu, May 14, 2015 at 5:19 PM, Jason Molenda jmole...@apple.com wrote:
 
 Author: jmolenda
 Date: Thu May 14 19:19:28 2015
 New Revision: 237411
 
 URL: http://llvm.org/viewvc/llvm-project?rev=237411view=rev
 Log:
 The StopInfo base class has an m_description std::string.
 Remove the m_description ivar from the StopInfoBreakpoint
 and StopInfoWatchpoint subclasses of StopInfo.  Also,
 initialize the m_description ivar in the StopInfo ctor.
 rdar://problem/20902950
 
 Modified:
lldb/trunk/source/Target/StopInfo.cpp
 
 Modified: lldb/trunk/source/Target/StopInfo.cpp
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=237411r1=237410r2=237411view=diff
 
 ==
 --- lldb/trunk/source/Target/StopInfo.cpp (original)
 +++ lldb/trunk/source/Target/StopInfo.cpp Thu May 14 19:19:28 2015
 @@ -40,6 +40,7 @@ StopInfo::StopInfo (Thread thread, uint
 m_stop_id (thread.GetProcess()-GetStopID()),
 m_resume_id (thread.GetProcess()-GetResumeID()),
 m_value (value),
 +m_description (),
 m_override_should_notify (eLazyBoolCalculate),
 m_override_should_stop (eLazyBoolCalculate),
 m_extended_info()
 @@ -112,7 +113,6 @@ class StopInfoBreakpoint : public StopIn
 public:
 StopInfoBreakpoint (Thread thread, break_id_t break_id) :
 StopInfo (thread, break_id),
 -m_description(),
 m_should_stop (false),
 m_should_stop_is_valid (false),
 m_should_perform_action (true),
 @@ -125,7 +125,6 @@ public:
 
 StopInfoBreakpoint (Thread thread, break_id_t break_id, bool
 should_stop) :
 StopInfo (thread, break_id),
 -m_description(),
 m_should_stop (should_stop),
 m_should_stop_is_valid (true),
 m_should_perform_action (true),
 @@ -568,7 +567,6 @@ protected:
 }
 
 private:
 -std::string m_description;
 bool m_should_stop;
 bool m_should_stop_is_valid;
 bool m_should_perform_action; // Since we are trying to preserve the
 state of the system even if we run functions
 @@ -621,7 +619,6 @@ public:
 
 StopInfoWatchpoint (Thread thread, break_id_t watch_id) :
 StopInfo(thread, watch_id),
 -m_description(),
 m_should_stop(false),
 m_should_stop_is_valid(false)
 {
 @@ -860,7 +857,6 @@ protected:
 }
 
 private:
 -std::string m_description;
 bool m_should_stop;
 bool m_should_stop_is_valid;
 };
 
 
 ___
 lldb-commits mailing list
 lldb-commits@cs.uiuc.edu
 http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
 
 
 
 ___
 lldb-commits mailing list
 lldb-commits@cs.uiuc.edu
 http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
 


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237479 - Reverting r237460 to fix test failures introduced on OSX Linux

2015-05-15 Thread Vince Harron
Author: vharron
Date: Fri May 15 16:43:26 2015
New Revision: 237479

URL: http://llvm.org/viewvc/llvm-project?rev=237479view=rev
Log:
Reverting r237460 to fix test failures introduced on OSX  Linux

TestExitDuringStep.py
TestNumThreads.py
TestThreadExit.py
TestThreadStates.py


Modified:
lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h
lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/source/API/SBTarget.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Core/IOHandler.cpp
lldb/trunk/source/Target/Target.cpp

lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py

lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
lldb/trunk/test/functionalities/breakpoint/breakpoint_options/Makefile

lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
lldb/trunk/test/functionalities/breakpoint/breakpoint_options/main.c

lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
lldb/trunk/test/lldbutil.py
lldb/trunk/test/settings/TestSettings.py
lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py
lldb/trunk/test/tools/lldb-mi/breakpoint/main.cpp

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h?rev=237479r1=237478r2=237479view=diff
==
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h Fri May 15 
16:43:26 2015
@@ -32,8 +32,7 @@ public:
 const FileSpec resolver,
 uint32_t line_no,
 bool check_inlines,
-bool skip_prologue,
-bool exact_match);
+bool skip_prologue);
 
 virtual
 ~BreakpointResolverFileLine ();
@@ -68,7 +67,6 @@ protected:
 uint32_t m_line_number; // This is the line number that we are looking for.
 bool m_inlines; // This determines whether the resolver looks for inlined 
functions or not.
 bool m_skip_prologue;
-bool m_exact_match;
 
 private:
 DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileRegex.h?rev=237479r1=237478r2=237479view=diff
==
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileRegex.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileRegex.h Fri May 15 
16:43:26 2015
@@ -29,8 +29,7 @@ class BreakpointResolverFileRegex :
 {
 public:
 BreakpointResolverFileRegex (Breakpoint *bkpt,
- RegularExpression regex,
- bool exact_match);
+RegularExpression regex);
 
 virtual
 ~BreakpointResolverFileRegex ();
@@ -62,7 +61,6 @@ public:
 protected:
 friend class Breakpoint;
 RegularExpression m_regex; // This is the line expression that we are 
looking for.
-bool m_exact_match;
 
 private:
 DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileRegex);

Modified: lldb/trunk/include/lldb/Target/Target.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=237479r1=237478r2=237479view=diff
==
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Fri May 15 16:43:26 2015
@@ -64,9 +64,6 @@ public:
 void
 SetDefaultArchitecture (const ArchSpec arch);
 
-bool
-GetMoveToNearestCode () const;
-
 lldb::DynamicValueType
 GetPreferDynamicValue() const;
 
@@ -704,8 +701,7 @@ public:
   LazyBool check_inlines,
   LazyBool skip_prologue,
   bool internal,
-  bool request_hardware,
-  LazyBool move_to_nearest_code);
+  bool request_hardware);
 
 // Use this to create breakpoint that matches regex against the source 
lines in files given in source_file_list:
 lldb::BreakpointSP
@@ -713,8 +709,7 @@ public:
  const FileSpecList *source_file_list,
  RegularExpression source_regex,
 

[Lldb-commits] [lldb] r237504 - Constant result ValueObjects are - well - constant

2015-05-15 Thread Enrico Granata
Author: enrico
Date: Fri May 15 20:27:00 2015
New Revision: 237504

URL: http://llvm.org/viewvc/llvm-project?rev=237504view=rev
Log:
Constant result ValueObjects are - well  - constant
And they also do not have a thread/frame attached to them

That makes dynamic and synthetic values attached to them impossible to update - 
which, among other things, makes it impossible to properly display persistent 
variables of types that could have such dynamic/persistent values

Fix this by making it so that a ValueObject can control its constantness (hint: 
dynamic and synthetic values cannot be constant) and whether it wants to let 
itself be updated when an invalid thread is around


Added:
lldb/trunk/test/expression_command/persistent_ptr_update/
lldb/trunk/test/expression_command/persistent_ptr_update/Makefile

lldb/trunk/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
lldb/trunk/test/expression_command/persistent_ptr_update/main.c
Modified:
lldb/trunk/include/lldb/Core/ValueObject.h
lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
lldb/trunk/source/Core/ValueObject.cpp

Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=237504r1=237503r2=237504view=diff
==
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Fri May 15 20:27:00 2015
@@ -285,18 +285,19 @@ public:
 SetUpdated ();
 
 bool
-NeedsUpdating()
+NeedsUpdating(bool accept_invalid_exe_ctx)
 {
-SyncWithProcessState();
+SyncWithProcessState(accept_invalid_exe_ctx);
 return m_needs_update;
 }
 
 bool
 IsValid ()
 {
+const bool accept_invalid_exe_ctx = false;
 if (!m_mod_id.IsValid())
 return false;
-else if (SyncWithProcessState ())
+else if (SyncWithProcessState (accept_invalid_exe_ctx))
 {
 if (!m_mod_id.IsValid())
 return false;
@@ -318,7 +319,7 @@ public:
 
 private:
 bool
-SyncWithProcessState ();
+SyncWithProcessState (bool accept_invalid_exe_ctx);
 
 ProcessModID m_mod_id; // This is the stop id when this ValueObject 
was last evaluated.
 ExecutionContextRef m_exe_ctx_ref;
@@ -851,12 +852,19 @@ public:
 virtual bool
 SetData (DataExtractor data, Error error);
 
-bool
+virtual bool
 GetIsConstant () const
 {
 return m_update_point.IsConstant();
 }
 
+virtual bool
+NeedsUpdating ()
+{
+const bool accept_invalid_exe_ctx = false;
+return m_update_point.NeedsUpdating(accept_invalid_exe_ctx);
+}
+
 void
 SetIsConstant ()
 {

Modified: lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h?rev=237504r1=237503r2=237504view=diff
==
--- lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h Fri May 15 20:27:00 
2015
@@ -56,6 +56,19 @@ public:
 return true;
 }
 
+virtual bool
+GetIsConstant () const
+{
+return false;
+}
+
+virtual bool
+NeedsUpdating ()
+{
+const bool accept_invalid_exe_ctx = true;
+return m_update_point.NeedsUpdating(accept_invalid_exe_ctx);
+}
+
 virtual ValueObject *
 GetParent()
 {

Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=237504r1=237503r2=237504view=diff
==
--- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Fri May 15 
20:27:00 2015
@@ -141,6 +141,19 @@ public:
 }
 
 virtual bool
+GetIsConstant () const
+{
+return false;
+}
+
+virtual bool
+NeedsUpdating ()
+{
+const bool accept_invalid_exe_ctx = true;
+return m_update_point.NeedsUpdating(accept_invalid_exe_ctx);
+}
+
+virtual bool
 SetValueFromCString (const char *value_str, Error error);
 
 virtual void

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=237504r1=237503r2=237504view=diff
==
--- 

[Lldb-commits] [lldb] r237460 - Add --move-to-nearest-code / target.move-to-nearest-code options

2015-05-15 Thread Ilia K
Author: ki.stfu
Date: Fri May 15 13:16:15 2015
New Revision: 237460

URL: http://llvm.org/viewvc/llvm-project?rev=237460view=rev
Log:
Add --move-to-nearest-code / target.move-to-nearest-code options

Summary:
This option forces to only set a source line breakpoint when there is an 
exact-match

This patch includes the following commits:
# Add the -m/--exact-match option in breakpoint set command
## Add exact_match arg in BreakpointResolverFileLine ctor
## Add m_exact_match field in BreakpointResolverFileLine
## Add exact_match arg in BreakpointResolverFileRegex ctor
## Add m_exact_match field in BreakpointResolverFileRegex
## Add exact_match arg in Target::CreateSourceRegexBreakpoint
## Add exact_match arg in Target::CreateBreakpoint
## Add -m/--exact-match option in breakpoint set command
# Add target.exact-match option to skip BP if source line doesn't match
## Add target.exact-match global option
## Add Target::GetExactMatch
## Refactor Target::CreateSourceRegexBreakpoint to accept LazyBool exact_match 
(was bool)
## Refactor Target::CreateBreakpoint to accept LazyBool exact_match (was bool)
# Add target.exact-match test in SettingsCommandTestCase
# Add BreakpointOptionsTestCase tests to test --skip-prologue/--exact-match 
options
# Fix a few typos in lldbutil.check_breakpoint_result func
# Rename --exact-match/m_exact_match/exact_match/GetExactMatch to 
--move-to-nearest-code/m_move_to_nearest_code/move_to_nearest_code/GetMoveToNearestCode
# Add exact_match field in BreakpointResolverFileLine::GetDescription and 
BreakpointResolverFileRegex::GetDescription, for example:
was:
```
1: file = 
'/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c',
 line = 12, locations = 1, resolved = 1, hit count = 2
  1.1: where = a.out`main + 20 at main.c:12, address = 0x00010eb4, 
resolved, hit count = 2
```
now:
```
1: file = 
'/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c',
 line = 12, exact_match = 0, locations = 1, resolved = 1, hit count = 2
  1.1: where = a.out`main + 20 at main.c:12, address = 0x00010eb4, 
resolved, hit count = 2
```

Test Plan:
./dotest.py -v --executable $BUILDDIR/bin/lldb functionalities/breakpoint/
./dotest.py -v --executable $BUILDDIR/bin/lldb settings/
./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/breakpoint/

Reviewers: jingham, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, clayborg, jingham

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

Added:
lldb/trunk/test/functionalities/breakpoint/breakpoint_options/
lldb/trunk/test/functionalities/breakpoint/breakpoint_options/Makefile

lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
lldb/trunk/test/functionalities/breakpoint/breakpoint_options/main.c
Modified:
lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h
lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/source/API/SBTarget.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Core/IOHandler.cpp
lldb/trunk/source/Target/Target.cpp

lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py

lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py

lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
lldb/trunk/test/lldbutil.py
lldb/trunk/test/settings/TestSettings.py
lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py
lldb/trunk/test/tools/lldb-mi/breakpoint/main.cpp

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h?rev=237460r1=237459r2=237460view=diff
==
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h Fri May 15 
13:16:15 2015
@@ -32,7 +32,8 @@ public:
 const FileSpec resolver,
 uint32_t line_no,
 bool check_inlines,
-bool skip_prologue);
+bool skip_prologue,
+bool exact_match);
 
 virtual
 ~BreakpointResolverFileLine ();
@@ -67,6 +68,7 @@ protected:
 uint32_t m_line_number; // This is the line number that we are looking for.
 bool m_inlines; // This determines whether the resolver looks for inlined 
functions or not.
 bool m_skip_prologue;
+bool m_exact_match;
 
 private:
 

[Lldb-commits] [lldb] r237466 - Choose stdlib for test suite based on target platform.

2015-05-15 Thread Robert Flack
Author: flackr
Date: Fri May 15 13:54:32 2015
New Revision: 237466

URL: http://llvm.org/viewvc/llvm-project?rev=237466view=rev
Log:
Choose stdlib for test suite based on target platform.

When compiling programs for the test suite we currently choose which stdlib to
use based on the host platform, but should be basing this on the target
platform.

Test Plan: ./dotest.py $DOTEST_OPTS -t -p TestThreadExit.py
This test previously failed mac-linux most of the time due to using the mac
host's atomic declaration.

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

Modified:
lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=237466r1=237465r2=237466view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri May 15 13:54:32 2015
@@ -752,7 +752,7 @@ def skipIfHostIncompatibleWithRemote(fun
 host_arch = self.getLldbArchitecture()
 host_platform = getHostPlatform()
 target_arch = self.getArchitecture()
-target_platform = 'darwin' if self.getPlatform() in 
getDarwinOSTriples() else self.getPlatform()
+target_platform = 'darwin' if self.platformIsDarwin() else 
self.getPlatform()
 if not (target_arch == 'x86_64' and host_arch == 'i386') and host_arch 
!= target_arch:
 self.skipTest(skipping because target %s is not compatible with 
host architecture %s % (target_arch, host_arch))
 elif target_platform != host_platform:
@@ -1684,7 +1684,7 @@ class Base(unittest2.TestCase):
 
 def getstdlibFlag(self):
  Returns the proper -stdlib flag, or empty if not required.
-if sys.platform.startswith(darwin) or 
sys.platform.startswith(freebsd):
+if self.platformIsDarwin() or self.getPlatform() == freebsd:
 stdlibflag = -stdlib=libc++
 else:
 stdlibflag = 
@@ -1734,7 +1734,7 @@ class Base(unittest2.TestCase):
 
 stdflag = self.getstdFlag()
 
-if sys.platform.startswith(darwin):
+if self.platformIsDarwin():
 dsym = os.path.join(self.lib_dir, 'LLDB.framework', 'LLDB')
 d = {'DYLIB_CXX_SOURCES' : sources,
  'DYLIB_NAME' : lib_name,
@@ -1742,12 +1742,12 @@ class Base(unittest2.TestCase):
  'FRAMEWORK_INCLUDES' : -F%s % self.lib_dir,
  'LD_EXTRAS' : %s -Wl,-rpath,%s -dynamiclib % (dsym, 
self.lib_dir),
 }
-elif sys.platform.startswith('freebsd') or 
sys.platform.startswith(linux) or os.environ.get('LLDB_BUILD_TYPE') == 
'Makefile':
+elif self.getPlatform() == 'freebsd' or self.getPlatform() == 'linux' 
or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile':
 d = {'DYLIB_CXX_SOURCES' : sources,
  'DYLIB_NAME' : lib_name,
  'CFLAGS_EXTRAS' : %s -I%s -fPIC % (stdflag, 
os.path.join(os.environ[LLDB_SRC], include)),
  'LD_EXTRAS' : -shared -L%s -llldb % self.lib_dir}
-elif sys.platform.startswith(win):
+elif self.getPlatform() == 'windows':
 d = {'DYLIB_CXX_SOURCES' : sources,
  'DYLIB_NAME' : lib_name,
  'CFLAGS_EXTRAS' : %s -I%s -fPIC % (stdflag, 
os.path.join(os.environ[LLDB_SRC], include)),
@@ -1821,7 +1821,7 @@ class Base(unittest2.TestCase):
 ldflags = 
 
 # On Mac OS X, unless specifically requested to use libstdc++, use 
libc++
-if not use_libstdcxx and sys.platform.startswith('darwin'):
+if not use_libstdcxx and self.platformIsDarwin():
 use_libcxx = True
 
 if use_libcxx and self.libcxxPath:
@@ -1838,7 +1838,7 @@ class Base(unittest2.TestCase):
 cflags += c++0x
 else:
 cflags += c++11
-if sys.platform.startswith(darwin) or 
sys.platform.startswith(freebsd):
+if self.platformIsDarwin() or self.getPlatform() == freebsd:
 cflags +=  -stdlib=libc++
 elif clang in self.getCompiler():
 cflags +=  -stdlib=libstdc++


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237467 - Only check _ZN function prefix in Linux and FreeBSD targets in SymbolFileDWARF

2015-05-15 Thread Robert Flack
Author: flackr
Date: Fri May 15 13:59:59 2015
New Revision: 237467

URL: http://llvm.org/viewvc/llvm-project?rev=237467view=rev
Log:
Only check _ZN function prefix in Linux and FreeBSD targets in SymbolFileDWARF

In http://reviews.llvm.org/D9754 I enabled the mangled symbol name lookup
workaround used to find global and anonymous namespace symbols in linux binaries
for all platforms, however we should still only check for these symbols when
processing Linux or FreeBSD binaries where they are relevant. This patch makes
this change.

Test Plan: The tests from the original revision still pass:
TestCallCPPFunction.py
TestCallStopAndContinue.py
TestExprs.py
TestExprsChar.py
TestNamespace.py
TestOverloadedFunctions.py
TestRvalueReferences.py
TestThreadExit.py

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

Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=237467r1=237466r2=237467view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri May 15 
13:59:59 2015
@@ -26,6 +26,7 @@
 
 #include llvm/Support/Casting.h
 
+#include lldb/Core/ArchSpec.h
 #include lldb/Core/Module.h
 #include lldb/Core/ModuleList.h
 #include lldb/Core/ModuleSpec.h
@@ -4036,14 +4037,21 @@ SymbolFileDWARF::FindFunctions (const Co
 // functions debugging FreeBSD and Linux binaries.
 // If we didn't find any functions in the global namespace try
 // looking in the basename index but ignore any returned
-// functions that have a namespace (ie. mangled names starting 
with 
-// '_ZN') but keep functions which have an anonymous namespace
+// functions that have a namespace but keep functions which
+// have an anonymous namespace
+// TODO: The arch in the object file isn't correct for MSVC
+// binaries on windows, we should find a way to make it
+// correct and handle those symbols as well.
 if (sc_list.GetSize() == 0)
 {
-SymbolContextList temp_sc_list;
-FindFunctions (name, m_function_basename_index, 
include_inlines, temp_sc_list);
-if (!namespace_decl)
+ArchSpec arch;
+if (!namespace_decl 
+GetObjectFile()-GetArchitecture(arch) 
+(arch.GetTriple().isOSFreeBSD() || 
arch.GetTriple().isOSLinux() ||
+ arch.GetMachine() == llvm::Triple::hexagon))
 {
+SymbolContextList temp_sc_list;
+FindFunctions (name, m_function_basename_index, 
include_inlines, temp_sc_list);
 SymbolContext sc;
 for (uint32_t i = 0; i  temp_sc_list.GetSize(); i++)
 {
@@ -4051,6 +4059,8 @@ SymbolFileDWARF::FindFunctions (const Co
 {
 ConstString mangled_name = 
sc.GetFunctionName(Mangled::ePreferMangled);
 ConstString demangled_name = 
sc.GetFunctionName(Mangled::ePreferDemangled);
+// Mangled names on Linux and FreeBSD are of the 
form:
+// _ZN18function_namespace13function_nameEv.
 if (strncmp(mangled_name.GetCString(), _ZN, 3) ||
 !strncmp(demangled_name.GetCString(), 
(anonymous namespace), 21))
 {


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237465 - OperatingSystem plug-ins need to avoid running code when fetching thread lists. This patch helps with that by making all SBValue objects that are fetched not try to do

2015-05-15 Thread Greg Clayton
Author: gclayton
Date: Fri May 15 13:40:24 2015
New Revision: 237465

URL: http://llvm.org/viewvc/llvm-project?rev=237465view=rev
Log:
OperatingSystem plug-ins need to avoid running code when fetching thread lists. 
This patch helps with that by making all SBValue objects that are fetched not 
try to do dynamic type resolution. Objective C can end up running code to fetch 
a list of all ISA pointers so we can tell when something is dynamic and this 
running code could cause the OS plug-in to continue the target.

This fix disabled dynamic types, fetches the new threads from the OS plug-in, 
then restores the setting.

rdar://problem/20768407 

Modified:
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/source/Target/Process.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=237465r1=237464r2=237465view=diff
==
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Fri May 15 13:40:24 2015
@@ -69,7 +69,10 @@ public:
 
 lldb::DynamicValueType
 GetPreferDynamicValue() const;
-
+
+bool
+SetPreferDynamicValue (lldb::DynamicValueType d);
+
 bool
 GetDisableASLR () const;
 

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=237465r1=237464r2=237465view=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Fri May 15 13:40:24 2015
@@ -1548,10 +1548,24 @@ Process::UpdateThreadListIfNeeded ()
 for (size_t i=0; inum_old_threads; ++i)
 old_thread_list.GetThreadAtIndex(i, 
false)-ClearBackingThread();
 
+// Turn off dynamic types to ensure we don't run any 
expressions. Objective C
+// can run an expression to determine if a SBValue is 
a dynamic type or not
+// and we need to avoid this. OperatingSystem plug-ins 
can't run expressions
+// that require running code...
+
+Target target = GetTarget();
+const lldb::DynamicValueType saved_prefer_dynamic = 
target.GetPreferDynamicValue ();
+if (saved_prefer_dynamic != lldb::eNoDynamicValues)
+
target.SetPreferDynamicValue(lldb::eNoDynamicValues);
+
 // Now let the OperatingSystem plug-in update the 
thread list
+
 os-UpdateThreadList (old_thread_list,  // Old list 
full of threads created by OS plug-in
   real_thread_list, // The actual 
thread list full of threads created by each lldb_private::Process subclass
   new_thread_list); // The new 
thread list that we will show to the user that gets filled in
+
+if (saved_prefer_dynamic != lldb::eNoDynamicValues)
+target.SetPreferDynamicValue(saved_prefer_dynamic);
 }
 else
 {

Modified: lldb/trunk/source/Target/Target.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=237465r1=237464r2=237465view=diff
==
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Fri May 15 13:40:24 2015
@@ -3217,6 +3217,14 @@ TargetProperties::GetPreferDynamicValue(
 }
 
 bool
+TargetProperties::SetPreferDynamicValue (lldb::DynamicValueType d)
+{
+const uint32_t idx = ePropertyPreferDynamic;
+return m_collection_sp-SetPropertyAtIndexAsEnumeration(NULL, idx, d);
+}
+
+
+bool
 TargetProperties::GetDisableASLR () const
 {
 const uint32_t idx = ePropertyDisableASLR;


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r237464 - Fix the lldb-mi Xcode project build target to it compiles.

2015-05-15 Thread Greg Clayton
Author: gclayton
Date: Fri May 15 13:38:04 2015
New Revision: 237464

URL: http://llvm.org/viewvc/llvm-project?rev=237464view=rev
Log:
Fix the lldb-mi Xcode project build target to it compiles.


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=237464r1=237463r2=237464view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri May 15 13:38:04 2015
@@ -338,6 +338,7 @@
26780C611867C33D00234593 /* libncurses.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; 
};
267C012B136880DF006E963E /* OptionGroupValueObjectDisplay.cpp 
in Sources */ = {isa = PBXBuildFile; fileRef = 267C012A136880DF006E963E /* 
OptionGroupValueObjectDisplay.cpp */; };
267C01371368C49C006E963E /* OptionGroupOutputFile.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 26BCFC531368B3E4006DC050 /* 
OptionGroupOutputFile.cpp */; };
+   267DFB461B06752A0FB7 /* MICmdArgValPrintValues.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 267DFB441B06752A0FB7 /* 
MICmdArgValPrintValues.cpp */; };
268648C416531BF800F04704 /* com.apple.debugserver.posix.plist 
in CopyFiles */ = {isa = PBXBuildFile; fileRef = 268648C116531BF800F04704 /* 
com.apple.debugserver.posix.plist */; };
268648C516531BF800F04704 /* 
com.apple.debugserver.applist.internal.plist in CopyFiles */ = {isa = 
PBXBuildFile; fileRef = 268648C216531BF800F04704 /* 
com.apple.debugserver.applist.internal.plist */; };
268648C616531BF800F04704 /* 
com.apple.debugserver.internal.plist in CopyFiles */ = {isa = PBXBuildFile; 
fileRef = 268648C316531BF800F04704 /* com.apple.debugserver.internal.plist */; 
};
@@ -1738,6 +1739,8 @@
2676A094119C93C8008A98EF /* StringExtractorGDBRemote.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
name = StringExtractorGDBRemote.h; path = 
source/Utility/StringExtractorGDBRemote.h; sourceTree = group; };
267C0128136880C7006E963E /* OptionGroupValueObjectDisplay.h */ 
= {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = 
OptionGroupValueObjectDisplay.h; path = 
include/lldb/Interpreter/OptionGroupValueObjectDisplay.h; sourceTree = 
group; };
267C012A136880DF006E963E /* OptionGroupValueObjectDisplay.cpp 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; name = OptionGroupValueObjectDisplay.cpp; path = 
source/Interpreter/OptionGroupValueObjectDisplay.cpp; sourceTree = group; };
+   267DFB441B06752A0FB7 /* MICmdArgValPrintValues.cpp */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; name = MICmdArgValPrintValues.cpp; path = 
tools/lldb-mi/MICmdArgValPrintValues.cpp; sourceTree = SOURCE_ROOT; };
+   267DFB451B06752A0FB7 /* MICmdArgValPrintValues.h */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
= MICmdArgValPrintValues.h; path = tools/lldb-mi/MICmdArgValPrintValues.h; 
sourceTree = SOURCE_ROOT; };
2682100C143A59AE004BCF2D /* MappedHash.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
MappedHash.h; path = include/lldb/Core/MappedHash.h; sourceTree = group; };
2682F16A115EDA0D00CCFF99 /* PseudoTerminal.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = PseudoTerminal.cpp; path = source/Utility/PseudoTerminal.cpp; sourceTree 
= group; };
2682F16B115EDA0D00CCFF99 /* PseudoTerminal.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
PseudoTerminal.h; path = include/lldb/Utility/PseudoTerminal.h; sourceTree = 
group; };
@@ -3629,6 +3632,8 @@
266941711A6DC2AC0063BE93 /* 
MICmdArgValOptionLong.h */,
266941721A6DC2AC0063BE93 /* 
MICmdArgValOptionShort.cpp */,
266941731A6DC2AC0063BE93 /* 
MICmdArgValOptionShort.h */,
+   267DFB441B06752A0FB7 /* 
MICmdArgValPrintValues.cpp */,
+   267DFB451B06752A0FB7 /* 
MICmdArgValPrintValues.h */,
266941741A6DC2AC0063BE93 /* 
MICmdArgValString.cpp */,
266941751A6DC2AC0063BE93 /* MICmdArgValString.h 
*/,
266941761A6DC2AC0063BE93 /* 
MICmdArgValThreadGrp.cpp */,
@@ -6597,6 +6602,7 @@
266942341A6DC2AC0063BE93 /* 
MICmnMIValueResult.cpp in Sources */,
 

Re: [Lldb-commits] [lldb] r237454 - Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)

2015-05-15 Thread Vince Harron
Please let us know if you need help.

On Fri, May 15, 2015 at 2:02 PM, Vince Harron vi...@nethacker.com wrote:

 Hi Illia,

 This appears to have broken Linux i386 gcc 4.9.2


 http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2419

 Is it a quick fix?

 If not, can you roll back?

 Thanks,

 Vince


 On Fri, May 15, 2015 at 9:13 AM, Ilia K ki.s...@gmail.com wrote:

 Author: ki.stfu
 Date: Fri May 15 11:13:51 2015
 New Revision: 237454

 URL: http://llvm.org/viewvc/llvm-project?rev=237454view=rev
 Log:
 Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)

 Modified:
 lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
 lldb/trunk/test/tools/lldb-mi/variable/main.cpp

 Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237454r1=237453r2=237454view=diff

 ==
 --- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)
 +++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15
 11:13:51 2015
 @@ -239,8 +239,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe
  self.runCmd(-file-exec-and-symbols %s % self.myexe)
  self.expect(\^done)

 -# Run to BP_var_list_children
 -line = line_number('main.cpp', '// BP_var_list_children')
 +# Run to BP_var_list_children_test
 +line = line_number('main.cpp', '// BP_var_list_children_test')
  self.runCmd(-break-insert main.cpp:%d % line)
  self.expect(\^done,bkpt={number=\1\)
  self.runCmd(-exec-run)
 @@ -252,6 +252,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe

  
 self.expect(\^done,name=\var_complx\,numchild=\3\,value=\\{\.\.\.\}\,type=\complex_type\,thread-id=\1\,has_more=\0\)
  self.runCmd(-var-create var_complx_array * complx_array)

  
 self.expect(\^done,name=\var_complx_array\,numchild=\2\,value=\\[2\]\,type=\complex_type
 \[2\]\,thread-id=\1\,has_more=\0\)
 +self.runCmd(-var-create var_pcomplx * pcomplx)
 +
 self.expect(\^done,name=\var_pcomplx\,numchild=\2\,value=\\{\.\.\.\}\,type=\pcomplex_type\,thread-id=\1\,has_more=\0\)

  # Test that -var-list-children lists empty children if range is
 empty
  # (and that print-values is optional)
 @@ -268,24 +270,38 @@ class MiVarTestCase(lldbmi_testcase.MiTe

  
 self.expect(\^done,numchild=\3\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,value=\3\,has_more=\0\\},child=\{name=\var_complx\.inner\,exp=\inner\,numchild=\1\,type=\complex_type::\(anonymous
 struct\)\,thread-id=\1\,value=\\{\.\.\.\}\,has_more=\0\\},child=\{name=\var_complx\.complex_ptr\,exp=\complex_ptr\,numchild=\3\,type=\complex_type
 \*\,thread-id=\1\,value=\0x[0-9a-f]+\,has_more=\0\\}\],has_more=\0\)
  self.runCmd(-var-list-children --simple-values
 var_complx_array)

  
 self.expect(\^done,numchild=\2\,children=\[child=\{name=\var_complx_array\.\[0\]\,exp=\\[0\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\},child=\{name=\var_complx_array\.\[1\]\,exp=\\[1\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\0\)
 +self.runCmd(-var-list-children 0 var_pcomplx)
 +
 self.expect(\^done,numchild=\2\,children=\[child=\{name=\var_pcomplx\.complex_type\,exp=\complex_type\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\},child={name=\var_pcomplx\.complx\,exp=\complx\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\0\)

  # Test that -var-list-children lists children without values
  self.runCmd(-var-list-children 0 var_complx 0 1)

  
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
  self.runCmd(-var-list-children --no-values var_complx 0 1)

  
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.i\,exp=\i\,numchild=\0\,type=\int\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
 +self.runCmd(-var-list-children --no-values var_complx_array 0
 1)
 +
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx_array\.\[0\]\,exp=\\[0\]\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)
 +self.runCmd(-var-list-children --no-values var_pcomplx 0 1)
 +
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_pcomplx\.complex_type\,exp=\complex_type\,numchild=\3\,type=\complex_type\,thread-id=\1\,has_more=\0\\}\],has_more=\1\)

  # Test that -var-list-children lists children with all values
  self.runCmd(-var-list-children 1 var_complx 1 2)

  
 self.expect(\^done,numchild=\1\,children=\[child=\{name=\var_complx\.inner\,exp=\inner\,numchild=\1\,type=\complex_type::\(anonymous
 struct\)\,thread-id=\1\,value=\\{\.\.\.\}\,has_more=\0\\}\],has_more=\1\)
  self.runCmd(-var-list-children 

Re: [Lldb-commits] [lldb] r237460 - Add --move-to-nearest-code / target.move-to-nearest-code options

2015-05-15 Thread Vince Harron
Hi Illia,

This appears to have broken both OSX and Linux builders.

http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/2941
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2421

Is it a quick fix?

If not, can you roll back?

Thanks,

Vince

On Fri, May 15, 2015 at 11:16 AM, Ilia K ki.s...@gmail.com wrote:

 Author: ki.stfu
 Date: Fri May 15 13:16:15 2015
 New Revision: 237460

 URL: http://llvm.org/viewvc/llvm-project?rev=237460view=rev
 Log:
 Add --move-to-nearest-code / target.move-to-nearest-code options

 Summary:
 This option forces to only set a source line breakpoint when there is an
 exact-match

 This patch includes the following commits:
 # Add the -m/--exact-match option in breakpoint set command
 ## Add exact_match arg in BreakpointResolverFileLine ctor
 ## Add m_exact_match field in BreakpointResolverFileLine
 ## Add exact_match arg in BreakpointResolverFileRegex ctor
 ## Add m_exact_match field in BreakpointResolverFileRegex
 ## Add exact_match arg in Target::CreateSourceRegexBreakpoint
 ## Add exact_match arg in Target::CreateBreakpoint
 ## Add -m/--exact-match option in breakpoint set command
 # Add target.exact-match option to skip BP if source line doesn't match
 ## Add target.exact-match global option
 ## Add Target::GetExactMatch
 ## Refactor Target::CreateSourceRegexBreakpoint to accept LazyBool
 exact_match (was bool)
 ## Refactor Target::CreateBreakpoint to accept LazyBool exact_match (was
 bool)
 # Add target.exact-match test in SettingsCommandTestCase
 # Add BreakpointOptionsTestCase tests to test
 --skip-prologue/--exact-match options
 # Fix a few typos in lldbutil.check_breakpoint_result func
 # Rename --exact-match/m_exact_match/exact_match/GetExactMatch to
 --move-to-nearest-code/m_move_to_nearest_code/move_to_nearest_code/GetMoveToNearestCode
 # Add exact_match field in BreakpointResolverFileLine::GetDescription and
 BreakpointResolverFileRegex::GetDescription, for example:
 was:
 ```
 1: file =
 '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c',
 line = 12, locations = 1, resolved = 1, hit count = 2
   1.1: where = a.out`main + 20 at main.c:12, address = 0x00010eb4,
 resolved, hit count = 2
 ```
 now:
 ```
 1: file =
 '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c',
 line = 12, exact_match = 0, locations = 1, resolved = 1, hit count = 2
   1.1: where = a.out`main + 20 at main.c:12, address = 0x00010eb4,
 resolved, hit count = 2
 ```

 Test Plan:
 ./dotest.py -v --executable $BUILDDIR/bin/lldb functionalities/breakpoint/
 ./dotest.py -v --executable $BUILDDIR/bin/lldb settings/
 ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/breakpoint/

 Reviewers: jingham, clayborg

 Reviewed By: clayborg

 Subscribers: lldb-commits, clayborg, jingham

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

 Added:
 lldb/trunk/test/functionalities/breakpoint/breakpoint_options/
 lldb/trunk/test/functionalities/breakpoint/breakpoint_options/Makefile

 lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
 lldb/trunk/test/functionalities/breakpoint/breakpoint_options/main.c
 Modified:
 lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h
 lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
 lldb/trunk/include/lldb/Target/Target.h
 lldb/trunk/source/API/SBTarget.cpp
 lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
 lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp
 lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
 lldb/trunk/source/Core/IOHandler.cpp
 lldb/trunk/source/Target/Target.cpp

 lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py

 lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py

 lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
 lldb/trunk/test/lldbutil.py
 lldb/trunk/test/settings/TestSettings.py
 lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py
 lldb/trunk/test/tools/lldb-mi/breakpoint/main.cpp

 Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h?rev=237460r1=237459r2=237460view=diff

 ==
 --- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h
 (original)
 +++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverFileLine.h Fri
 May 15 13:16:15 2015
 @@ -32,7 +32,8 @@ public:
  const FileSpec resolver,
  uint32_t line_no,
  bool check_inlines,
 -bool skip_prologue);
 +bool 

[Lldb-commits] [lldb] r237477 - Don't allow infininte recursion when trying to resolve re-exported symbols.

2015-05-15 Thread Greg Clayton
Author: gclayton
Date: Fri May 15 16:27:16 2015
New Revision: 237477

URL: http://llvm.org/viewvc/llvm-project?rev=237477view=rev
Log:
Don't allow infininte recursion when trying to resolve re-exported symbols.

rdar://problem/20821289


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

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=237477r1=237476r2=237477view=diff
==
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Fri May 15 16:27:16 
2015
@@ -842,6 +842,11 @@ ClangExpressionDeclMap::FindGlobalDataSy
 reexport_module_sp = 
target.GetImages().FindFirstModule(reexport_module_spec);
 }
 }
+// Don't allow us to try and resolve a 
re-exported symbol if it is the same
+// as the current symbol
+if (name == symbol-GetReExportedSymbolName() 
 module == reexport_module_sp.get())
+return NULL;
+
 return FindGlobalDataSymbol(target, 
symbol-GetReExportedSymbolName(), reexport_module_sp.get());
 }
 }


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits