[Lldb-commits] [lldb] r232946 - Fix ObjCDataFormatterTestCase.test_nsdate_* tests

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 07:44:54 2015
New Revision: 232946

URL: http://llvm.org/viewvc/llvm-project?rev=232946view=rev
Log:
Fix ObjCDataFormatterTestCase.test_nsdate_* tests

The time/date strings (like 6pm April 10, 1985) are interpreted as a local 
time but CFDateGetAbsoluteTime() returns time in UTC. It caused a problem when 
local time was UTC+0100 or more (0200, 0300 etc.):
```
==
FAIL: test_nsdate_with_dsym_and_run_command 
(TestDataFormatterObjC.ObjCDataFormatterTestCase)
Test formatters for NSDate.
--
Traceback (most recent call last):
  File /Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py, line 462, in wrapper
return func(self, *args, **kwargs)
  File 
/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py,
 line 157, in test_nsdate_with_dsym_and_run_command
self.appkit_tester_impl(self.buildDsym,self.nsdate_data_formatter_commands)
  File 
/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py,
 line 34, in appkit_tester_impl
commands()
  File 
/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py,
 line 475, in nsdate_data_formatter_commands
substrs = ['1985-04','2011-01'])
  File /Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py, line 2146, in expect
msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : '2011-01' returns expected result
Config=x86_64-clang
==
FAIL: test_nsdate_with_dwarf_and_run_command 
(TestDataFormatterObjC.ObjCDataFormatterTestCase)
Test formatters for NSDate.
--
Traceback (most recent call last):
  File /Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py, line 479, in wrapper
return func(self, *args, **kwargs)
  File 
/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py,
 line 163, in test_nsdate_with_dwarf_and_run_command
self.appkit_tester_impl(self.buildDwarf,self.nsdate_data_formatter_commands)
  File 
/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py,
 line 34, in appkit_tester_impl
commands()
  File 
/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py,
 line 475, in nsdate_data_formatter_commands
substrs = ['1985-04','2011-01'])
  File /Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py, line 2146, in expect
msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : '2011-01' returns expected result
Config=x86_64-clang
```


Modified:
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m?rev=232946r1=232945r2=232946view=diff
==
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m 
(original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m 
Mon Mar 23 07:44:54 2015
@@ -546,8 +546,8 @@ int main (int argc, const char * argv[])
NSURL *nsurl2 = [NSURL URLWithString:@page.html 
relativeToURL:nsurl];
NSURL *nsurl3 = [NSURL URLWithString:@?whatever 
relativeToURL:nsurl2];
 
-   NSDate *date1 = [NSDate dateWithNaturalLanguageString:@6pm 
April 10, 1985];
-   NSDate *date2 = [NSDate dateWithNaturalLanguageString:@12am 
January 1, 2011];
+   NSDate *date1 = [NSDate dateWithNaturalLanguageString:@6pm 
April 10, 1985 UTC];
+   NSDate *date2 = [NSDate dateWithNaturalLanguageString:@12am 
January 1, 2011 UTC];
NSDate *date3 = [NSDate date];
NSDate *date4 = [NSDate dateWithTimeIntervalSince1970:24*60*60];
 


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


Re: [Lldb-commits] [PATCH] Fix Target::Launch in case of synchronous execution

2015-03-23 Thread Pavel Labath
Hi,

what is the exact case this patch is trying to fix? Could you give
steps to reproduce? Or even better, a test case?

cheers,
pl


http://reviews.llvm.org/D8541

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix expression evaluation after clang r232793

2015-03-23 Thread Pavel Labath
abandoning as this is fixed already


http://reviews.llvm.org/D8482

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix Target::Launch in case of synchronous execution

2015-03-23 Thread Ilia K
In http://reviews.llvm.org/D8541#145060, @labath wrote:

 Hi,

 what is the exact case this patch is trying to fix? Could you give
  steps to reproduce? Or even better, a test case?

 cheers,
 pl


Sure. See it in TEST PLAN section.


http://reviews.llvm.org/D8541

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [PATCH] Fix Target::Launch in case of synchronous execution

2015-03-23 Thread Ilia K
Hi jingham, clayborg,

This patch fixes Target::Launch in case of synchronous execution.

http://reviews.llvm.org/D8541

Files:
  source/Target/Target.cpp

Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -2573,41 +2573,58 @@
 
 if (error.Success())
 {
-if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
+if (synchronous_execution || 
launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
 {
+EventSP event_sp;
 ListenerSP hijack_listener_sp (launch_info.GetHijackListener());
 
-StateType state = m_process_sp-WaitForProcessToStop (NULL, NULL, 
false, hijack_listener_sp.get(), NULL);
+StateType state = m_process_sp-WaitForProcessToStop (NULL, 
event_sp, false, hijack_listener_sp.get(), NULL);
 
 if (state == eStateStopped)
 {
-if (!synchronous_execution)
-m_process_sp-RestoreProcessEvents ();
-
-error = m_process_sp-PrivateResume();
-
-if (error.Success())
+if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == 
false)
 {
-// there is a race condition where this thread will return 
up the call stack to the main command
-// handler and show an (lldb) prompt before 
HandlePrivateEvent (from PrivateStateThread) has
-// a chance to call PushProcessIOHandler()
-m_process_sp-SyncIOHandler(2000);
+if (!synchronous_execution)
+m_process_sp-RestoreProcessEvents ();
+
+error = m_process_sp-PrivateResume();
 
-if (synchronous_execution)
+if (error.Success())
 {
-state = m_process_sp-WaitForProcessToStop (NULL, 
NULL, true, hijack_listener_sp.get(), stream);
-const bool must_be_alive = false; // eStateExited is 
ok, so this must be false
-if (!StateIsStoppedState(state, must_be_alive))
+// there is a race condition where this thread will 
return up the call stack to the main command
+// handler and show an (lldb) prompt before 
HandlePrivateEvent (from PrivateStateThread) has
+// a chance to call PushProcessIOHandler()
+m_process_sp-SyncIOHandler(2000);
+
+if (synchronous_execution)
 {
-error.SetErrorStringWithFormat(process isn't 
stopped: %s, StateAsCString(state));
+state = m_process_sp-WaitForProcessToStop (NULL, 
NULL, true, hijack_listener_sp.get(), stream);
+const bool must_be_alive = false; // eStateExited 
is ok, so this must be false
+if (!StateIsStoppedState(state, must_be_alive))
+{
+error.SetErrorStringWithFormat(process isn't 
stopped: %s, StateAsCString(state));
+}
 }
 }
+else
+{
+Error error2;
+error2.SetErrorStringWithFormat(process resume at 
entry point failed: %s, error.AsCString());
+error = error2;
+}
 }
 else
 {
-Error error2;
-error2.SetErrorStringWithFormat(process resume at entry 
point failed: %s, error.AsCString());
-error = error2;
+assert(synchronous_execution  
launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == true);
+
+// Target was stopped at entry as was intended. Need to 
notify the listeners about it.
+m_process_sp-RestoreProcessEvents();
+m_process_sp-HandlePrivateEvent(event_sp);
+
+// there is a race condition where this thread will return 
up the call stack to the main command
+// handler and show an (lldb) prompt before 
HandlePrivateEvent (from PrivateStateThread) has
+// a chance to call PushProcessIOHandler()
+m_process_sp-SyncIOHandler(2000);
 }
 }
 else if (state == eStateExited)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -2573,41 +2573,58 @@
 
 if (error.Success())
 {
-if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == 

Re: [Lldb-commits] [PATCH] AArch64 LLDB Support for aarch64-linux-gnu abi support (SysV)

2015-03-23 Thread Ed Maste
Could you upload the diffs with full context please? (i.e., `git diff -U99` 
or `svn diff --diff-cmd=diff -x -U99`)


http://reviews.llvm.org/D8538

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix Target::Launch in case of synchronous execution

2015-03-23 Thread Pavel Labath
wow, that's quite a test plan. :)
Sorry about that, I didn't see anything in the email, and I did not
know that phab does not send out the test plans O:)

pl


http://reviews.llvm.org/D8541

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [PATCH] AArch64 LLDB Support for aarch64-linux-gnu abi support (SysV)

2015-03-23 Thread Muhammad Omair Javaid
Hi rengolin, vharron, tberghammer,

This patch adds support  aarch64-linux-gnu  (SysV) abi in lldb. Code is similar 
to what has been implemented for MacOS and I have gone through abi 
specification this code will work without any changes though I have not seen 
any improvements in lldb-server remote test results with this patch applied.

http://reviews.llvm.org/D8538

Files:
  cmake/LLDBDependencies.cmake
  lib/Makefile
  source/Plugins/ABI/CMakeLists.txt
  source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
  source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h
  source/Plugins/ABI/SysV-arm64/CMakeLists.txt
  source/Plugins/ABI/SysV-arm64/Makefile
  source/Plugins/Makefile
  source/Plugins/Process/elf-core/ThreadElfCore.cpp
  source/lldb.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: cmake/LLDBDependencies.cmake
===
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -43,6 +43,7 @@
   lldbPluginABIMacOSX_arm
   lldbPluginABIMacOSX_arm64
   lldbPluginABIMacOSX_i386
+  lldbPluginABISysV_arm64
   lldbPluginABISysV_x86_64
   lldbPluginABISysV_hexagon
   lldbPluginABISysV_ppc
Index: lib/Makefile
===
--- lib/Makefile
+++ lib/Makefile
@@ -37,6 +37,7 @@
 	lldbPluginABISysV_ppc.a \
 	lldbPluginABISysV_ppc64.a \
 	lldbPluginABISysV_x86_64.a \
+	lldbPluginABISysV_arm64.a \
 	lldbPluginABISysV_hexagon.a \
 	lldbPluginDisassemblerLLVM.a \
 	lldbPluginDynamicLoaderStatic.a \
Index: source/Plugins/ABI/CMakeLists.txt
===
--- source/Plugins/ABI/CMakeLists.txt
+++ source/Plugins/ABI/CMakeLists.txt
@@ -1,4 +1,5 @@
 add_subdirectory(SysV-hexagon)
+add_subdirectory(SysV-arm64)
 add_subdirectory(SysV-ppc)
 add_subdirectory(SysV-ppc64)
 add_subdirectory(SysV-x86_64)
Index: source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
===
--- source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
+++ source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
@@ -0,0 +1,1103 @@
+//===-- ABISysV_arm64.cpp -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include ABISysV_arm64.h
+
+#include lldb/Core/ConstString.h
+#include lldb/Core/Error.h
+#include lldb/Core/Log.h
+#include lldb/Core/Module.h
+#include lldb/Core/PluginManager.h
+#include lldb/Core/RegisterValue.h
+#include lldb/Core/Scalar.h
+#include lldb/Core/Value.h
+#include lldb/Core/Value.h
+#include lldb/Core/ValueObjectConstResult.h
+#include lldb/Symbol/ClangASTContext.h
+#include lldb/Symbol/UnwindPlan.h
+#include lldb/Target/Process.h
+#include lldb/Target/RegisterContext.h
+#include lldb/Target/Target.h
+#include lldb/Target/Thread.h
+
+#include llvm/ADT/STLExtras.h
+#include llvm/ADT/Triple.h
+
+#include Utility/ARM64_DWARF_Registers.h
+
+#include vector
+
+using namespace lldb;
+using namespace lldb_private;
+
+static const char *pluginDesc = Mac OS X ABI for arm64 targets;
+static const char *pluginShort = abi.macosx-arm64;
+
+
+static RegisterInfo g_register_infos[] = 
+{
+//  NAME   ALT   SZ OFF ENCODING  FORMAT   COMPILER DWARF  GENERIC GDB LLDB NATIVE
+//  == ===   == === = ===  ===  == === === ==
+{   x0,  NULL,  8, 0, eEncodingUint   , eFormatHex   , { LLDB_INVALID_REGNUM, arm64_dwarf::x0,   LLDB_REGNUM_GENERIC_ARG1,   LLDB_INVALID_REGNUM,LLDB_INVALID_REGNUM }, NULL, NULL },
+{   x1,  NULL,  8, 0, eEncodingUint   , eFormatHex   , { LLDB_INVALID_REGNUM, arm64_dwarf::x1,   LLDB_REGNUM_GENERIC_ARG2,   LLDB_INVALID_REGNUM,LLDB_INVALID_REGNUM }, NULL, NULL },
+{   x2,  NULL,  8, 0, eEncodingUint   , eFormatHex   , { LLDB_INVALID_REGNUM, arm64_dwarf::x2,   LLDB_REGNUM_GENERIC_ARG3,   LLDB_INVALID_REGNUM,LLDB_INVALID_REGNUM }, NULL, NULL },
+{   x3,  NULL,  8, 0, eEncodingUint   , eFormatHex   , { LLDB_INVALID_REGNUM, arm64_dwarf::x3,   LLDB_REGNUM_GENERIC_ARG4,   LLDB_INVALID_REGNUM,LLDB_INVALID_REGNUM }, NULL, NULL },
+{   x4,  NULL,  8, 0, eEncodingUint   , eFormatHex   , { LLDB_INVALID_REGNUM, arm64_dwarf::x4,   LLDB_REGNUM_GENERIC_ARG5,   LLDB_INVALID_REGNUM,LLDB_INVALID_REGNUM }, NULL, NULL },
+{   x5,  NULL,  8, 0, eEncodingUint   , eFormatHex   , { LLDB_INVALID_REGNUM, arm64_dwarf::x5,   

[Lldb-commits] [PATCH] LLDB ARM: Add support for arm-linux-gnu abi

2015-03-23 Thread Muhammad Omair Javaid
Hi rengolin, vharron, tberghammer,

This patch is first in a series of upcoming patches that add support for 
arm-linux-lldb. 

This patch will be usable once once support for Register Context will be added 
later this week.

http://reviews.llvm.org/D8539

Files:
  cmake/LLDBDependencies.cmake
  lib/Makefile
  source/Initialization/InitializeLLDB.cpp
  source/Plugins/ABI/CMakeLists.txt
  source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
  source/Plugins/ABI/SysV-arm/ABISysV_arm.h
  source/Plugins/ABI/SysV-arm/CMakeLists.txt
  source/Plugins/ABI/SysV-arm/Makefile
  source/Plugins/Makefile
  source/Plugins/Process/elf-core/ThreadElfCore.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: cmake/LLDBDependencies.cmake
===
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -45,6 +45,7 @@
   lldbPluginABIMacOSX_arm
   lldbPluginABIMacOSX_arm64
   lldbPluginABIMacOSX_i386
+  lldbPluginABISysV_arm
   lldbPluginABISysV_x86_64
   lldbPluginABISysV_hexagon
   lldbPluginABISysV_ppc
Index: lib/Makefile
===
--- lib/Makefile
+++ lib/Makefile
@@ -38,6 +38,7 @@
 	lldbPluginABISysV_ppc.a \
 	lldbPluginABISysV_ppc64.a \
 	lldbPluginABISysV_x86_64.a \
+	lldbPluginABISysV_arm.a \
 	lldbPluginABISysV_hexagon.a \
 	lldbPluginDisassemblerLLVM.a \
 	lldbPluginDynamicLoaderStatic.a \
Index: source/Initialization/InitializeLLDB.cpp
===
--- source/Initialization/InitializeLLDB.cpp
+++ source/Initialization/InitializeLLDB.cpp
@@ -20,6 +20,7 @@
 #include Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
 #include Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h
 #include Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
+#include Plugins/ABI/SysV-x86_64/ABISysV_arm.h
 #include Plugins/ABI/SysV-ppc/ABISysV_ppc.h
 #include Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
 #include Plugins/Disassembler/llvm/DisassemblerLLVMC.h
@@ -190,6 +191,7 @@
 ABISysV_x86_64::Initialize();
 ABISysV_ppc::Initialize();
 ABISysV_ppc64::Initialize();
+ABISysV_arm::Initialize();
 DisassemblerLLVMC::Initialize();
 
 JITLoaderGDB::Initialize();
@@ -299,6 +301,7 @@
 ABISysV_x86_64::Terminate();
 ABISysV_ppc::Terminate();
 ABISysV_ppc64::Terminate();
+ABISysV_arm::Terminate();
 DisassemblerLLVMC::Terminate();
 
 JITLoaderGDB::Terminate();
Index: source/Plugins/ABI/CMakeLists.txt
===
--- source/Plugins/ABI/CMakeLists.txt
+++ source/Plugins/ABI/CMakeLists.txt
@@ -1,4 +1,5 @@
 add_subdirectory(SysV-hexagon)
+add_subdirectory(SysV-arm)
 add_subdirectory(SysV-ppc)
 add_subdirectory(SysV-ppc64)
 add_subdirectory(SysV-x86_64)
Index: source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
===
--- source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
+++ source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
@@ -0,0 +1,866 @@
+//===-- ABISysV_arm.cpp --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include ABISysV_arm.h
+
+#include lldb/Core/ConstString.h
+#include lldb/Core/Error.h
+#include lldb/Core/Module.h
+#include lldb/Core/PluginManager.h
+#include lldb/Core/RegisterValue.h
+#include lldb/Core/Scalar.h
+#include lldb/Core/Value.h
+#include lldb/Core/ValueObjectConstResult.h
+#include lldb/Symbol/ClangASTContext.h
+#include lldb/Symbol/UnwindPlan.h
+#include lldb/Target/Process.h
+#include lldb/Target/RegisterContext.h
+#include lldb/Target/Target.h
+#include lldb/Target/Thread.h
+
+#include llvm/ADT/STLExtras.h
+#include llvm/ADT/Triple.h
+
+#include Utility/ARM_DWARF_Registers.h
+#include Utility/ARM_GCC_Registers.h
+#include Plugins/Process/Utility/ARMDefines.h
+
+#include vector
+
+using namespace lldb;
+using namespace lldb_private;
+
+static RegisterInfo g_register_infos[] =
+{
+//  NAME   ALT   SZ OFF ENCODING FORMAT  COMPILERDWARF   GENERIC GDB LLDB NATIVEVALUE REGSINVALIDATE REGS
+//  == ===   == === ==== === === === == =====
+{   r0,  arg1,4, 0, eEncodingUint, eFormatHex,   { gcc_r0,   dwarf_r0,   LLDB_REGNUM_GENERIC_ARG1,   gdb_arm_r0, LLDB_INVALID_REGNUM },  NULL,  NULL},
+{   r1,  arg2,4, 0, eEncodingUint, eFormatHex,   { gcc_r1,   dwarf_r1,   

Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Ilia K
In http://reviews.llvm.org/D8444#145131, @abidh wrote:

 MI part looks ok to me. Please wait for Greg to approve the rest.


Thanks for review!

@clayborg, take a look please.


http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r232951 - Fix ObjCDataFormatterTestCase.test_nsdate_* tests (ver. 2)

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 09:22:27 2015
New Revision: 232951

URL: http://llvm.org/viewvc/llvm-project?rev=232951view=rev
Log:
Fix ObjCDataFormatterTestCase.test_nsdate_* tests (ver. 2)

This commit reverts r232946 because it caused an another error with absolute 
time.


Modified:

lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py?rev=232951r1=232950r2=232951view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
 Mon Mar 23 09:22:27 2015
@@ -472,7 +472,7 @@ class ObjCDataFormatterTestCase(TestBase
 
 def nsdate_data_formatter_commands(self):
 self.expect('frame variable date1 date2',
-substrs = ['1985-04','2011-01'])
+patterns = 
['(1985-04-10|1985-04-11)','(2011-01-01|2010-12-31)'])
 
 # this test might fail if we hit the breakpoint late on December 31st 
of some given year
 # and midnight comes between hitting the breakpoint and running this 
line of code

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m?rev=232951r1=232950r2=232951view=diff
==
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m 
(original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/main.m 
Mon Mar 23 09:22:27 2015
@@ -546,8 +546,8 @@ int main (int argc, const char * argv[])
NSURL *nsurl2 = [NSURL URLWithString:@page.html 
relativeToURL:nsurl];
NSURL *nsurl3 = [NSURL URLWithString:@?whatever 
relativeToURL:nsurl2];
 
-   NSDate *date1 = [NSDate dateWithNaturalLanguageString:@6pm 
April 10, 1985 UTC];
-   NSDate *date2 = [NSDate dateWithNaturalLanguageString:@12am 
January 1, 2011 UTC];
+   NSDate *date1 = [NSDate dateWithNaturalLanguageString:@6pm 
April 10, 1985];
+   NSDate *date2 = [NSDate dateWithNaturalLanguageString:@12am 
January 1, 2011];
NSDate *date3 = [NSDate date];
NSDate *date4 = [NSDate dateWithTimeIntervalSince1970:24*60*60];
 


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


Re: [Lldb-commits] [PATCH] LLDB ARM: Add support for arm-linux-gnu abi

2015-03-23 Thread Tamas Berghammer
Looks good with a few minor suggestions



Comment at: source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp:224
@@ +223,3 @@
+reg_value.SetUInt32(*ai);
+if 
(!reg_ctx-WriteRegister(reg_ctx-GetRegisterInfoByName(reg_names[i]), 
reg_value))
+return false;

Please use GetRegisterInfo if possible (at other places also)


Comment at: source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp:610
@@ +609,3 @@
+
+uint32_t fp_reg_num = dwarf_r7;   // apple uses r7 for all frames. Normal 
arm uses r11
+uint32_t pc_reg_num = dwarf_pc;

I think we want to use r11 based on the comment. Please check it.


Comment at: source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp:673-674
@@ +672,4 @@
+case '3': return name[2] == '\0'; // r3
+
+break;
+}

I think a default label is missing here (or something else?)


Comment at: source/Plugins/ABI/SysV-arm/ABISysV_arm.h:25-40
@@ +24,18 @@
+
+virtual size_t 
+GetRedZoneSize () const;
+
+virtual bool
+PrepareTrivialCall (lldb_private::Thread thread, 
+lldb::addr_t sp,
+lldb::addr_t func_addr,
+lldb::addr_t returnAddress, 
+llvm::ArrayReflldb::addr_t args) const;
+
+virtual bool
+GetArgumentValues (lldb_private::Thread thread,
+   lldb_private::ValueList values) const;
+
+virtual lldb_private::Error
+SetReturnValueObject(lldb::StackFrameSP frame_sp, lldb::ValueObjectSP 
new_value);
+

Please add override attributes where applicable (for the entry file)

http://reviews.llvm.org/D8539

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] AArch64 LLDB Support for aarch64-linux-gnu abi support (SysV)

2015-03-23 Thread Ed Maste
The comment says 'aarch64-linux-gnu' ABI support -- this should be AArch64 
ABI or AArch64 SysV ABI, no?

You need to handle aarch64 in the other case in `CreateRegisterContextForFrame` 
as well.



Comment at: source/Plugins/Process/elf-core/ThreadElfCore.cpp:129-131
@@ -127,2 +128,5 @@
 break;
+case llvm::Triple::aarch64:
+reg_interface = new RegisterContextLinux_arm64(arch);
+break;
 default:

please put in alpha order

http://reviews.llvm.org/D8538

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix Target::Launch in case of synchronous execution

2015-03-23 Thread Ilia K
In http://reviews.llvm.org/D8541#145077, @labath wrote:

 Sorry about that, I didn't see anything in the email, and I did not
  know that phab does not send out the test plans O:)


It's a surprise for me too :)


http://reviews.llvm.org/D8541

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] AArch64 LLDB Support for aarch64-linux-gnu abi support (SysV)

2015-03-23 Thread Tamas Berghammer
I added a few inline comments but overall it looks good. I think you haven't 
seen any improvement in the test results because this class isn't used by any 
of the tests (not sure who else use this class except ThreadElfCore).

P.S.: Next time please upload the diff with full context to make it easier to 
review.



Comment at: source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp:264-265
@@ +263,4 @@
+// x0 - x7 contain first 8 simple args
+if (args.size()  8) // TODO handle more than 6 arguments
+return false;
+

typo: 6 or 8 arguments are handled?


Comment at: source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp:353-360
@@ +352,10 @@
+{
+case 0: reg_info = 
reg_ctx-GetRegisterInfoByName(x0); break;
+case 1: reg_info = 
reg_ctx-GetRegisterInfoByName(x1); break;
+case 2: reg_info = 
reg_ctx-GetRegisterInfoByName(x2); break;
+case 3: reg_info = 
reg_ctx-GetRegisterInfoByName(x3); break;
+case 4: reg_info = 
reg_ctx-GetRegisterInfoByName(x4); break;
+case 5: reg_info = 
reg_ctx-GetRegisterInfoByName(x5); break;
+case 6: reg_info = 
reg_ctx-GetRegisterInfoByName(x6); break;
+case 7: reg_info = 
reg_ctx-GetRegisterInfoByName(x7); break;
+}

Please use reg_ctx-GetRegisterInfo() if possible (e.g.: based on dwarf 
numbers) as it don't have to iterate over all registers in the regiters contexs


Comment at: source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp:454
@@ +453,3 @@
+{
+const RegisterInfo *x0_info = 
reg_ctx-GetRegisterInfoByName(x0, 0);
+if (byte_size = 8)

Please use reg_ctx-GetRegisterInfo() if possible (same for other cases)


Comment at: source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp:635
@@ +634,3 @@
+{
+// Volatile registers: x0-x18, x30 (lr)
+// Return false for the non-volatile gpr regs, true for everything 
else

Please fix the comment to match with the one in line 666 (I don't know witch 
one is the correct)


Comment at: source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp:667-668
@@ +666,4 @@
+case '3': // x30 aka lr treat as 
non-volatile
+if (name[2] == '0')
+  return false;
+default:

Please add a comment about fall through or prevent it with a return


Comment at: source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h:27-48
@@ +26,24 @@
+
+virtual size_t 
+GetRedZoneSize () const;
+
+virtual bool
+PrepareTrivialCall (lldb_private::Thread thread,
+lldb::addr_t sp,
+lldb::addr_t functionAddress,
+lldb::addr_t returnAddress,
+llvm::ArrayReflldb::addr_t args) const;
+
+virtual bool
+GetArgumentValues (lldb_private::Thread thread,
+   lldb_private::ValueList values) const;
+
+virtual bool
+CreateFunctionEntryUnwindPlan (lldb_private::UnwindPlan unwind_plan);
+
+virtual bool
+CreateDefaultUnwindPlan (lldb_private::UnwindPlan unwind_plan);
+
+virtual bool
+RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
+

Please remove virtual and add override markers where applicable (in the entry 
file)

http://reviews.llvm.org/D8538

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r232950 - Convert CRLF to LF in CODE_OWNERS.txt

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 09:00:54 2015
New Revision: 232950

URL: http://llvm.org/viewvc/llvm-project?rev=232950view=rev
Log:
Convert CRLF to LF in CODE_OWNERS.txt


Modified:
lldb/trunk/CODE_OWNERS.txt

Modified: lldb/trunk/CODE_OWNERS.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CODE_OWNERS.txt?rev=232950r1=232949r2=232950view=diff
==
--- lldb/trunk/CODE_OWNERS.txt (original)
+++ lldb/trunk/CODE_OWNERS.txt Mon Mar 23 09:00:54 2015
@@ -21,19 +21,19 @@ D: Build scripts, Test suite, Platform,
 
 N: Enrico Granata
 E: egran...@apple.com
-D: Data Formatters, Core/Value*, Objective C Language runtime, Test suite, 
Xcode build
+D: Data Formatters, Core/Value*, Objective C Language runtime, Test suite, 
Xcode build
 D: SWIG
 
 N: Jim Ingham
 E: jing...@apple.com
 D: Overall LLDB architecture, Thread plans, Expression parser, ValueObject, 
Breakpoints, ABI
-D: Watchpoints, Trampolines, Target, Command Interpreter, C++ / Objective C 
Language runtime
-
-N: Ilia K
-E: ki.s...@gmail.com
+D: Watchpoints, Trampolines, Target, Command Interpreter, C++ / Objective C 
Language runtime
+
+N: Ilia K
+E: ki.s...@gmail.com
 D: lldb-mi
 
-N: Ed Maste
+N: Ed Maste
 E: ema...@freebsd.org
 D: FreeBSD
 
@@ -48,7 +48,7 @@ D: lldb-mi
 N: Zachary Turner
 E: ztur...@google.com
 D: CMake build, Host (common+windows), Plugins/Process/Windows, Anything 
Windows-specific
-
-N: Oleksiy Vyalov
-E: ovya...@google.com
-D: Linux, Android
+
+N: Oleksiy Vyalov
+E: ovya...@google.com
+D: Linux, Android


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


[Lldb-commits] [PATCH] Fetch module specification from remote process also

2015-03-23 Thread Tamas Berghammer
Hi ovyalov, clayborg,

Fetch module specification from remote process also

Previously the remote module specification was fetched only from the
remote platform. With this CL if we have a remote process then we ask it
if it have any information from a given module. It is required because
on android the dynamic linker only reports the name of the SO file and
the platform can't always find it without a full path (the process can
do it based on /proc/pid/maps).

http://reviews.llvm.org/D8547

Files:
  include/lldb/Host/common/NativeProcessProtocol.h
  include/lldb/Target/Platform.h
  include/lldb/Target/Process.h
  source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
  source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
  source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  source/Plugins/Platform/MacOSX/PlatformDarwin.h
  source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
  source/Plugins/Platform/MacOSX/PlatformMacOSX.h
  source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
  source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
  source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
  source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
  source/Plugins/Platform/Windows/PlatformWindows.cpp
  source/Plugins/Platform/Windows/PlatformWindows.h
  source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
  source/Target/Platform.cpp
  source/Target/Target.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/lldb/Host/common/NativeProcessProtocol.h
===
--- include/lldb/Host/common/NativeProcessProtocol.h
+++ include/lldb/Host/common/NativeProcessProtocol.h
@@ -287,6 +287,9 @@
 virtual void
 Terminate ();
 
+virtual lldb_private::FileSpec
+GetLoadedModuleFileSpec(const std::string module_path) = 0;
+
 protected:
 lldb::pid_t m_pid;
 
Index: include/lldb/Target/Platform.h
===
--- include/lldb/Target/Platform.h
+++ include/lldb/Target/Platform.h
@@ -369,9 +369,10 @@
 LocateExecutableScriptingResources (Target *target,
 Module module,
 Stream* feedback_stream);
-
+
 virtual Error
-GetSharedModule (const ModuleSpec module_spec, 
+GetSharedModule (const ModuleSpec module_spec,
+ Process* process,
  lldb::ModuleSP module_sp,
  const FileSpecList *module_search_paths_ptr,
  lldb::ModuleSP *old_module_sp_ptr,
@@ -1131,6 +1132,7 @@
 
 bool
 GetCachedSharedModule (const ModuleSpec module_spec,
+   Process* process,
lldb::ModuleSP module_sp);
 
 Error
@@ -1141,6 +1143,7 @@
 
 bool
 GetModuleFromLocalCache (const ModuleSpec module_spec,
+ Process* process,
  lldb::ModuleSP module_sp);
 
 FileSpec GetModuleCacheRoot ();
Index: include/lldb/Target/Process.h
===
--- include/lldb/Target/Process.h
+++ include/lldb/Target/Process.h
@@ -2970,7 +2970,6 @@
 ProcessRunLock 
 GetRunLock ();
 
-public:
 virtual Error
 SendEventData(const char *data)
 {
@@ -2984,6 +2983,32 @@
 lldb::InstrumentationRuntimeSP
 GetInstrumentationRuntime(lldb::InstrumentationRuntimeType type);
 
+//--
+/// Try to fetch the module specification for a module with the
+/// given file name and architecture. Process sub-classes have to
+/// override this method if they support platforms where the
+/// Platform object can't get the module spec for all module.
+///
+/// @param[in] module_file_spec
+/// The file name of the module to get specification for.
+///
+/// @param[in] arch
+/// The architecture of the module to get specification for.
+///
+/// @param[out] module_spec
+/// The fetched module specification if the return value is
+/// \b true, unchanged otherwise.
+///
+/// @return
+/// 

[Lldb-commits] [lldb] r232952 - Remove virtual and add override to all virtual functions in Process/gdb-remote.

2015-03-23 Thread Tamas Berghammer
Author: tberghammer
Date: Mon Mar 23 10:50:03 2015
New Revision: 232952

URL: http://llvm.org/viewvc/llvm-project?rev=232952view=rev
Log:
Remove virtual and add override to all virtual functions in Process/gdb-remote.

Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h?rev=232952r1=232951r2=232952view=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h 
(original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h 
Mon Mar 23 10:50:03 2015
@@ -77,7 +77,7 @@ public:
   StringExtractorGDBRemote response);
 
 bool
-GetThreadSuffixSupported ();
+GetThreadSuffixSupported () override;
 
 // This packet is usually sent first and the boolean return value
 // indicates if the packet was send and any response was received

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h?rev=232952r1=232951r2=232952view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
 (original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
 Mon Mar 23 10:50:03 2015
@@ -35,7 +35,7 @@ public:
 virtual
 ~GDBRemoteCommunicationServerCommon();
 
-virtual bool
+bool
 GetThreadSuffixSupported () override
 {
 return true;

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h?rev=232952r1=232951r2=232952view=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h 
(original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h Mon 
Mar 23 10:50:03 2015
@@ -64,41 +64,41 @@ public:
 //--
 // Subclasses must override these functions
 //--
-virtual void
-InvalidateAllRegisters ();
+void
+InvalidateAllRegisters () override;
 
-virtual size_t
-GetRegisterCount ();
+size_t
+GetRegisterCount () override;
 
-virtual const lldb_private::RegisterInfo *
-GetRegisterInfoAtIndex (size_t reg);
+const lldb_private::RegisterInfo *
+GetRegisterInfoAtIndex (size_t reg) override;
 
-virtual size_t
-GetRegisterSetCount ();
+size_t
+GetRegisterSetCount () override;
 
-virtual const lldb_private::RegisterSet *
-GetRegisterSet (size_t reg_set);
+const lldb_private::RegisterSet *
+GetRegisterSet (size_t reg_set) override;
 
-virtual bool
-ReadRegister (const lldb_private::RegisterInfo *reg_info, 
lldb_private::RegisterValue value);
+bool
+ReadRegister (const lldb_private::RegisterInfo *reg_info, 
lldb_private::RegisterValue value) override;
 
-virtual bool
-WriteRegister (const lldb_private::RegisterInfo *reg_info, const 
lldb_private::RegisterValue value);
+bool
+WriteRegister (const lldb_private::RegisterInfo *reg_info, const 
lldb_private::RegisterValue value) override;
 
-virtual bool
-ReadAllRegisterValues (lldb::DataBufferSP data_sp);
+bool
+ReadAllRegisterValues (lldb::DataBufferSP data_sp) override;
 
-virtual bool
-WriteAllRegisterValues (const lldb::DataBufferSP data_sp);
+bool
+WriteAllRegisterValues (const lldb::DataBufferSP data_sp) override;
 
-virtual bool
-ReadAllRegisterValues (lldb_private::RegisterCheckpoint reg_checkpoint);
+bool
+ReadAllRegisterValues (lldb_private::RegisterCheckpoint reg_checkpoint) 
override;
 
-virtual bool
-WriteAllRegisterValues (const lldb_private::RegisterCheckpoint 
reg_checkpoint);
+bool
+WriteAllRegisterValues (const lldb_private::RegisterCheckpoint 
reg_checkpoint) override;
 
-virtual uint32_t
-ConvertRegisterKindToRegisterNumber (lldb::RegisterKind kind, uint32_t 
num);
+uint32_t
+

[Lldb-commits] [lldb] r233017 - Fix/Add comments in CMICmdCmdGdbSet (MI)

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 15:46:10 2015
New Revision: 233017

URL: http://llvm.org/viewvc/llvm-project?rev=233017view=rev
Log:
Fix/Add comments in CMICmdCmdGdbSet (MI)


Modified:
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h

Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp?rev=233017r1=233016r2=233017view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp Mon Mar 23 15:46:10 2015
@@ -1,4 +1,4 @@
-//===-- MICmdCmdGdbSet.cpp ---  -*- C++ 
-*-===//
+//===-- MICmdCmdGdbSet.cpp --*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -79,7 +79,7 @@ CMICmdCmdGdbSet::ParseArgs(void)
 }
 
 //++ 

-// Details: The invoker requires this function. The command does work in this 
function.
+// Details: The invoker requires this function. The command is executed in 
this function.
 //  The command is likely to communicate with the LLDB SBDebugger in 
here.
 // Type:Overridden.
 // Args:None.
@@ -132,7 +132,7 @@ CMICmdCmdGdbSet::Execute(void)
 
 //++ 

 // Details: The invoker requires this function. The command prepares a MI 
Record Result
-//  for the work carried out in the Execute().
+//  for the work carried out in the Execute() method.
 // Type:Overridden.
 // Args:None.
 // Return:  MIstatus::success - Functional succeeded.
@@ -142,6 +142,8 @@ CMICmdCmdGdbSet::Execute(void)
 bool
 CMICmdCmdGdbSet::Acknowledge(void)
 {
+// Print error if option isn't recognized:
+// ^error,msg=The request '%s' was not recognized, not implemented
 if (!m_bGdbOptionRecognised)
 {
 const CMICmnMIValueConst miValueConst(
@@ -152,6 +154,7 @@ CMICmdCmdGdbSet::Acknowledge(void)
 return MIstatus::success;
 }
 
+// ^done,value=%s
 if (m_bGdbOptionFnSuccessful)
 {
 const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, 
CMICmnMIResultRecord::eResultClass_Done);
@@ -159,6 +162,8 @@ CMICmdCmdGdbSet::Acknowledge(void)
 return MIstatus::success;
 }
 
+// Print error if request failed:
+// ^error,msg=The request '%s' failed.
 const CMICmnMIValueConst 
miValueConst(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_FAILED), 
m_strGdbOptionFnError.c_str()));
 const CMICmnMIValueResult miValueResult(msg, miValueConst);
 const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, 
CMICmnMIResultRecord::eResultClass_Error, miValueResult);
@@ -238,8 +243,8 @@ CMICmdCmdGdbSet::OptionFnSolibSearchPath
 }
 
 //++ 

-// Details: Carry out work to complete the GDB set option to prepare and send 
back information
-//  asked for.
+// Details: Carry out work to complete the GDB set option to prepare and send 
back the
+//  requested information.
 // Type:Method.
 // Args:None.
 // Return:  MIstatus::success - Functional succeeded.
@@ -251,8 +256,8 @@ CMICmdCmdGdbSet::OptionFnFallback(const
 {
 MIunused(vrWords);
 
-// Do nothing - intentional. This is a fallback temporary action function 
to do nothing.
-// This allows the search for gdb-set options to always suceed when the 
option is not
+// Do nothing - intentional. This is a fallback function to do nothing.
+// This allows the search for gdb-set options to always succeed when the 
option is not
 // found (implemented).
 
 return MIstatus::success;

Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h?rev=233017r1=233016r2=233017view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h Mon Mar 23 15:46:10 2015
@@ -1,4 +1,4 @@
-//===-- MICmdCmdGdbSet.h -  -*- C++ 
-*-===//
+//===-- MICmdCmdGdbSet.h *- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -9,7 +9,7 @@
 
 // Overview:CMICmdCmdGdbSet interface.
 //
-//  To implement new MI commands derive a new command class from 
the command base
+//  To implement new MI commands, derive a new command class from 
the command base
 //  class. To enable the new command for interpretation add the 
new command class
 //  to the command factory. The files of relevance are:
 

Re: [Lldb-commits] [Diffusion] rL233021: Move ADB communications to AdbClient class - to make it accessible by other…

2015-03-23 Thread Ilia K
It added a new warning.


/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp:41
 ```
[4/13] Building CXX object 
tools/lldb/source/Plugins/Platform/Android/C...iles/lldbPluginPlatformAndroid.dir/PlatformAndroidRemoteGDBServer.cpp.o
../tools/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp:41:83:
 warning: format specifies type 'unsigned long long' but the argument has type 
'size_type' (aka 'unsigned long') [-Wformat]
return Error (Expected a single connected device, got instead % 
PRIu64, connect_devices.size ());
   ~~~  
  ^~~
1 warning generated.
```

USERS
  ovyalov (Author)

http://reviews.llvm.org/rL233021

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Initialize ObjC runtime at the right location.

2015-03-23 Thread Zachary Turner
Why are we putting logic for a specific language runtime in generic code?
This doesn't seem right to me.

On Mon, Mar 23, 2015 at 11:38 AM Greg Clayton clayb...@gmail.com wrote:

 lgtm


 http://reviews.llvm.org/D8558

 EMAIL PREFERENCES
   http://reviews.llvm.org/settings/panel/emailpreferences/



 ___
 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


Re: [Lldb-commits] [PATCH] Initialize ObjC runtime at the right location.

2015-03-23 Thread jingham
I agree with Zachary.  That wasn't what the FIXME was about, and moving more 
runtime specific code into target is not what is desired.  This should go into 
the Runtime, and get called by the dynamic loader.  I don't think this change 
is a change in the right direction.

Jim

 On Mar 23, 2015, at 11:45 AM, Zachary Turner ztur...@google.com wrote:
 
 Why are we putting logic for a specific language runtime in generic code?  
 This doesn't seem right to me.
 
 On Mon, Mar 23, 2015 at 11:38 AM Greg Clayton clayb...@gmail.com wrote:
 lgtm
 
 
 http://reviews.llvm.org/D8558
 
 EMAIL PREFERENCES
   http://reviews.llvm.org/settings/panel/emailpreferences/
 
 
 
 ___
 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


Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Jim Ingham
How do you get a thread that has NO frame 0?  That seems weird, we always have 
a register context to make frame 0...

Anyway, if you're going to do this, add it to the thread == NULL checks 
earlier on in the function so we can get out of the command with an appropriate 
error message. If we don't have a frame 0 we probably don't have registers so 
I'm not really sure how we're going to do any kind of stepping...

Jim


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8554

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Stephane Sezer
This is a patch that I've been keeping in my branches for a while. I
hit a null pointer dereference there. Looks like Ed had the same
issue. I'll move the check to the beginning of the function as you
suggested though.

On Mon, Mar 23, 2015 at 12:01 PM, Jim Ingham jing...@apple.com wrote:
 How do you get a thread that has NO frame 0?  That seems weird, we always 
 have a register context to make frame 0...

 Anyway, if you're going to do this, add it to the thread == NULL checks 
 earlier on in the function so we can get out of the command with an 
 appropriate error message. If we don't have a frame 0 we probably don't have 
 registers so I'm not really sure how we're going to do any kind of stepping...

 Jim


 REPOSITORY
   rL LLVM

 http://reviews.llvm.org/D8554

 EMAIL PREFERENCES
   http://reviews.llvm.org/settings/panel/emailpreferences/



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



-- 
Stephane Sezer

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


Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Ed Maste
I encountered an issue like this early on while bringing up a new target 
(FreeBSD/mips64 I think), while the work was incomplete. Of course once I 
finished we always have frame 0, which is why I didn't commit it at the time.

But it (or, perhaps just an assert) presumably will be handy when someone else 
goes down the same path.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8554

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [PATCH] Fix resolution of certain recursive types.

2015-03-23 Thread Stephane Sezer
Hi clayborg,

If a struct type S has a member T that has a member that is a function that
returns a typedef of S* the respective field would be duplicated, which caused
an assert down the line in RecordLayoutBuilder. This patch adds a check that
removes the possibility of trying to resolve the same type twice within the
same callstack.

Fixes https://llvm.org/bugs/show_bug.cgi?id=20486.

Patch by Cristian Hancila.

http://reviews.llvm.org/D8561

Files:
  include/lldb/Expression/ClangASTSource.h
  source/Expression/ClangASTSource.cpp
  source/Symbol/ClangASTImporter.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/lldb/Expression/ClangASTSource.h
===
--- include/lldb/Expression/ClangASTSource.h
+++ include/lldb/Expression/ClangASTSource.h
@@ -51,6 +51,7 @@
 m_lookups_enabled (false),
 m_target (target),
 m_ast_context (NULL),
+m_active_lexical_decls (),
 m_active_lookups ()
 {
 m_ast_importer = m_target-GetClangASTImporter();
@@ -416,6 +417,7 @@
 const lldb::TargetSPm_target;   /// The target to use in finding variables and types.
 	clang::ASTContext  *m_ast_context;  /// The AST context requests are coming in for.
 ClangASTImporter   *m_ast_importer; /// The target's AST importer.
+std::setconst clang::Decl *   m_active_lexical_decls;
 std::setconst char *  m_active_lookups;
 };
 
Index: source/Expression/ClangASTSource.cpp
===
--- source/Expression/ClangASTSource.cpp
+++ source/Expression/ClangASTSource.cpp
@@ -189,6 +189,11 @@
 dumper.ToLog(log,   [CTD] );
 }
 
+auto iter = m_active_lexical_decls.find(tag_decl);
+if (iter != m_active_lexical_decls.end())
+return;
+m_active_lexical_decls.insert(tag_decl);
+
 if (!m_ast_importer-CompleteTagDecl (tag_decl))
 {
 // We couldn't complete the type.  Maybe there's a definition
@@ -211,7 +216,10 @@
 static_castint(namespace_map-size()));
 
 if (!namespace_map)
+{
+m_active_lexical_decls.erase(tag_decl);
 return;
+}
 
 for (ClangASTImporter::NamespaceMap::iterator i = namespace_map-begin(), e = namespace_map-end();
  i != e  !found;
@@ -302,6 +310,7 @@
 ASTDumper dumper((Decl*)tag_decl);
 dumper.ToLog(log,   [CTD] );
 }
+m_active_lexical_decls.erase(tag_decl);
 }
 
 void
@@ -400,6 +409,11 @@
 if (!context_decl)
 return ELR_Failure;
 
+auto iter = m_active_lexical_decls.find(context_decl);
+if (iter != m_active_lexical_decls.end())
+return ELR_Failure;
+m_active_lexical_decls.insert(context_decl);
+
 static unsigned int invocation_id = 0;
 unsigned int current_id = invocation_id++;
 
@@ -428,7 +442,10 @@
 ASTContext *original_ctx = NULL;
 
 if (!m_ast_importer-ResolveDeclOrigin(context_decl, original_decl, original_ctx))
+{
+m_active_lexical_decls.erase(context_decl);
 return ELR_Failure;
+}
 
 if (log)
 {
@@ -462,7 +479,10 @@
 const DeclContext *original_decl_context = dyn_castDeclContext(original_decl);
 
 if (!original_decl_context)
+{
+m_active_lexical_decls.erase(context_decl);
 return ELR_Failure;
+}
 
 for (TagDecl::decl_iterator iter = original_decl_context-decls_begin();
  iter != original_decl_context-decls_end();
@@ -509,6 +529,7 @@
 }
 }
 
+m_active_lexical_decls.erase(context_decl);
 return ELR_AlreadyLoaded;
 }
 
Index: source/Symbol/ClangASTImporter.cpp
===
--- source/Symbol/ClangASTImporter.cpp
+++ source/Symbol/ClangASTImporter.cpp
@@ -286,7 +286,15 @@
 
 if (const TagType *tag_type = type-getAsTagType())
 {
-return CompleteTagDecl(tag_type-getDecl());
+auto tag_decl = tag_type-getDecl();
+if (tag_decl-getDefinition() || tag_decl-isBeingDefined())
+{
+return true;
+}
+tag_decl-startDefinition();
+bool result = CompleteTagDecl(tag_decl);
+tag_decl-setCompleteDefinition(true);
+return result;
 }
 if (const ObjCObjectType *objc_object_type = type-getAsObjCObjectType())
 {
___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] Fix resolution of certain recursive types.

2015-03-23 Thread Stephane Sezer
I'd like to add some unit tests for this patch but I don't know how to create 
one that has two separate source files (which is required to repro this bug). 
Does the unit test framework support that?


http://reviews.llvm.org/D8561

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread jingham
How do you get a thread that has NO frame 0?  That seems weird, we always have 
a register context to make frame 0...

Anyway, if you're going to do this, add it to the thread == NULL checks 
earlier on in the function so we can get out of the command with an appropriate 
error message. If we don't have a frame 0 we probably don't have registers so 
I'm not really sure how we're going to do any kind of stepping...

Jim

 On Mar 23, 2015, at 11:17 AM, Stephane Sezer s...@cd80.net wrote:
 
 REPOSITORY
  rL LLVM
 
 http://reviews.llvm.org/D8554
 
 Files:
  lldb/trunk/source/Commands/CommandObjectThread.cpp
 
 Index: lldb/trunk/source/Commands/CommandObjectThread.cpp
 ===
 --- lldb/trunk/source/Commands/CommandObjectThread.cpp
 +++ lldb/trunk/source/Commands/CommandObjectThread.cpp
 @@ -581,7 +581,7 @@
 {
 StackFrame *frame = thread-GetStackFrameAtIndex(0).get();
 
 -if (frame-HasDebugInformation ())
 +if (frame  frame-HasDebugInformation ())
 {
 new_plan_sp = thread-QueueThreadPlanForStepInRange 
 (abort_other_plans,
 
 frame-GetSymbolContext(eSymbolContextEverything).line_entry.range,
 
 EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
 D8554.22493.patch___
 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


Re: [Lldb-commits] [PATCH] Handle PyLong return values in LLDBSwigPython_CalculateNumChildren.

2015-03-23 Thread Vince Harron

Comment at: 
test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile:12
@@ +11,3 @@
+ifneq (,$(findstring clang,$(CC)))
+  CFLAGS_EXTRAS += -fstandalone-debug
+endif

I think you'll need to replace this with the equivalent -fno-limit-debug-info, 
which is also understood by clang-3.4 on the debian builder.

http://reviews.llvm.org/D8337

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Handle PyLong return values in LLDBSwigPython_CalculateNumChildren.

2015-03-23 Thread Vince Harron

Comment at: 
test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile:9
@@ +8,3 @@
+# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
+# # targets.  Other targets do not, which causes this test to fail.
+# # This flag enables FullDebugInfo for all targets.

You might want to remove the extra #s while you're in there.

http://reviews.llvm.org/D8337

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fetch module specification from remote process also

2015-03-23 Thread Greg Clayton
Its mainly an efficiency thing. If you have a std::string you might need to 
allocate data on the heap to store the string just to make the call. Since this 
argument is a path, it is more likely to have to allocate on the heap. Most 
std::string implementations store the first 20 some bytes in the std::string 
itself, but if it goes over, it will need to malloc a buffer for the string and 
make a copy. Most path arguments in the standard libraries and in functions 
already take const char * for paths, so it is just keeping the argument in 
the currency that most people want is good. I also don't like llvm::StringRef 
for the path because if you want to guarantee NULL terminate you will need to 
call my_str.str().c_str() which makes a temp std::string using the length, so I 
do think const char * is the best for the API.


http://reviews.llvm.org/D8547

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix resolution of certain recursive types.

2015-03-23 Thread Greg Clayton
See inline comments.

You can easily make a test case with two files, there are many that do it.



Comment at: source/Symbol/ClangASTImporter.cpp:289-296
@@ -288,2 +288,10 @@
 {
-return CompleteTagDecl(tag_type-getDecl());
+auto tag_decl = tag_type-getDecl();
+if (tag_decl-getDefinition() || tag_decl-isBeingDefined())
+{
+return true;
+}
+tag_decl-startDefinition();
+bool result = CompleteTagDecl(tag_decl);
+tag_decl-setCompleteDefinition(true);
+return result;

Do we always want to set this to true? If we really just have a forward 
declaration in the DWARF result might be false. If we set this to true, it 
means anytime we have a forward declaration to a class, we might start and 
complete the class definition and say that is is a complete class that contains 
nothing. Then in another ClangASTContext we might have a full definition of the 
type, then we try to import both types into an expression ClangASTContext and 
it will fail saying there are two definitions. You should add any needed smarts 
to ComplateTagDecl() and not do anything inline like this.

http://reviews.llvm.org/D8561

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r233021 - Move ADB communications to AdbClient class - to make it accessible by other components.

2015-03-23 Thread Oleksiy Vyalov
Author: ovyalov
Date: Mon Mar 23 16:03:02 2015
New Revision: 233021

URL: http://llvm.org/viewvc/llvm-project?rev=233021view=rev
Log:
Move ADB communications to AdbClient class - to make it accessible by other 
components.

http://reviews.llvm.org/D8535

Added:
lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
lldb/trunk/source/Plugins/Platform/Android/AdbClient.h
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Plugins/Platform/Android/CMakeLists.txt

lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=233021r1=233020r2=233021view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Mar 23 16:03:02 2015
@@ -100,6 +100,8 @@
254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */; 
};
257E47171AA56C2000A62F81 /* ModuleCache.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 257E47151AA56C2000A62F81 /* ModuleCache.cpp */; 
};
257E47181AA56C2000A62F81 /* ModuleCache.h in Headers */ = {isa 
= PBXBuildFile; fileRef = 257E47161AA56C2000A62F81 /* ModuleCache.h */; };
+   25EF23781AC09B3700908DF0 /* AdbClient.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 25EF23751AC09AD800908DF0 /* AdbClient.cpp */; };
+   25EF23791AC09B4200908DF0 /* AdbClient.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 25EF23761AC09AD800908DF0 /* AdbClient.h */; };
260157C61885F51C00F875CF /* libpanel.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
260157C81885F53100F875CF /* libpanel.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
2606EDDF184E68A10034641B /* liblldb-core.a in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; };
@@ -1221,6 +1223,8 @@
254FBBA61A91672800BD6378 /* SBAttachInfo.i */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = 
SBAttachInfo.i; sourceTree = group; };
257E47151AA56C2000A62F81 /* ModuleCache.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = ModuleCache.cpp; path = source/Utility/ModuleCache.cpp; sourceTree = 
group; };
257E47161AA56C2000A62F81 /* ModuleCache.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
ModuleCache.h; path = source/Utility/ModuleCache.h; sourceTree = group; };
+   25EF23751AC09AD800908DF0 /* AdbClient.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = AdbClient.cpp; sourceTree = group; };
+   25EF23761AC09AD800908DF0 /* AdbClient.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
AdbClient.h; sourceTree = group; };
260157C41885F4FF00F875CF /* libpanel.dylib */ = {isa = 
PBXFileReference; lastKnownFileType = compiled.mach-o.dylib; name = 
libpanel.dylib; path = /usr/lib/libpanel.dylib; sourceTree = absolute; };
260223E7115F06D500A601A2 /* SBCommunication.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
SBCommunication.h; path = include/lldb/API/SBCommunication.h; sourceTree = 
group; };
260223E8115F06E500A601A2 /* SBCommunication.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = SBCommunication.cpp; path = source/API/SBCommunication.cpp; sourceTree = 
group; };
@@ -4971,6 +4975,8 @@
6D55BAE61A8CD08C00A70529 /* Android */ = {
isa = PBXGroup;
children = (
+   25EF23751AC09AD800908DF0 /* AdbClient.cpp */,
+   25EF23761AC09AD800908DF0 /* AdbClient.h */,
6D55BAE91A8CD08C00A70529 /* PlatformAndroid.cpp 
*/,
6D55BAEA1A8CD08C00A70529 /* PlatformAndroid.h 
*/,
6D55BAEB1A8CD08C00A70529 /* 
PlatformAndroidRemoteGDBServer.cpp */,
@@ -5306,6 +5312,7 @@
26CFDCA11861638D000E63E5 /* Editline.h in 
Headers */,
26BC17B018C7F4CB00D2196D /* 
RegisterContextPOSIXCore_x86_64.h in Headers */,
6D55BAF01A8CD0BD00A70529 /* 
PlatformAndroidRemoteGDBServer.h in Headers */,
+   25EF23791AC09B4200908DF0 /* AdbClient.h in 
Headers */,
 

[Lldb-commits] [PATCH] Add -gdb-show and target-async option in -gdb-show command (MI)

2015-03-23 Thread Ilia K
Hi abidh, clayborg,

This path adds -gdb-show command with 1 option: target-async.

Also it adds tests for -gdb-set and -gdb-show commands.

All tests pass on OS X.

http://reviews.llvm.org/D8566

Files:
  test/tools/lldb-mi/TestMiGdbSetShow.py
  tools/lldb-mi/CMakeLists.txt
  tools/lldb-mi/MICmdCmdGdbShow.cpp
  tools/lldb-mi/MICmdCmdGdbShow.h
  tools/lldb-mi/MICmdCommands.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: test/tools/lldb-mi/TestMiGdbSetShow.py
===
--- /dev/null
+++ test/tools/lldb-mi/TestMiGdbSetShow.py
@@ -0,0 +1,121 @@
+
+Test lldb-mi -gdb-set and -gdb-show commands.
+
+
+import lldbmi_testcase
+from lldbtest import *
+import unittest2
+
+class MiGdbSetShowTestCase(lldbmi_testcase.MiTestCaseBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@lldbmi_test
+@expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for windows)
+def test_lldbmi_gdb_set_target_async_default(self):
+Test that 'lldb-mi --interpreter' switches to async mode by default.
+
+self.spawnLldbMi(args = None)
+
+# Switch to sync mode
+self.runCmd(-gdb-set target-async off)
+self.expect(\^done)
+self.runCmd(-gdb-show target-async)
+self.expect(\^done,value=\off\)
+
+# Test that -gdb-set switches to async by default
+self.runCmd(-gdb-set target-async)
+self.expect(\^done)
+self.runCmd(-gdb-show target-async)
+self.expect(\^done,value=\on\)
+
+@lldbmi_test
+@expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for windows)
+def test_lldbmi_gdb_set_target_async_on(self):
+Test that 'lldb-mi --interpreter' can execute commands in async mode.
+
+self.spawnLldbMi(args = None)
+
+# Switch to sync mode
+self.runCmd(-gdb-set target-async off)
+self.expect(\^done)
+self.runCmd(-gdb-show target-async)
+self.expect(\^done,value=\off\)
+
+# Test that -gdb-set can switch to async mode
+self.runCmd(-gdb-set target-async on)
+self.expect(\^done)
+self.runCmd(-gdb-show target-async)
+self.expect(\^done,value=\on\)
+
+# Load executable
+self.runCmd(-file-exec-and-symbols %s % self.myexe)
+self.expect(\^done)
+
+# Test that program is executed in async mode
+self.runCmd(-exec-run)
+self.expect(\*running)
+self.expect(~\argc=1)
+
+@lldbmi_test
+@expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for windows)
+def test_lldbmi_gdb_set_target_async_off(self):
+Test that 'lldb-mi --interpreter' can execute commands in sync mode.
+
+self.spawnLldbMi(args = None)
+
+# Test that -gdb-set can switch to sync mode
+self.runCmd(-gdb-set target-async off)
+self.expect(\^done)
+self.runCmd(-gdb-show target-async)
+self.expect(\^done,value=\off\)
+
+# Load executable
+self.runCmd(-file-exec-and-symbols %s % self.myexe)
+self.expect(\^done)
+
+# Test that program is executed in async mode
+self.runCmd(-exec-run)
+unexpected = [ \*running ] # \*running is async notification
+it = self.expect(unexpected + [ ~\argc=1rn ])
+if it  len(unexpected):
+# generate error if it's not ~\argc=1rn
+self.expect($UNEXPECTED FOUND: %s.^ % unexpected[it], timeout = 0)
+
+@lldbmi_test
+@expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for windows)
+def test_lldbmi_gdb_show_target_async(self):
+Test that 'lldb-mi --interpreter' in async mode by default.
+
+self.spawnLldbMi(args = None)
+
+# Test that default target-async value is on
+self.runCmd(-gdb-show target-async)
+self.expect(\^done,value=\on\)
+
+@lldbmi_test
+@expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for windows)
+@unittest2.expectedFailure(-gdb-set ignores unknown properties)
+def test_lldbmi_gdb_set_unknown(self):
+Test that 'lldb-mi --interpreter' fails when setting an unknown property.
+
+self.spawnLldbMi(args = None)
+
+# Test that -gdb-set fails if property is unknown
+self.runCmd(-gdb-set unknown some_value)
+self.expect(\^error)
+
+@lldbmi_test
+@expectedFailureWindows(llvm.org/pr22274: need a pexpect replacement for windows)
+@unittest2.expectedFailure(-gdb-show ignores unknown properties)
+def test_lldbmi_gdb_show_unknown(self):
+Test that 'lldb-mi --interpreter' fails when showing an unknown property.
+
+self.spawnLldbMi(args = None)
+
+# Test that -gdb-show fails if property is unknown
+self.runCmd(-gdb-show unknown)
+self.expect(\^error)
+
+if __name__ == '__main__':
+unittest2.main()
Index: 

[Lldb-commits] [lldb] r233022 - Fix Target::Launch in case of synchronous execution

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 16:16:25 2015
New Revision: 233022

URL: http://llvm.org/viewvc/llvm-project?rev=233022view=rev
Log:
Fix Target::Launch in case of synchronous execution

Summary: This patch fixes Target::Launch in case of synchronous execution.

Test Plan:
# Create file with source commands:
```
$ cat start_script
target create ~/p/hello
process launch -s
continue
```

# Run lldb and execute command source -c 0 -s 0 start_script:
```
$ bin/lldb
(lldb) command source -c 0 -s 0 start_script
Executing commands in '/Users/IliaK/p/llvm/build_ninja/start_script'.
(lldb) target create ~/p/hello
Current executable set to '~/p/hello' (x86_64).
(lldb) process launch -s
Process 92028 stopped
* thread #1: tid = 0x26731, 0x7fff5fc01000 dyld`_dyld_start, stop reason = 
signal SIGSTOP
frame #0: 0x7fff5fc01000 dyld`_dyld_start
dyld`_dyld_start:
-  0x7fff5fc01000 +0: popq   %rdi
0x7fff5fc01001 +1: pushq  $0x0
0x7fff5fc01003 +3: movq   %rsp, %rbp
0x7fff5fc01006 +6: andq   $-0x10, %rsp
(lldb) Process 92028 launched: '/Users/IliaK/p/hello' (x86_64)
(lldb) continue
'
` - it's \ni=1
j=2
x=3
y=4
argc: /Users/IliaK/p/hello
argc: (null)
Process 92028 resuming
Process 92028 exited with status = 0 (0x)

(lldb)
```

was:
```
$ bin/lldb
(lldb) command source -c 0 -s 0 start_script
Executing commands in '/Users/IliaK/p/llvm/build_ninja/start_script'.
(lldb) target create ~/p/hello
Current executable set to '~/p/hello' (x86_64).
(lldb) process launch -s
Process 92100 launched: '/Users/IliaK/p/hello' (x86_64)
(lldb) continue
error: Process must be launched.
Process 92100 stopped
* thread #1: tid = 0x2699a, 0x7fff5fc01000 dyld`_dyld_start, stop reason = 
signal SIGSTOP
frame #0: 0x7fff5fc01000 dyld`_dyld_start
dyld`_dyld_start:
-  0x7fff5fc01000 +0: popq   %rdi
0x7fff5fc01001 +1: pushq  $0x0
0x7fff5fc01003 +3: movq   %rsp, %rbp
0x7fff5fc01006 +6: andq   $-0x10, %rsp
(lldb)
```

Reviewers: jingham, clayborg

Reviewed By: clayborg

Subscribers: labath, lldb-commits, clayborg, jingham

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

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

Modified: lldb/trunk/source/Target/Target.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=233022r1=233021r2=233022view=diff
==
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon Mar 23 16:16:25 2015
@@ -2591,41 +2591,58 @@ Target::Launch (ProcessLaunchInfo launc
 
 if (error.Success())
 {
-if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
+if (synchronous_execution || 
launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
 {
+EventSP event_sp;
 ListenerSP hijack_listener_sp (launch_info.GetHijackListener());
 
-StateType state = m_process_sp-WaitForProcessToStop (NULL, NULL, 
false, hijack_listener_sp.get(), NULL);
+StateType state = m_process_sp-WaitForProcessToStop (NULL, 
event_sp, false, hijack_listener_sp.get(), NULL);
 
 if (state == eStateStopped)
 {
-if (!synchronous_execution)
-m_process_sp-RestoreProcessEvents ();
-
-error = m_process_sp-PrivateResume();
-
-if (error.Success())
+if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == 
false)
 {
-// there is a race condition where this thread will return 
up the call stack to the main command
-// handler and show an (lldb) prompt before 
HandlePrivateEvent (from PrivateStateThread) has
-// a chance to call PushProcessIOHandler()
-m_process_sp-SyncIOHandler(2000);
+if (!synchronous_execution)
+m_process_sp-RestoreProcessEvents ();
 
-if (synchronous_execution)
+error = m_process_sp-PrivateResume();
+
+if (error.Success())
 {
-state = m_process_sp-WaitForProcessToStop (NULL, 
NULL, true, hijack_listener_sp.get(), stream);
-const bool must_be_alive = false; // eStateExited is 
ok, so this must be false
-if (!StateIsStoppedState(state, must_be_alive))
+// there is a race condition where this thread will 
return up the call stack to the main command
+// handler and show an (lldb) prompt before 
HandlePrivateEvent (from PrivateStateThread) has
+// a chance to call PushProcessIOHandler()
+m_process_sp-SyncIOHandler(2000);
+
+if (synchronous_execution)
 {
-error.SetErrorStringWithFormat(process isn't 

Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Greg Clayton
No, don't change any existing API. Unfortunately by the time we caught this 
one, it was out in the wild and we had programs linking against it. Just make 
sure to not add const to any new API.


http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r233018 - Add target-async option in -gdb-set command (MI)

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 15:49:51 2015
New Revision: 233018

URL: http://llvm.org/viewvc/llvm-project?rev=233018view=rev
Log:
Add target-async option in -gdb-set command (MI)


Modified:
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
lldb/trunk/tools/lldb-mi/MICmnResources.cpp
lldb/trunk/tools/lldb-mi/MICmnResources.h

Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp?rev=233018r1=233017r2=233018view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp Mon Mar 23 15:49:51 2015
@@ -20,7 +20,7 @@
 
 // Instantiations:
 const CMICmdCmdGdbSet::MapGdbOptionNameToFnGdbOptionPtr_t 
CMICmdCmdGdbSet::ms_mapGdbOptionNameToFnGdbOptionPtr = {
-// { target-async, CMICmdCmdGdbSet::OptionFnTargetAsync },   // 
Example code if need to implement GDB set other options
+{target-async, CMICmdCmdGdbSet::OptionFnTargetAsync},
 // { auto-solib-add, CMICmdCmdGdbSet::OptionFnAutoSolibAdd },// 
Example code if need to implement GDB set other options
 {solib-search-path, CMICmdCmdGdbSet::OptionFnSolibSearchPath},
 {fallback, CMICmdCmdGdbSet::OptionFnFallback}};
@@ -210,6 +210,50 @@ CMICmdCmdGdbSet::GetOptionFn(const CMIUt
 }
 
 //++ 

+// Details: Carry out work to complete the GDB set option 'target-async' to 
prepare
+//  and send back information asked for.
+// Type:Method.
+// Args:vrWords - (R) List of additional parameters used by this option.
+// Return:  MIstatus::success - Function succeeded.
+//  MIstatus::failure - Function failed.
+// Throws:  None.
+//--
+bool
+CMICmdCmdGdbSet::OptionFnTargetAsync(const CMIUtilString::VecString_t vrWords)
+{
+bool bAsyncMode;
+bool bOk = true;
+
+if (vrWords.size()  1)
+// Too many arguments.
+bOk = false;
+else if (vrWords.size() == 0)
+// If no arguments, default is on.
+bAsyncMode = true;
+else if (CMIUtilString::Compare(vrWords[0], on))
+bAsyncMode = true;
+else if (CMIUtilString::Compare(vrWords[0], off))
+bAsyncMode = false;
+else
+// Unrecognized argument.
+bOk = false;
+
+if (!bOk)
+{
+// Report error.
+m_bGbbOptionFnHasError = true;
+m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSET_OPT_TARGETASYNC);
+return MIstatus::failure;
+}
+
+// Turn async mode on/off.
+CMICmnLLDBDebugSessionInfo 
rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
+rSessionInfo.GetDebugger().SetAsync(bAsyncMode);
+
+return MIstatus::success;
+}
+
+//++ 

 // Details: Carry out work to complete the GDB set option 'solib-search-path' 
to prepare
 //  and send back information asked for.
 // Type:Method.

Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h?rev=233018r1=233017r2=233018view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h Mon Mar 23 15:49:51 2015
@@ -69,6 +69,7 @@ class CMICmdCmdGdbSet : public CMICmdBas
 // Methods:
   private:
 bool GetOptionFn(const CMIUtilString vrGdbOptionName, FnGdbOptionPtr 
vrwpFn) const;
+bool OptionFnTargetAsync(const CMIUtilString::VecString_t vrWords);
 bool OptionFnSolibSearchPath(const CMIUtilString::VecString_t vrWords);
 bool OptionFnFallback(const CMIUtilString::VecString_t vrWords);
 

Modified: lldb/trunk/tools/lldb-mi/MICmnResources.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnResources.cpp?rev=233018r1=233017r2=233018view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmnResources.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnResources.cpp Mon Mar 23 15:49:51 2015
@@ -243,6 +243,7 @@ const CMICmnResources::SRsrcTextData CMI
 {IDS_CMD_ERR_SET_NEW_DRIVER_STATE, Command '%s'. Command tried to set new 
MI Driver running state and failed. %s},
 {IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND, The request '%s' was not recogised, 
not implemented},
 {IDS_CMD_ERR_INFO_PRINTFN_FAILED, The request '%s' failed.},
+{IDS_CMD_ERR_GDBSET_OPT_TARGETASYNC, 'target-async' expects \on\ or 
\off\},
 {IDS_CMD_ERR_GDBSET_OPT_SOLIBSEARCHPATH, 'solib-search-path' requires at 
least one argument}};
 
 //++ 


Modified: lldb/trunk/tools/lldb-mi/MICmnResources.h
URL: 

Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Ilia K
In http://reviews.llvm.org/D8444#145654, @clayborg wrote:

 No, don't change any existing API. Unfortunately by the time we caught this 
 one, it was out in the wild and we had programs linking against it. Just make 
 sure to not add const to any new API.


ok.


http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Ilia K

Comment at: include/lldb/API/SBCommandInterpreter.h:27-67
@@ -26,43 +26,43 @@
 
 bool
 GetStopOnContinue () const;
 
 void
 SetStopOnContinue (bool);
 
 bool
 GetStopOnError () const;
 
 void
 SetStopOnError (bool);
 
 bool
 GetStopOnCrash () const;
 
 void
 SetStopOnCrash (bool);
 
 bool
 GetEchoCommands () const;
 
 void
 SetEchoCommands (bool);
 
 bool
 GetPrintResults () const;
 
 void
 SetPrintResults (bool);
 
 bool
 GetAddToHistory () const;
 
 void
 SetAddToHistory (bool);
 private:
 lldb_private::CommandInterpreterRunOptions *
 get () const;
 
 lldb_private::CommandInterpreterRunOptions 
 ref () const;
 

or here?


Comment at: include/lldb/API/SBCommandInterpreter.h:101-102
@@ -100,4 +100,4 @@
 
 bool
 IsValid() const;
 

or here?

http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Search for loaded modules recursively in all system library sub-directories on Android

2015-03-23 Thread Tamas Berghammer
Please abandon it as http://reviews.llvm.org/D8547 will fix this issue


http://reviews.llvm.org/D8338

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix resolution of certain recursive types.

2015-03-23 Thread Sean Callanan
Stéphane,

please add me as a reviewer for this patch.  I have an account, spyffe.

Sean

 On Mar 23, 2015, at 12:48 PM, Stephane Sezer s...@cd80.net wrote:
 
 I'd like to add some unit tests for this patch but I don't know how to create 
 one that has two separate source files (which is required to repro this bug). 
 Does the unit test framework support that?
 
 
 http://reviews.llvm.org/D8561
 
 EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
 
 
 
 ___
 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


Re: [Lldb-commits] [PATCH] Fix resolution of certain recursive types.

2015-03-23 Thread Sean Callanan
Stéphane,

please add me as a reviewer for this patch.  I have an account, spyffe.

Sean


http://reviews.llvm.org/D8561

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Ilia K
Add GetPromptOnQuit/SetPromptOnQuit to SBCommandInterpreter.i


http://reviews.llvm.org/D8444

Files:
  include/lldb/API/SBCommandInterpreter.h
  include/lldb/Interpreter/CommandInterpreter.h
  scripts/Python/interface/SBCommandInterpreter.i
  source/API/SBCommandInterpreter.cpp
  source/Interpreter/CommandInterpreter.cpp
  tools/lldb-mi/MICmnLLDBDebugger.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/lldb/API/SBCommandInterpreter.h
===
--- include/lldb/API/SBCommandInterpreter.h
+++ include/lldb/API/SBCommandInterpreter.h
@@ -219,6 +219,12 @@
 const char *
 GetIOHandlerControlSequence(char ch);
 
+bool
+GetPromptOnQuit() const;
+
+void
+SetPromptOnQuit(bool b);
+
 protected:
 
 lldb_private::CommandInterpreter 
Index: include/lldb/Interpreter/CommandInterpreter.h
===
--- include/lldb/Interpreter/CommandInterpreter.h
+++ include/lldb/Interpreter/CommandInterpreter.h
@@ -625,6 +625,9 @@
 bool
 GetPromptOnQuit () const;
 
+void
+SetPromptOnQuit (bool b);
+
 bool
 GetStopCmdSourceOnError () const;
 
Index: scripts/Python/interface/SBCommandInterpreter.i
===
--- scripts/Python/interface/SBCommandInterpreter.i
+++ scripts/Python/interface/SBCommandInterpreter.i
@@ -147,6 +147,12 @@
 GetIOHandlerControlSequence(char ch);
 
 bool
+GetPromptOnQuit() const;
+
+void
+SetPromptOnQuit(bool b);
+
+bool
 CommandExists (const char *cmd);
 
 bool
Index: source/API/SBCommandInterpreter.cpp
===
--- source/API/SBCommandInterpreter.cpp
+++ source/API/SBCommandInterpreter.cpp
@@ -447,6 +447,21 @@
 return sb_debugger;
 }
 
+bool
+SBCommandInterpreter::GetPromptOnQuit() const
+{
+if (m_opaque_ptr)
+return m_opaque_ptr-GetPromptOnQuit();
+return false;
+}
+
+void
+SBCommandInterpreter::SetPromptOnQuit (bool b)
+{
+if (m_opaque_ptr)
+m_opaque_ptr-SetPromptOnQuit(b);
+}
+
 CommandInterpreter *
 SBCommandInterpreter::get ()
 {
@@ -850,4 +865,3 @@
 return lldb::SBCommand(new_command_sp);
 return lldb::SBCommand();
 }
-
Index: source/Interpreter/CommandInterpreter.cpp
===
--- source/Interpreter/CommandInterpreter.cpp
+++ source/Interpreter/CommandInterpreter.cpp
@@ -149,6 +149,13 @@
 return m_collection_sp-GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0);
 }
 
+void
+CommandInterpreter::SetPromptOnQuit (bool b)
+{
+const uint32_t idx = ePropertyPromptOnQuit;
+m_collection_sp-SetPropertyAtIndexAsBoolean (nullptr, idx, b);
+}
+
 bool
 CommandInterpreter::GetStopCmdSourceOnError () const
 {
Index: tools/lldb-mi/MICmnLLDBDebugger.cpp
===
--- tools/lldb-mi/MICmnLLDBDebugger.cpp
+++ tools/lldb-mi/MICmnLLDBDebugger.cpp
@@ -233,11 +233,15 @@
 CMICmnLLDBDebugger::InitSBDebugger(void)
 {
 m_lldbDebugger = lldb::SBDebugger::Create(false);
-if (m_lldbDebugger.IsValid())
-return MIstatus::success;
+if (!m_lldbDebugger.IsValid())
+{
+SetErrorDescription(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDDEBUGGER));
+return MIstatus::failure;
+}
 
-SetErrorDescription(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDDEBUGGER));
-return MIstatus::failure;
+m_lldbDebugger.GetCommandInterpreter().SetPromptOnQuit(false);
+
+return MIstatus::success;
 }
 
 //++ 
___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r233029 - Fix missing interfaces to scripts/Python/interface after r229110, r231858 and r232891

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 16:50:21 2015
New Revision: 233029

URL: http://llvm.org/viewvc/llvm-project?rev=233029view=rev
Log:
Fix missing interfaces to scripts/Python/interface after r229110, r231858 and 
r232891

This includes:
# SBCommandInterpreter::EventIsCommandInterpreterEvent
# SBModule::GetSymbolFileSpec/GetObjectFileHeaderAddress
# 
SBTarget::EventIsTargetEvent/GetTargetFromEvent/GetNumModulesFromEvent/GetModuleAtIndexFromEvent/GetLaunchInfo/SetLaunchInfo


Modified:
lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i
lldb/trunk/scripts/Python/interface/SBModule.i
lldb/trunk/scripts/Python/interface/SBTarget.i

Modified: lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i?rev=233029r1=233028r2=233029view=diff
==
--- lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i (original)
+++ lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i Mon Mar 23 
16:50:21 2015
@@ -139,7 +139,10 @@ public:
 
 static const char *
 GetArgumentDescriptionAsCString (const lldb::CommandArgumentType arg_type);
-
+
+static bool
+EventIsCommandInterpreterEvent (const lldb::SBEvent event);
+
 bool
 IsValid() const;
 

Modified: lldb/trunk/scripts/Python/interface/SBModule.i
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBModule.i?rev=233029r1=233028r2=233029view=diff
==
--- lldb/trunk/scripts/Python/interface/SBModule.i (original)
+++ lldb/trunk/scripts/Python/interface/SBModule.i Mon Mar 23 16:50:21 2015
@@ -309,6 +309,12 @@ public:
 GetVersion (uint32_t *versions, 
 uint32_t num_versions);
 
+lldb::SBFileSpec
+GetSymbolFileSpec() const;
+
+lldb::SBAddress
+GetObjectFileHeaderAddress() const;
+
 bool
 operator == (const lldb::SBModule rhs) const;
  

Modified: lldb/trunk/scripts/Python/interface/SBTarget.i
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBTarget.i?rev=233029r1=233028r2=233029view=diff
==
--- lldb/trunk/scripts/Python/interface/SBTarget.i (original)
+++ lldb/trunk/scripts/Python/interface/SBTarget.i Mon Mar 23 16:50:21 2015
@@ -81,6 +81,18 @@ public:
 bool
 IsValid() const;
 
+static bool
+EventIsTargetEvent (const lldb::SBEvent event);
+
+static lldb::SBTarget
+GetTargetFromEvent (const lldb::SBEvent event);
+
+static uint32_t
+GetNumModulesFromEvent (const lldb::SBEvent event);
+
+static lldb::SBModule
+GetModuleAtIndexFromEvent (const uint32_t idx, const lldb::SBEvent event);
+
 lldb::SBProcess
 GetProcess ();
 
@@ -714,6 +726,12 @@ public:
 lldb::addr_t
 GetStackRedZoneSize();
 
+lldb::SBLaunchInfo
+GetLaunchInfo () const;
+
+void
+SetLaunchInfo (const lldb::SBLaunchInfo launch_info);
+
 bool
 operator == (const lldb::SBTarget rhs) const;
 


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


Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Ilia K

Comment at: include/lldb/API/SBCommandInterpreter.h:223
@@ +222,3 @@
+bool
+GetPromptOnQuit() const;
+

clayborg wrote:
 You can actually take the const off of this as it does nothing when your only 
 member is an std::shared_ptr, std::auto_ptr or just a pointer.  So please 
 take off the const so it doesn't cause problems later. We should have no 
 functions that return const lldb::SB objects.
I saw the same thing in scripts/Python/interface/SBTarget.i:
```
 bool
 IsValid() const;
```
Should we remove the 'const' here?

http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Greg Clayton
Remove const as per inline comments.



Comment at: include/lldb/API/SBCommandInterpreter.h:223
@@ +222,3 @@
+bool
+GetPromptOnQuit() const;
+

You can actually take the const off of this as it does nothing when your only 
member is an std::shared_ptr, std::auto_ptr or just a pointer.  So please take 
off the const so it doesn't cause problems later. We should have no functions 
that return const lldb::SB objects.


Comment at: scripts/Python/interface/SBCommandInterpreter.i:150
@@ -149,1 +149,3 @@
 bool
+GetPromptOnQuit() const;
+

Remove const per above note.


Comment at: source/API/SBCommandInterpreter.cpp:451
@@ +450,3 @@
+bool
+SBCommandInterpreter::GetPromptOnQuit() const
+{

remove const

http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Ilia K
@clayborg, take a look again please.



Comment at: include/lldb/API/SBCommandInterpreter.h:219-223
@@ -218,1 +218,7 @@
 
+bool
+GetPromptOnQuit() const;
+
+void
+SetPromptOnQuit(bool b);
+

clayborg wrote:
 You also need to add these to the SBCommandInterpreter.i file so they are 
 available in python. If you have made any other lldb::SB changes in the last 
 few weeks, you should go back and make sure to add any new functions to the 
 appropriate .i file as well.
 If you have made any other lldb::SB changes in the last few weeks, you should 
 go back and make sure to add any new functions to the appropriate .i file as 
 well.
Done.
```
$ svn commit
Sendingscripts/Python/interface/SBCommandInterpreter.i
Sendingscripts/Python/interface/SBModule.i
Sendingscripts/Python/interface/SBTarget.i
Transmitting file data ...
Committed revision 233029.
```

http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix Target::Launch in case of synchronous execution

2015-03-23 Thread Greg Clayton
Looks good.


http://reviews.llvm.org/D8541

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Greg Clayton
Add the new API to the .i files as mentioned in the inline comments.



Comment at: include/lldb/API/SBCommandInterpreter.h:219-223
@@ -218,1 +218,7 @@
 
+bool
+GetPromptOnQuit() const;
+
+void
+SetPromptOnQuit(bool b);
+

You also need to add these to the SBCommandInterpreter.i file so they are 
available in python. If you have made any other lldb::SB changes in the last 
few weeks, you should go back and make sure to add any new functions to the 
appropriate .i file as well.

http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r232966 - Do not assert on POSIXDYLD double-eAdd.

2015-03-23 Thread Stephane Sezer
Author: sas
Date: Mon Mar 23 12:05:41 2015
New Revision: 232966

URL: http://llvm.org/viewvc/llvm-project?rev=232966view=rev
Log:
Do not assert on POSIXDYLD double-eAdd.

Summary:
This has been discovered while experimenting with the gecko linker on android.
In general, assert()'ing on user input is a bad idea.

Test Plan: Run unit tests.

Reviewers: clayborg, tfiala

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp?rev=232966r1=232965r2=232966view=diff
==
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp 
(original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp Mon 
Mar 23 12:05:41 2015
@@ -206,7 +206,12 @@ DYLDRendezvous::UpdateSOEntries()
 // state and take a snapshot of the currently loaded images.
 if (m_current.state == eAdd || m_current.state == eDelete)
 {
-assert(m_previous.state == eConsistent || (m_previous.state == eAdd  
m_current.state == eDelete));
+// Some versions of the android dynamic linker might send two
+// notifications with state == eAdd back to back. Ignore them
+// until we get an eConsistent notification.
+if (!(m_previous.state == eConsistent || (m_previous.state == eAdd  
m_current.state == eDelete)))
+return false;
+
 m_soentries.clear();
 m_added_soentries.clear();
 m_removed_soentries.clear();


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


Re: [Lldb-commits] [PATCH] Do not assert on POSIXDYLD double-eAdd.

2015-03-23 Thread Stephane Sezer
REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8495

Files:
  lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp

Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
===
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
@@ -206,7 +206,12 @@
 // state and take a snapshot of the currently loaded images.
 if (m_current.state == eAdd || m_current.state == eDelete)
 {
-assert(m_previous.state == eConsistent || (m_previous.state == eAdd  
m_current.state == eDelete));
+// Some versions of the android dynamic linker might send two
+// notifications with state == eAdd back to back. Ignore them
+// until we get an eConsistent notification.
+if (!(m_previous.state == eConsistent || (m_previous.state == eAdd  
m_current.state == eDelete)))
+return false;
+
 m_soentries.clear();
 m_added_soentries.clear();
 m_removed_soentries.clear();

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
===
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
@@ -206,7 +206,12 @@
 // state and take a snapshot of the currently loaded images.
 if (m_current.state == eAdd || m_current.state == eDelete)
 {
-assert(m_previous.state == eConsistent || (m_previous.state == eAdd  m_current.state == eDelete));
+// Some versions of the android dynamic linker might send two
+// notifications with state == eAdd back to back. Ignore them
+// until we get an eConsistent notification.
+if (!(m_previous.state == eConsistent || (m_previous.state == eAdd  m_current.state == eDelete)))
+return false;
+
 m_soentries.clear();
 m_added_soentries.clear();
 m_removed_soentries.clear();
___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Stephane Sezer
Hi clayborg,

http://reviews.llvm.org/D8554

Files:
  source/Commands/CommandObjectThread.cpp

Index: source/Commands/CommandObjectThread.cpp
===
--- source/Commands/CommandObjectThread.cpp
+++ source/Commands/CommandObjectThread.cpp
@@ -581,7 +581,7 @@
 {
 StackFrame *frame = thread-GetStackFrameAtIndex(0).get();
 
-if (frame-HasDebugInformation ())
+if (frame  frame-HasDebugInformation ())
 {
 new_plan_sp = thread-QueueThreadPlanForStepInRange 
(abort_other_plans,
 
frame-GetSymbolContext(eSymbolContextEverything).line_entry.range,

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: source/Commands/CommandObjectThread.cpp
===
--- source/Commands/CommandObjectThread.cpp
+++ source/Commands/CommandObjectThread.cpp
@@ -581,7 +581,7 @@
 {
 StackFrame *frame = thread-GetStackFrameAtIndex(0).get();
 
-if (frame-HasDebugInformation ())
+if (frame  frame-HasDebugInformation ())
 {
 new_plan_sp = thread-QueueThreadPlanForStepInRange (abort_other_plans,
 frame-GetSymbolContext(eSymbolContextEverything).line_entry.range, 
___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] Fix expression evaluation after clang r232793

2015-03-23 Thread Greg Clayton
We really do not want this change. This means anytime we play with a class it 
will complete it right away, regardless of needing a full definition or not. 
This fix should be done in clang so that clang naturally knows how to say I 
need a full definition and I need to know to complete a class when required.


http://reviews.llvm.org/D8482

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Ed Maste
LGTM, I think I had this same change in a local branch at one point.


http://reviews.llvm.org/D8554

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [PATCH] Don't clobber CFLAGS_EXTRAS in tests.

2015-03-23 Thread Robert Flack
Hi clayborg,

To run tests against a different target platform many extra compiler flags are 
needed to specify sysroot, include dirs, etc. The environment variable 
CFLAGS_EXTRAS seems suited for this purpose except that several Makefiles 
clobber the current flags. This change modifies all of these to add to 
CFLAGS_EXTRAS instead.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8559

Files:
  test/expression_command/call-function/Makefile
  test/functionalities/breakpoint/breakpoint_conditions/Makefile
  test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
  
test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
  test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
  
test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
  
test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
  test/functionalities/data-formatter/data-formatter-synth/Makefile
  test/functionalities/data-formatter/rdar-9973865/Makefile
  test/functionalities/data-formatter/rdar-9974002/Makefile
  test/functionalities/data-formatter/stringprinter/Makefile
  test/lang/cpp/stl/Makefile
  test/make/Makefile.rules
  test/python_api/lldbutil/iter/Makefile
  test/python_api/lldbutil/process/Makefile
  test/python_api/module_section/Makefile
  test/python_api/sbvalue_persist/Makefile
  test/python_api/value_var_update/Makefile
  test/tools/lldb-server/Makefile
  test/tools/lldb-server/inferior-crash/Makefile

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: test/expression_command/call-function/Makefile
===
--- test/expression_command/call-function/Makefile
+++ test/expression_command/call-function/Makefile
@@ -6,7 +6,7 @@
 # targets.  Other targets do not, which causes this test to fail.
 # This flag enables FullDebugInfo for all targets.
 ifneq (,$(findstring clang,$(CC)))
-  CFLAGS_EXTRAS := -fno-limit-debug-info
+  CFLAGS_EXTRAS += -fno-limit-debug-info
 endif
 
 include $(LEVEL)/Makefile.rules
Index: test/functionalities/breakpoint/breakpoint_conditions/Makefile
===
--- test/functionalities/breakpoint/breakpoint_conditions/Makefile
+++ test/functionalities/breakpoint/breakpoint_conditions/Makefile
@@ -1,6 +1,6 @@
 LEVEL = ../../../make
 
 C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
+CFLAGS_EXTRAS += -std=c99
 
 include $(LEVEL)/Makefile.rules
Index: test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
===
--- test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
+++ test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
@@ -6,7 +6,7 @@
 # targets.  Other targets do not, which causes this test to fail.
 # This flag enables FullDebugInfo for all targets.
 ifneq (,$(findstring clang,$(CC)))
-  CFLAGS_EXTRAS := -fno-limit-debug-info
+  CFLAGS_EXTRAS += -fno-limit-debug-info
 endif
 
 include $(LEVEL)/Makefile.rules
Index: test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
===
--- test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
+++ test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
@@ -2,14 +2,14 @@
 
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS := -O0
+CFLAGS_EXTRAS += -O0
 USE_LIBSTDCPP := 1
 
 # clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD 
 # targets.  Other targets do not, which causes this test to fail.
 # This flag enables FullDebugInfo for all targets.
 ifneq (,$(findstring clang,$(CC)))
-  CFLAGS_EXTRAS := -fno-limit-debug-info
+  CFLAGS_EXTRAS += -fno-limit-debug-info
 endif
 
 include $(LEVEL)/Makefile.rules
Index: test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
===
--- test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
+++ test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
@@ -2,7 +2,7 @@
 
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS := -O0
+CFLAGS_EXTRAS += -O0
 USE_LIBSTDCPP := 1
 
 # clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD 
Index: test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
===
--- test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
+++ test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
@@ -2,7 +2,7 @@
 
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS := -O0
+CFLAGS_EXTRAS += -O0
 USE_LIBSTDCPP := 1
 
 # clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD 
Index: 

Re: [Lldb-commits] [PATCH] Fetch module specification from remote process also

2015-03-23 Thread Greg Clayton
Fix the std::string arguments as noted in inline comments and this is good to 
go.



Comment at: include/lldb/Host/common/NativeProcessProtocol.h:291
@@ +290,3 @@
+virtual lldb_private::FileSpec
+GetLoadedModuleFileSpec(const std::string module_path) = 0;
+

change this parameter to const char *' or a const llvm::StringRef  unless 
there really is a need for a std::string.


Comment at: include/lldb/Target/Process.h:3009
@@ +3008,3 @@
+{
+return false;
+}

add a module_spec.Clear(); before the return false.


Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3983
@@ +3982,3 @@
+lldb_private::FileSpec
+NativeProcessLinux::GetLoadedModuleFileSpec(const std::string module_path)
+{

change argument to const char * or const llvm::StringRef 

http://reviews.llvm.org/D8547

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [PATCH] Initialize ObjC runtime at the right location.

2015-03-23 Thread Stephane Sezer
Hi clayborg,

Saw this while reading some code in DynamicLoader classes. Looks like this has
been a FIXME since 2011 at least.

http://reviews.llvm.org/D8558

Files:
  source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
  source/Target/Target.cpp

Index: source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
===
--- source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -890,24 +890,6 @@
 
 if (loaded_module_list.GetSize()  0)
 {
-// FIXME: This should really be in the Runtime handlers class, which 
should get
-// called by the target's ModulesDidLoad, but we're doing it all 
locally for now 
-// to save time.
-// Also, I'm assuming there can be only one libobjc dylib loaded...
-
-ObjCLanguageRuntime *objc_runtime = 
m_process-GetObjCLanguageRuntime(true);
-if (objc_runtime != NULL  !objc_runtime-HasReadObjCLibrary())
-{
-size_t num_modules = loaded_module_list.GetSize();
-for (size_t i = 0; i  num_modules; i++)
-{
-if (objc_runtime-IsModuleObjCLibrary 
(loaded_module_list.GetModuleAtIndex (i)))
-{
-objc_runtime-ReadObjCLibrary 
(loaded_module_list.GetModuleAtIndex (i));
-break;
-}
-}
-}
 if (log)
 loaded_module_list.LogUUIDAndPaths (log, 
DynamicLoaderMacOSXDYLD::ModulesDidLoad);
 m_process-GetTarget().ModulesDidLoad (loaded_module_list);
Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -1259,6 +1259,24 @@
 if (m_process_sp)
 {
 m_process_sp-ModulesDidLoad (module_list);
+
+// This assumes there can only be one libobjc loaded.
+ObjCLanguageRuntime *objc_runtime = 
m_process_sp-GetObjCLanguageRuntime ();
+if (objc_runtime  !objc_runtime-HasReadObjCLibrary ())
+{
+Mutex::Locker locker (module_list.GetMutex ());
+
+size_t num_modules = module_list.GetSize();
+for (size_t i = 0; i  num_modules; i++)
+{
+auto mod = module_list.GetModuleAtIndex (i);
+if (objc_runtime-IsModuleObjCLibrary (mod))
+{
+objc_runtime-ReadObjCLibrary (mod);
+break;
+}
+}
+}
 }
 BroadcastEvent (eBroadcastBitModulesLoaded, new TargetEventData 
(this-shared_from_this(), module_list));
 }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
===
--- source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -890,24 +890,6 @@
 
 if (loaded_module_list.GetSize()  0)
 {
-// FIXME: This should really be in the Runtime handlers class, which should get
-// called by the target's ModulesDidLoad, but we're doing it all locally for now 
-// to save time.
-// Also, I'm assuming there can be only one libobjc dylib loaded...
-
-ObjCLanguageRuntime *objc_runtime = m_process-GetObjCLanguageRuntime(true);
-if (objc_runtime != NULL  !objc_runtime-HasReadObjCLibrary())
-{
-size_t num_modules = loaded_module_list.GetSize();
-for (size_t i = 0; i  num_modules; i++)
-{
-if (objc_runtime-IsModuleObjCLibrary (loaded_module_list.GetModuleAtIndex (i)))
-{
-objc_runtime-ReadObjCLibrary (loaded_module_list.GetModuleAtIndex (i));
-break;
-}
-}
-}
 if (log)
 loaded_module_list.LogUUIDAndPaths (log, DynamicLoaderMacOSXDYLD::ModulesDidLoad);
 m_process-GetTarget().ModulesDidLoad (loaded_module_list);
Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -1259,6 +1259,24 @@
 if (m_process_sp)
 {
 m_process_sp-ModulesDidLoad (module_list);
+
+// This assumes there can only be one libobjc loaded.
+ObjCLanguageRuntime *objc_runtime = m_process_sp-GetObjCLanguageRuntime ();
+if (objc_runtime  !objc_runtime-HasReadObjCLibrary ())
+{
+Mutex::Locker locker (module_list.GetMutex ());
+
+size_t num_modules = module_list.GetSize();
+   

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Stephane Sezer
REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8554

Files:
  lldb/trunk/source/Commands/CommandObjectThread.cpp

Index: lldb/trunk/source/Commands/CommandObjectThread.cpp
===
--- lldb/trunk/source/Commands/CommandObjectThread.cpp
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp
@@ -581,7 +581,7 @@
 {
 StackFrame *frame = thread-GetStackFrameAtIndex(0).get();
 
-if (frame-HasDebugInformation ())
+if (frame  frame-HasDebugInformation ())
 {
 new_plan_sp = thread-QueueThreadPlanForStepInRange 
(abort_other_plans,
 
frame-GetSymbolContext(eSymbolContextEverything).line_entry.range,

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: lldb/trunk/source/Commands/CommandObjectThread.cpp
===
--- lldb/trunk/source/Commands/CommandObjectThread.cpp
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp
@@ -581,7 +581,7 @@
 {
 StackFrame *frame = thread-GetStackFrameAtIndex(0).get();
 
-if (frame-HasDebugInformation ())
+if (frame  frame-HasDebugInformation ())
 {
 new_plan_sp = thread-QueueThreadPlanForStepInRange (abort_other_plans,
 frame-GetSymbolContext(eSymbolContextEverything).line_entry.range, 
___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] Move ADB communications to AdbClient class - to make it accessible by other components.

2015-03-23 Thread Oleksiy Vyalov

Comment at: source/Plugins/Platform/Android/AdbClient.cpp:71-75
@@ +70,7 @@
+response.split (devices, \n);
+if (devices.empty ())
+{
+error.SetErrorString (Wrong number of devices returned from ADB);
+return error;
+}
+

tberghammer wrote:
 I think it isn't an error in this scenario if no device was found
Removed.


Comment at: source/Plugins/Platform/Android/AdbClient.cpp:109-121
@@ +108,15 @@
+
+Error
+AdbClient::GetSerialNumber (std::string sn)
+{
+auto error = SendDeviceMessage (get-serialno);
+if (error.Fail ())
+return error;
+
+error = ReadResponseStatus ();
+if (error.Fail ())
+return error;
+
+return ReadMessage (sn);
+}
+

tberghammer wrote:
 What is the goal of this function? I think it will return m_device_id on 
 success and if m_device_id is not set then it will fail.
Good point - removed it. 


Comment at: source/Plugins/Platform/Android/AdbClient.h:35
@@ +34,3 @@
+
+virtual ~AdbClient () = default;
+

tberghammer wrote:
 Do we need a virtual destructor?
Removed it at all.


Comment at: 
source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp:36-41
@@ +35,8 @@
+AdbClient::DeviceIDList connect_devices;
+auto error = adb.GetDevices (connect_devices);
+if (error.Fail ())
+return error;
+
+assert (!connect_devices.empty ());
+device_id = connect_devices.front ();
+if (log)

tberghammer wrote:
 Please return an error if not exactly one device is found and remove the 
 assert.
 
 I think we should add asserts to check for bugs in lldb while having no 
 connected device can be caused by almost anything.
 
 If we found more then 1 device then (randomly) choosing one will cause some 
 flakiness in our tests so I think it is better to report a failure here. I 
 plan to add some way to specify the selected device from platform-android.
Makes sense - fixed.

http://reviews.llvm.org/D8535

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r232983 - Initialize ObjC runtime at the right location.

2015-03-23 Thread Stephane Sezer
Author: sas
Date: Mon Mar 23 13:36:54 2015
New Revision: 232983

URL: http://llvm.org/viewvc/llvm-project?rev=232983view=rev
Log:
Initialize ObjC runtime at the right location.

Summary:
Saw this while reading some code in DynamicLoader classes. Looks like this has
been a FIXME since 2011 at least.

Test Plan: Run unit tests.

Reviewers: clayborg

Subscribers: lldb-commits

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

Modified:

lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/trunk/source/Target/Target.cpp

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=232983r1=232982r2=232983view=diff
==
--- 
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp 
Mon Mar 23 13:36:54 2015
@@ -890,24 +890,6 @@ DynamicLoaderMacOSXDYLD::AddModulesUsing
 
 if (loaded_module_list.GetSize()  0)
 {
-// FIXME: This should really be in the Runtime handlers class, which 
should get
-// called by the target's ModulesDidLoad, but we're doing it all 
locally for now 
-// to save time.
-// Also, I'm assuming there can be only one libobjc dylib loaded...
-
-ObjCLanguageRuntime *objc_runtime = 
m_process-GetObjCLanguageRuntime(true);
-if (objc_runtime != NULL  !objc_runtime-HasReadObjCLibrary())
-{
-size_t num_modules = loaded_module_list.GetSize();
-for (size_t i = 0; i  num_modules; i++)
-{
-if (objc_runtime-IsModuleObjCLibrary 
(loaded_module_list.GetModuleAtIndex (i)))
-{
-objc_runtime-ReadObjCLibrary 
(loaded_module_list.GetModuleAtIndex (i));
-break;
-}
-}
-}
 if (log)
 loaded_module_list.LogUUIDAndPaths (log, 
DynamicLoaderMacOSXDYLD::ModulesDidLoad);
 m_process-GetTarget().ModulesDidLoad (loaded_module_list);

Modified: lldb/trunk/source/Target/Target.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=232983r1=232982r2=232983view=diff
==
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon Mar 23 13:36:54 2015
@@ -1259,6 +1259,24 @@ Target::ModulesDidLoad (ModuleList modu
 if (m_process_sp)
 {
 m_process_sp-ModulesDidLoad (module_list);
+
+// This assumes there can only be one libobjc loaded.
+ObjCLanguageRuntime *objc_runtime = 
m_process_sp-GetObjCLanguageRuntime ();
+if (objc_runtime  !objc_runtime-HasReadObjCLibrary ())
+{
+Mutex::Locker locker (module_list.GetMutex ());
+
+size_t num_modules = module_list.GetSize();
+for (size_t i = 0; i  num_modules; i++)
+{
+auto mod = module_list.GetModuleAtIndex (i);
+if (objc_runtime-IsModuleObjCLibrary (mod))
+{
+objc_runtime-ReadObjCLibrary (mod);
+break;
+}
+}
+}
 }
 BroadcastEvent (eBroadcastBitModulesLoaded, new TargetEventData 
(this-shared_from_this(), module_list));
 }


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


[Lldb-commits] [lldb] r232969 - Fix whitespace in finishSwigWrapperClasses.py

2015-03-23 Thread Ed Maste
Author: emaste
Date: Mon Mar 23 12:52:10 2015
New Revision: 232969

URL: http://llvm.org/viewvc/llvm-project?rev=232969view=rev
Log:
Fix whitespace in finishSwigWrapperClasses.py

- replace hard tabs with 4-space indents
- delete EOL whitespace

Modified:
lldb/trunk/scripts/Python/finishSwigPythonLLDB.py

Modified: lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/finishSwigPythonLLDB.py?rev=232969r1=232968r2=232969view=diff
==
--- lldb/trunk/scripts/Python/finishSwigPythonLLDB.py (original)
+++ lldb/trunk/scripts/Python/finishSwigPythonLLDB.py Mon Mar 23 12:52:10 2015
@@ -1,58 +1,58 @@
  Python SWIG post process script for each language
 
-   
--
-   File:   finishSwigPythonLLDB.py
+--
+File:   finishSwigPythonLLDB.py
+
+Overview:   Python script(s) to post process SWIG Python C++ Script
+Bridge wrapper code on the Windows/LINUX/OSX platform.
+The Python scripts are equivalent to the shell script (.sh)
+files.
+For the Python script interpreter (external to liblldb) to
+be able to import and use the lldb module, there must be
+two files, lldb.py and _lldb.so, that it can find. lldb.py
+is generated by SWIG at the same time it generates the C++
+file.  _lldb.so is actually a symlink file that points to
+the LLDB shared library/framework.
+The Python script interpreter needs to be able to
+automatically find these two files. On Darwin systems it
+searches in the LLDB.framework, as well as in all the 
normal
+Python search paths.  On non-Darwin systems these files 
will
+need to be put some place where Python will find them.
+This shell script creates the _lldb.so symlink in the
+appropriate place, and copies the lldb.py (and
+embedded_interpreter.py) file to the correct directory.
+
+Environment:OS: Windows Vista or newer, LINUX, OSX.
+IDE:Visual Studio 2013 Plugin Python Tools (PTVS)
+Script: Python 2.6/2.7.5 x64
+Other:  None.
+
+Gotchas:Python debug complied pythonXX_d.lib is required for SWIG
+to build correct LLDBWrapperPython.cpp in order for Visual
+Studio to compile successfully. The release version of the
+Python lib will not work (20/12/2013).
+LLDB (dir) CMakeLists.txt uses windows environmental
+variables $PYTHON_INCLUDE and $PYTHON_LIB to locate
+Python files required for the build.
+
+Copyright:  None.
+--
 
-   Overview:   Python script(s) to post process SWIG Python 
C++ Script 
-   Bridge wrapper code on the 
Windows/LINUX/OSX platform.
-   The Python scripts are equivalent to 
the shell script (.sh)  
-   files.
-   For the Python script interpreter 
(external to liblldb) to 
-   be able to import and use the lldb 
module, there must be 
-   two files, lldb.py and _lldb.so, that 
it can find. lldb.py 
-   is generated by SWIG at the same time 
it generates the C++ 
-   file.  _lldb.so is actually a symlink 
file that points to 
-   the LLDB shared library/framework.
-   The Python script interpreter needs to 
be able to 
-   automatically find these two files. On 
Darwin systems it 
-   searches in the LLDB.framework, as well 
as in all the normal 
-   Python search paths.  On non-Darwin 
systems these files will 
-   need to be put some place where Python 
will find them.
-   This shell script creates the _lldb.so 
symlink in the 
-   appropriate place, and copies the 
lldb.py (and 
-   embedded_interpreter.py) file to the 
correct directory.
-   
-   Environment:

[Lldb-commits] [lldb] r232970 - Use .so library extension by default if platform is not Windows or Darwin

2015-03-23 Thread Ed Maste
Author: emaste
Date: Mon Mar 23 12:52:38 2015
New Revision: 232970

URL: http://llvm.org/viewvc/llvm-project?rev=232970view=rev
Log:
Use .so library extension by default if platform is not Windows or Darwin

Modified:
lldb/trunk/scripts/Python/finishSwigPythonLLDB.py

Modified: lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/finishSwigPythonLLDB.py?rev=232970r1=232969r2=232970view=diff
==
--- lldb/trunk/scripts/Python/finishSwigPythonLLDB.py (original)
+++ lldb/trunk/scripts/Python/finishSwigPythonLLDB.py Mon Mar 23 12:52:38 2015
@@ -370,10 +370,10 @@ def make_symlink_liblldb( vDictArgs, vst
 strLibFileExtn = .dll;
 strSrc = bin/liblldb%s % strLibFileExtn;
 else:
-if eOSType == utilsOsType.EnumOsType.Linux:
-strLibFileExtn = .so;
-elif eOSType == utilsOsType.EnumOsType.Darwin:
+if eOSType == utilsOsType.EnumOsType.Darwin:
 strLibFileExtn = .dylib;
+else:
+strLibFileExtn = .so;
 strSrc = lib/liblldb%s % strLibFileExtn;
 
 bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir, strSrc, 
strTarget );


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


[Lldb-commits] [lldb] r232973 - Remove non-standard Environment header section

2015-03-23 Thread Ed Maste
Author: emaste
Date: Mon Mar 23 12:57:42 2015
New Revision: 232973

URL: http://llvm.org/viewvc/llvm-project?rev=232973view=rev
Log:
Remove non-standard Environment header section


Modified:
lldb/trunk/scripts/Python/buildSwigPython.py
lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
lldb/trunk/scripts/buildSwigWrapperClasses.py
lldb/trunk/scripts/finishSwigWrapperClasses.py
lldb/trunk/scripts/utilsArgsParse.py
lldb/trunk/scripts/utilsDebug.py

Modified: lldb/trunk/scripts/Python/buildSwigPython.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/buildSwigPython.py?rev=232973r1=232972r2=232973view=diff
==
--- lldb/trunk/scripts/Python/buildSwigPython.py (original)
+++ lldb/trunk/scripts/Python/buildSwigPython.py Mon Mar 23 12:57:42 2015
@@ -6,11 +6,6 @@
Overview:   Creates SWIG Python C++ Script Bridge wrapper 
code. This
script is called by 
build-swig-wrapper-classes.py in turn.

-   Environment:OS: Windows Vista or newer, LINUX, 
OSX.
-   IDE:Visual Studio 2013 Plugin 
Python Tools (PTVS)
-   Script: Python 2.6/2.7.5 x64
-   Other:  SWIG 2.0.11
-
Gotchas:Python debug complied pythonXX_d.lib is 
required for SWIG
to build correct LLDBWrapperPython.cpp 
in order for Visual
Studio to compile successfully. The 
release version of the 

Modified: lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/finishSwigPythonLLDB.py?rev=232973r1=232972r2=232973view=diff
==
--- lldb/trunk/scripts/Python/finishSwigPythonLLDB.py (original)
+++ lldb/trunk/scripts/Python/finishSwigPythonLLDB.py Mon Mar 23 12:57:42 2015
@@ -22,11 +22,6 @@
 appropriate place, and copies the lldb.py (and
 embedded_interpreter.py) file to the correct directory.
 
-Environment:OS: Windows Vista or newer, LINUX, OSX.
-IDE:Visual Studio 2013 Plugin Python Tools (PTVS)
-Script: Python 2.6/2.7.5 x64
-Other:  None.
-
 Gotchas:Python debug complied pythonXX_d.lib is required for SWIG
 to build correct LLDBWrapperPython.cpp in order for Visual
 Studio to compile successfully. The release version of the

Modified: lldb/trunk/scripts/buildSwigWrapperClasses.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/buildSwigWrapperClasses.py?rev=232973r1=232972r2=232973view=diff
==
--- lldb/trunk/scripts/buildSwigWrapperClasses.py (original)
+++ lldb/trunk/scripts/buildSwigWrapperClasses.py Mon Mar 23 12:57:42 2015
@@ -16,11 +16,6 @@
 cases the file generated by SWIG may need some tweaking
 before it is completely ready to use.
 
-Environment:OS: Windows Vista or newer,LINUX,OSX.
-IDE:Visual Studio 2013 Plugin Python Tools (PTVS)
-Script: Python 2.6/2.7.5 x64
-Other:  SWIG 2.0.11
-
 Gotchas:For Windows OS it is assumed the SWIG executable can be
 found in the %PATH% environmental variable.
 

Modified: lldb/trunk/scripts/finishSwigWrapperClasses.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/finishSwigWrapperClasses.py?rev=232973r1=232972r2=232973view=diff
==
--- lldb/trunk/scripts/finishSwigWrapperClasses.py (original)
+++ lldb/trunk/scripts/finishSwigWrapperClasses.py Mon Mar 23 12:57:42 2015
@@ -15,11 +15,6 @@
 language stuff fully functional.  Any such post-processing
 is handled through the Python scripts called here.
 
-Environment:OS: Windows Vista or newer,LINUX,OSX.
-IDE:Visual Studio 2013 Plugin Python Tools (PTVS)
-Script: Python 2.6/2.7.5 x64
-Other:  None.
-
 Gotchas:None.
 
 Copyright:  None.

Modified: lldb/trunk/scripts/utilsArgsParse.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/utilsArgsParse.py?rev=232973r1=232972r2=232973view=diff
==
--- lldb/trunk/scripts/utilsArgsParse.py (original)
+++ lldb/trunk/scripts/utilsArgsParse.py Mon Mar 23 12:57:42 2015
@@ -9,10 +9,6 @@
 

[Lldb-commits] [lldb] r232974 - Rely on Makefile.rules in lldb/test/driver/batch_mode.

2015-03-23 Thread Zachary Turner
Author: zturner
Date: Mon Mar 23 13:00:07 2015
New Revision: 232974

URL: http://llvm.org/viewvc/llvm-project?rev=232974view=rev
Log:
Rely on Makefile.rules in lldb/test/driver/batch_mode.

This was hardcoding some make rules instead of relying on
Makefile.rules, which was causing some of the logic to be
incorrect for Windows.

Patch by: Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D8363

Modified:
lldb/trunk/test/driver/batch_mode/Makefile

Modified: lldb/trunk/test/driver/batch_mode/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/driver/batch_mode/Makefile?rev=232974r1=232973r2=232974view=diff
==
--- lldb/trunk/test/driver/batch_mode/Makefile (original)
+++ lldb/trunk/test/driver/batch_mode/Makefile Mon Mar 23 13:00:07 2015
@@ -1,28 +1,5 @@
-CC ?= clang
-ifeq $(ARCH) 
-   ARCH = x86_64
-endif
+LEVEL = ../../make
 
-ifeq $(OS) 
-   OS = $(shell uname -s)
-endif
+C_SOURCES := main.c
 
-CFLAGS ?= -g -O0
-CWD := $(shell pwd)
-
-LIB_PREFIX := lib
-
-ifeq $(OS) Darwin
-   CFLAGS += -arch $(ARCH)
-endif
-
-all: a.out
-
-a.out: main.o
-   $(CC) $(CFLAGS) -o a.out main.o
-
-main.o: main.c
-   $(CC) $(CFLAGS) -c main.c
-
-clean:
-   rm -rf $(wildcard *.o *~ *.dylib *.so a.out *.dSYM)
+include $(LEVEL)/Makefile.rules


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


Re: [Lldb-commits] [PATCH] Rely on Makefile.rules to clean up the lldb\test\driver\batch_mode directory.

2015-03-23 Thread Zachary Turner
lgtm


http://reviews.llvm.org/D8363

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Don't clobber CFLAGS_EXTRAS in tests.

2015-03-23 Thread Greg Clayton
lgtm


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8559

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Initialize ObjC runtime at the right location.

2015-03-23 Thread Greg Clayton
lgtm


http://reviews.llvm.org/D8558

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r232979 - Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Stephane Sezer
Author: sas
Date: Mon Mar 23 13:15:07 2015
New Revision: 232979

URL: http://llvm.org/viewvc/llvm-project?rev=232979view=rev
Log:
Add a missing null pointer check in CommandObjectThread.cpp.

Reviewers: clayborg

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Commands/CommandObjectThread.cpp

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=232979r1=232978r2=232979view=diff
==
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Mon Mar 23 13:15:07 2015
@@ -581,7 +581,7 @@ protected:
 {
 StackFrame *frame = thread-GetStackFrameAtIndex(0).get();
 
-if (frame-HasDebugInformation ())
+if (frame  frame-HasDebugInformation ())
 {
 new_plan_sp = thread-QueueThreadPlanForStepInRange 
(abort_other_plans,
 
frame-GetSymbolContext(eSymbolContextEverything).line_entry.range, 


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


Re: [Lldb-commits] [PATCH] Move ADB communications to AdbClient class - to make it accessible by other components.

2015-03-23 Thread Oleksiy Vyalov
Fixed accordingly to suggestions.
Please take another look.

Thank you.


http://reviews.llvm.org/D8535

Files:
  source/Plugins/Platform/Android/AdbClient.cpp
  source/Plugins/Platform/Android/AdbClient.h
  source/Plugins/Platform/Android/CMakeLists.txt
  source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: source/Plugins/Platform/Android/AdbClient.cpp
===
--- /dev/null
+++ source/Plugins/Platform/Android/AdbClient.cpp
@@ -0,0 +1,187 @@
+//===-- AdbClient.cpp ---*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+// Other libraries and framework includes
+#include lldb/Host/ConnectionFileDescriptor.h
+#include llvm/ADT/SmallVector.h
+#include llvm/ADT/StringRef.h
+#include llvm/ADT/STLExtras.h
+
+// Project includes
+#include AdbClient.h
+
+#include sstream
+
+using namespace lldb;
+using namespace lldb_private;
+
+namespace {
+
+const uint32_t kConnTimeout = 1; // 10 ms
+const char * kOKAY = OKAY;
+const char * kFAIL = FAIL;
+
+}  // namespace
+
+AdbClient::AdbClient (const std::string device_id)
+: m_device_id (device_id)
+{
+}
+
+void
+AdbClient::SetDeviceID (const std::string device_id)
+{
+m_device_id = device_id;
+}
+
+Error
+AdbClient::Connect ()
+{
+Error error;
+m_conn.Connect (connect://localhost:5037, error);
+
+return error;
+}
+
+Error
+AdbClient::GetDevices (DeviceIDList device_list)
+{
+device_list.clear ();
+
+auto error = SendMessage (host:devices);
+if (error.Fail ())
+return error;
+
+error = ReadResponseStatus ();
+if (error.Fail ())
+return error;
+
+std::string in_buffer;
+error = ReadMessage (in_buffer);
+
+llvm::StringRef response (in_buffer);
+llvm::SmallVectorllvm::StringRef, 4 devices;
+response.split (devices, \n, -1, false);
+
+for (const auto device: devices)
+device_list.push_back (device.split ('\t').first);
+
+return error;
+}
+
+Error
+AdbClient::SetPortForwarding (const uint16_t port)
+{
+char message[48];
+snprintf (message, sizeof (message), forward:tcp:%d;tcp:%d, port, port);
+
+const auto error = SendDeviceMessage (message);
+if (error.Fail ())
+return error;
+
+return ReadResponseStatus ();
+}
+
+Error
+AdbClient::DeletePortForwarding (const uint16_t port)
+{
+char message[32];
+snprintf (message, sizeof (message), killforward:tcp:%d, port);
+
+const auto error = SendDeviceMessage (message);
+if (error.Fail ())
+return error;
+
+return ReadResponseStatus ();
+}
+
+Error
+AdbClient::SendMessage (const std::string packet)
+{
+auto error = Connect ();
+if (error.Fail ())
+return error;
+
+char length_buffer[5];
+snprintf (length_buffer, sizeof (length_buffer), %04zx, packet.size ());
+
+ConnectionStatus status;
+
+m_conn.Write (length_buffer, 4, status, error);
+if (error.Fail ())
+return error;
+
+m_conn.Write (packet.c_str (), packet.size (), status, error);
+return error;
+}
+
+Error
+AdbClient::SendDeviceMessage (const std::string packet)
+{
+std::ostringstream msg;
+msg  host-serial:  m_device_id  :  packet;
+return SendMessage (msg.str ());
+}
+
+Error
+AdbClient::ReadMessage (std::string message)
+{
+message.clear ();
+
+char buffer[5];
+buffer[4] = 0;
+
+Error error;
+ConnectionStatus status;
+
+m_conn.Read (buffer, 4, kConnTimeout, status, error);
+if (error.Fail ())
+return error;
+
+size_t packet_len = 0;
+sscanf (buffer, %zx, packet_len);
+std::string result (packet_len, 0);
+m_conn.Read (result[0], packet_len, kConnTimeout, status, error);
+if (error.Success ())
+result.swap (message);
+
+return error;
+}
+
+Error
+AdbClient::ReadResponseStatus()
+{
+char buffer[5];
+
+static const size_t packet_len = 4;
+buffer[packet_len] = 0;
+
+Error error;
+ConnectionStatus status;
+
+m_conn.Read (buffer, packet_len, kConnTimeout, status, error);
+if (error.Fail ())
+  return error;
+
+if (strncmp (buffer, kOKAY, packet_len) != 0)
+{
+if (strncmp (buffer, kFAIL, packet_len) == 0)
+{
+std::string error_message;
+error = ReadMessage (error_message);
+if (error.Fail ())
+return error;
+error.SetErrorString (error_message.c_str ());
+}
+else
+error.SetErrorStringWithFormat (\%s\ expected from adb, received: \%s\, kOKAY, buffer);
+}
+
+return error;
+}
Index: source/Plugins/Platform/Android/AdbClient.h

Re: [Lldb-commits] [PATCH] Initialize ObjC runtime at the right location.

2015-03-23 Thread Stephane Sezer
REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8558

Files:
  
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
  lldb/trunk/source/Target/Target.cpp

Index: lldb/trunk/source/Target/Target.cpp
===
--- lldb/trunk/source/Target/Target.cpp
+++ lldb/trunk/source/Target/Target.cpp
@@ -1259,6 +1259,24 @@
 if (m_process_sp)
 {
 m_process_sp-ModulesDidLoad (module_list);
+
+// This assumes there can only be one libobjc loaded.
+ObjCLanguageRuntime *objc_runtime = 
m_process_sp-GetObjCLanguageRuntime ();
+if (objc_runtime  !objc_runtime-HasReadObjCLibrary ())
+{
+Mutex::Locker locker (module_list.GetMutex ());
+
+size_t num_modules = module_list.GetSize();
+for (size_t i = 0; i  num_modules; i++)
+{
+auto mod = module_list.GetModuleAtIndex (i);
+if (objc_runtime-IsModuleObjCLibrary (mod))
+{
+objc_runtime-ReadObjCLibrary (mod);
+break;
+}
+}
+}
 }
 BroadcastEvent (eBroadcastBitModulesLoaded, new TargetEventData 
(this-shared_from_this(), module_list));
 }
Index: 
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
===
--- 
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ 
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -890,24 +890,6 @@
 
 if (loaded_module_list.GetSize()  0)
 {
-// FIXME: This should really be in the Runtime handlers class, which 
should get
-// called by the target's ModulesDidLoad, but we're doing it all 
locally for now 
-// to save time.
-// Also, I'm assuming there can be only one libobjc dylib loaded...
-
-ObjCLanguageRuntime *objc_runtime = 
m_process-GetObjCLanguageRuntime(true);
-if (objc_runtime != NULL  !objc_runtime-HasReadObjCLibrary())
-{
-size_t num_modules = loaded_module_list.GetSize();
-for (size_t i = 0; i  num_modules; i++)
-{
-if (objc_runtime-IsModuleObjCLibrary 
(loaded_module_list.GetModuleAtIndex (i)))
-{
-objc_runtime-ReadObjCLibrary 
(loaded_module_list.GetModuleAtIndex (i));
-break;
-}
-}
-}
 if (log)
 loaded_module_list.LogUUIDAndPaths (log, 
DynamicLoaderMacOSXDYLD::ModulesDidLoad);
 m_process-GetTarget().ModulesDidLoad (loaded_module_list);

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: lldb/trunk/source/Target/Target.cpp
===
--- lldb/trunk/source/Target/Target.cpp
+++ lldb/trunk/source/Target/Target.cpp
@@ -1259,6 +1259,24 @@
 if (m_process_sp)
 {
 m_process_sp-ModulesDidLoad (module_list);
+
+// This assumes there can only be one libobjc loaded.
+ObjCLanguageRuntime *objc_runtime = m_process_sp-GetObjCLanguageRuntime ();
+if (objc_runtime  !objc_runtime-HasReadObjCLibrary ())
+{
+Mutex::Locker locker (module_list.GetMutex ());
+
+size_t num_modules = module_list.GetSize();
+for (size_t i = 0; i  num_modules; i++)
+{
+auto mod = module_list.GetModuleAtIndex (i);
+if (objc_runtime-IsModuleObjCLibrary (mod))
+{
+objc_runtime-ReadObjCLibrary (mod);
+break;
+}
+}
+}
 }
 BroadcastEvent (eBroadcastBitModulesLoaded, new TargetEventData (this-shared_from_this(), module_list));
 }
Index: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
===
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -890,24 +890,6 @@
 
 if (loaded_module_list.GetSize()  0)
 {
-// FIXME: This should really be in the Runtime handlers class, which should get
-// called by the target's ModulesDidLoad, but we're doing it all locally for now 
-// to save time.
-// Also, I'm assuming there can be only one libobjc dylib loaded...
-
-ObjCLanguageRuntime *objc_runtime = m_process-GetObjCLanguageRuntime(true);
-if (objc_runtime != NULL  !objc_runtime-HasReadObjCLibrary())
-{
-size_t num_modules = 

Re: [Lldb-commits] [PATCH] Allow multiple simultaneous connections to platform.

2015-03-23 Thread Greg Clayton
I don't see how this does multiple connections? Seems like the do/while loop 
would need to be in a thread?


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8452

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix race condition in Target::Launch

2015-03-23 Thread Ilia K

Comment at: source/Target/Target.cpp:2605-2606
@@ -2604,4 +2610,1 @@
 {
-if (!synchronous_execution)
-m_process_sp-RestoreProcessEvents ();
-

Can we use a mixed code (for sync and async execution) to avoid copy-paste?


Comment at: source/Target/Target.cpp:2627
@@ -2625,2 +2626,3 @@
 }
+m_process_sp-RestoreProcessEvents();
 }

it's really needed?

http://reviews.llvm.org/D8562

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Remove now unneccessary expected failure decorators for Linux.

2015-03-23 Thread Vince Harron
What's the status on this CL?


http://reviews.llvm.org/D6910

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Greg Clayton
Looks good.


http://reviews.llvm.org/D8444

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


[Lldb-commits] [lldb] r233034 - Turn off 'quit' confirmation in lldb-mi

2015-03-23 Thread Ilia K
Author: ki.stfu
Date: Mon Mar 23 17:45:13 2015
New Revision: 233034

URL: http://llvm.org/viewvc/llvm-project?rev=233034view=rev
Log:
Turn off 'quit' confirmation in lldb-mi

Summary:
# Turn off interpreter.prompt-on-quit on startup (MI)
# Add CommandInterpreter::SetPromptOnQuit
# Add SBCommandInterpreter::GetPromptOnQuit/SetPromptOnQuit

All tests pass on OS X.

Test Plan:
```
-file-exec-and-symbols ~/p/hello
-break-insert -f main
-exec-run
-interpreter-exec console quit
```

Reviewers: abidh, clayborg

Reviewed By: abidh, clayborg

Subscribers: lldb-commits, clayborg, abidh

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

Modified:
lldb/trunk/include/lldb/API/SBCommandInterpreter.h
lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i
lldb/trunk/source/API/SBCommandInterpreter.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp

Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=233034r1=233033r2=233034view=diff
==
--- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Mon Mar 23 17:45:13 2015
@@ -219,6 +219,12 @@ public:
 const char *
 GetIOHandlerControlSequence(char ch);
 
+bool
+GetPromptOnQuit();
+
+void
+SetPromptOnQuit(bool b);
+
 protected:
 
 lldb_private::CommandInterpreter 

Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=233034r1=233033r2=233034view=diff
==
--- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Mar 23 
17:45:13 2015
@@ -625,6 +625,9 @@ public:
 bool
 GetPromptOnQuit () const;
 
+void
+SetPromptOnQuit (bool b);
+
 bool
 GetStopCmdSourceOnError () const;
 

Modified: lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i?rev=233034r1=233033r2=233034view=diff
==
--- lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i (original)
+++ lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i Mon Mar 23 
17:45:13 2015
@@ -150,6 +150,12 @@ public:
 GetIOHandlerControlSequence(char ch);
 
 bool
+GetPromptOnQuit();
+
+void
+SetPromptOnQuit(bool b);
+
+bool
 CommandExists (const char *cmd);
 
 bool

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=233034r1=233033r2=233034view=diff
==
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Mon Mar 23 17:45:13 2015
@@ -447,6 +447,21 @@ SBCommandInterpreter::GetDebugger ()
 return sb_debugger;
 }
 
+bool
+SBCommandInterpreter::GetPromptOnQuit()
+{
+if (m_opaque_ptr)
+return m_opaque_ptr-GetPromptOnQuit();
+return false;
+}
+
+void
+SBCommandInterpreter::SetPromptOnQuit (bool b)
+{
+if (m_opaque_ptr)
+m_opaque_ptr-SetPromptOnQuit(b);
+}
+
 CommandInterpreter *
 SBCommandInterpreter::get ()
 {
@@ -850,4 +865,3 @@ SBCommand::AddCommand (const char* name,
 return lldb::SBCommand(new_command_sp);
 return lldb::SBCommand();
 }
-

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=233034r1=233033r2=233034view=diff
==
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar 23 17:45:13 
2015
@@ -149,6 +149,13 @@ CommandInterpreter::GetPromptOnQuit () c
 return m_collection_sp-GetPropertyAtIndexAsBoolean (nullptr, idx, 
g_properties[idx].default_uint_value != 0);
 }
 
+void
+CommandInterpreter::SetPromptOnQuit (bool b)
+{
+const uint32_t idx = ePropertyPromptOnQuit;
+m_collection_sp-SetPropertyAtIndexAsBoolean (nullptr, idx, b);
+}
+
 bool
 CommandInterpreter::GetStopCmdSourceOnError () const
 {

Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp?rev=233034r1=233033r2=233034view=diff
==
--- 

[Lldb-commits] [PATCH] [DWARF] If linkages names are missing, use decl context to get qualified names.

2015-03-23 Thread Siva Chandra
Hi clayborg,

This commit adds this alternate route only when parsing variable dies
corresponding to global or static variables. The motivation for this is that GCC
does not emit linkage names for functions and variables declared/defined in
anonymous namespaces. Having this alternate route fixes one part of
TestNamespace which fails when the test case is compiled with GCC.

An alternate route to get fully qualified names of functions whose linkage names
are missing will be added with a followup change. With that, the other failing
part of TestNamespace will also be fixed.

http://reviews.llvm.org/D8569

Files:
  include/lldb/Symbol/Variable.h
  source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
  source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Symbol/Variable.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/lldb/Symbol/Variable.h
===
--- include/lldb/Symbol/Variable.h
+++ include/lldb/Symbol/Variable.h
@@ -29,7 +29,7 @@
 //--
 Variable (lldb::user_id_t uid,
   const char *name, 
-  const char *mangled,   // The mangled variable name for variables in namespaces
+  const char *mangled,  // The mangled or fully qualified name of the variable.
   const lldb::SymbolFileTypeSP symfile_type_sp,
   lldb::ValueType scope,
   SymbolContextScope *owner_scope,
Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -51,6 +51,7 @@
 m_producer_version_major (0),
 m_producer_version_minor (0),
 m_producer_version_update (0),
+m_language_type (eLanguageTypeUnknown),
 m_is_dwarf64(false)
 {
 }
@@ -68,6 +69,7 @@
 m_func_aranges_ap.reset();
 m_user_data = NULL;
 m_producer  = eProducerInvalid;
+m_language_type = eLanguageTypeUnknown;
 m_is_dwarf64= false;
 }
 
@@ -1042,6 +1044,19 @@
 return m_producer_version_update;
 }
 
+LanguageType
+DWARFCompileUnit::GetLanguageType()
+{
+if (m_language_type != eLanguageTypeUnknown)
+return m_language_type;
+
+const DWARFDebugInfoEntry *die = GetCompileUnitDIEOnly();
+if (die)
+m_language_type = static_castLanguageType(
+die-GetAttributeValueAsUnsigned(m_dwarf2Data, this, DW_AT_language, eLanguageTypeUnknown));
+return m_language_type;
+}
+
 bool
 DWARFCompileUnit::IsDWARF64() const
 {
Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
===
--- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
+++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
@@ -10,6 +10,7 @@
 #ifndef SymbolFileDWARF_DWARFCompileUnit_h_
 #define SymbolFileDWARF_DWARFCompileUnit_h_
 
+#include lldb/lldb-enumerations.h
 #include DWARFDebugInfoEntry.h
 #include SymbolFileDWARF.h
 
@@ -186,6 +187,9 @@
 uint32_t
 GetProducerVersionUpdate();
 
+lldb::LanguageType
+GetLanguageType();
+
 bool
 IsDWARF64() const;
 
@@ -204,6 +208,7 @@
 uint32_tm_producer_version_major;
 uint32_tm_producer_version_minor;
 uint32_tm_producer_version_update;
+lldb::LanguageType  m_language_type;
 boolm_is_dwarf64;
 
 void
Index: source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
===
--- source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
+++ source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
@@ -100,6 +100,14 @@
 const char *
 GetQualifiedName () const;
 
+// Same as GetQaulifiedName, but the life time of the returned string will
+// be that of the LLDB session.
+lldb_private::ConstString
+GetQualifiedNameAsConstString () const
+{
+return lldb_private::ConstString (GetQualifiedName ());
+}
+
 protected:
 typedef std::vectorEntry collection;
 collection m_entries;
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -7402,6 +7402,26 @@
 dw_tag_t parent_tag = sc_parent_die ? sc_parent_die-Tag() : 0;
 SymbolContextScope * symbol_context_scope = NULL;
 
+if (!mangled)
+{
+std::string lang_name(LanguageRuntime::GetNameForLanguageType(dwarf_cu-GetLanguageType()));
+
+// LLDB relies on the mangled name (DW_TAG_linkage_name or 

Re: [Lldb-commits] [PATCH] [DWARF] If linkages names are missing, use decl context to get qualified names.

2015-03-23 Thread Greg Clayton
Just fix the language compare so we aren't looking for a string c++ and use 
the enum and this should be good.



Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:7407
@@ +7406,3 @@
+{
+std::string 
lang_name(LanguageRuntime::GetNameForLanguageType(dwarf_cu-GetLanguageType()));
+

We should add a function that can ask the language enums if they are C++ or not 
and use that instead of making a string.


Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:7416
@@ +7415,3 @@
+dw_tag_t imm_parent_tag = die-GetParent()-Tag();
+if (imm_parent_tag == DW_TAG_compile_unit  
lang_name.find(c++) == 0)
+{

Make a function that lives somewhere that is something like:

```
static bool
LanguageIsCPlusPlus (LanguageType language);

```

http://reviews.llvm.org/D8569

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] ComputeSupportExeDirectory for Linux

2015-03-23 Thread Oleksiy Vyalov

Comment at: source/Host/linux/HostInfoLinux.cpp:225
@@ -224,3 +224,3 @@
 bool
-HostInfoLinux::ComputeSharedLibraryDirectory(FileSpec file_spec)
 {

Do we need to keep this method around since 
HostInfoPosix::ComputeSupportExeDirectory uses 
GetLLDBPath(lldb::ePathTypeLLDBShlibDir..) ?

http://reviews.llvm.org/D8570

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [Diffusion] rL233021: Move ADB communications to AdbClient class - to make it accessible by other…

2015-03-23 Thread Oleksiy Vyalov
Should be fixed in http://reviews.llvm.org/rL233041


USERS
  ovyalov (Author)
  ki.stfu (Auditor)

http://reviews.llvm.org/rL233021

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Allow multiple simultaneous connections to platform.

2015-03-23 Thread Greg Clayton
Do we want the have one thread that listens for incoming connections, and once 
a connection is made, make a new GDBRemoteCommunicationServerPlatform shared 
pointer and launch a new thread that would communicate over the newly bound 
port? Then we could have multiple connections to the same lldb-server that 
could be independent.

Currently this is just a cleanup of the --stay-alive option renaming it to 
--server. Do we want to take the extra step of allowing multiple simultaneous 
connections where each connection runs on its own thread? Each 
GDBRemoteCommunicationServerPlatform object would contain its own state 
(current working directory, etc).


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8452

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Fix race condition in Target::Launch

2015-03-23 Thread Ilia K

Comment at: source/Target/Target.cpp:2605-2606
@@ -2604,4 +2610,1 @@
 {
-if (!synchronous_execution)
-m_process_sp-RestoreProcessEvents ();
-

zturner wrote:
 ki.stfu wrote:
  Can we use a mixed code (for sync and async execution) to avoid copy-paste?
 I'm not crazy about the copy/paste either, but I thought this separation made 
 the logic easier to follow.  Let's see what Jim or Greg says, I don't feel 
 very strongly, so if there's a consensus one way or the other I'll just go 
 with the consensus.
Ok, I don't mind but I'd prefer to keep as is.


Comment at: source/Target/Target.cpp:2627
@@ -2625,2 +2626,3 @@
 }
+m_process_sp-RestoreProcessEvents();
 }

zturner wrote:
 ki.stfu wrote:
  it's really needed?
 I'm still learning this section of the code, but if we hijack the events, 
 surely we need to restore them?
Right, but in this case we do that on line #2688


Comment at: source/Target/Target.cpp:2688
@@ -2673,3 +2687,3 @@
 }
 m_process_sp-RestoreProcessEvents ();
 }

here

http://reviews.llvm.org/D8562

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Allow multiple simultaneous connections to platform.

2015-03-23 Thread Vince Harron
Hi Greg, What do you think about this?  supporting multiple connections to 
lldb-platform will allow us to trivially run the test suite in parallel which 
is going to be incredibly important to us testing against 6 remote Linux 
architectures and 6 remote Android architectures.

F436486: archs.png http://reviews.llvm.org/F436486


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8452

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Jason Molenda
Not worth changing the patch but fwiw you could have added eFlagRequiresFrame 
to the CommandObjectParsed flags for this command to do the same thing.  My 
main reaction echoes Jim's - I don't know what it means to have a thread and no 
frame 0.  But given that two lldb devs have hit it, I guess early in the 
startup of a new platform you can get hit this.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8554

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Jim Ingham
Yes, I think there are a lot of places around in lldb where we assume that if 
you have a valid thread you have a valid frame 0.  You're not going to get very 
far if you don't get that right.

Jim


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8554

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] Use eFlagRequiresFrame instead of manually checking in CommandObjectThread.cpp.

2015-03-23 Thread Jason Molenda
Good change as long as it accomplishes the same thing as your null check 
against GetStackFrameAtIndex(0).  eFlagRequiresFrame is slightly different, 
checking that the ExecutionContext got a frame but I suppose the ECX got it 
from the same place -- GetStackFrameAtIndex(0) so it should be fine.

I wouldn't raise such a pedantic point except that lldb is clearly in an odd 
state when this code path is erroring out; normal assumptions may not be safe.


http://reviews.llvm.org/D8574

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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


Re: [Lldb-commits] [PATCH] ComputeSupportExeDirectory for Linux

2015-03-23 Thread Oleksiy Vyalov
lgtm


http://reviews.llvm.org/D8570

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



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