[Lldb-commits] [lldb] r312666 - [CMake] Need to set WITH_LOCKDOWN on debugserver target

2017-09-06 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Wed Sep  6 13:15:43 2017
New Revision: 312666

URL: http://llvm.org/viewvc/llvm-project?rev=312666&view=rev
Log:
[CMake] Need to set WITH_LOCKDOWN on debugserver target

Turns out WITH_LOCKDOWN define changes the struct layout and constructor 
implementation for RNBSocket which is used in debugserver.cpp, so we need to 
make sure this is consistent.

In the future we should change WITH_LOCKDOWN to be configured in a generated 
header, but for now we can just set it correctly.



Modified:
lldb/trunk/tools/debugserver/source/CMakeLists.txt
lldb/trunk/unittests/debugserver/CMakeLists.txt

Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=312666&r1=312665&r2=312666&view=diff
==
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Wed Sep  6 13:15:43 2017
@@ -149,6 +149,11 @@ if(NOT SKIP_DEBUGSERVER)
   WITH_FBS
   WITH_BKS
   )
+set_property(TARGET debugserver APPEND PROPERTY COMPILE_DEFINITIONS
+  WITH_LOCKDOWN
+  WITH_FBS
+  WITH_BKS
+  )
 set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_FLAGS
   -F${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
   )

Modified: lldb/trunk/unittests/debugserver/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/debugserver/CMakeLists.txt?rev=312666&r1=312665&r2=312666&view=diff
==
--- lldb/trunk/unittests/debugserver/CMakeLists.txt (original)
+++ lldb/trunk/unittests/debugserver/CMakeLists.txt Wed Sep  6 13:15:43 2017
@@ -17,3 +17,22 @@ add_lldb_unittest(debugserverTests
   LINK_COMPONENTS
 Support
   )
+
+if(IOS)
+  set_property(TARGET debugserverTests APPEND PROPERTY COMPILE_DEFINITIONS
+  WITH_LOCKDOWN
+  WITH_FBS
+  WITH_BKS
+  )
+  
+  add_lldb_unittest(debugserverNonUITests
+RNBSocketTest.cpp
+debugserver_LogCallback.cpp
+
+LINK_LIBS
+  lldbDebugserverCommon_NonUI
+  lldbHost
+LINK_COMPONENTS
+  Support
+)
+endif()


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


[Lldb-commits] [PATCH] D37533: Fix lldb-mi test data_read_memory_bytes_global

2017-09-06 Thread Ted Woodward via Phabricator via lldb-commits
ted added a comment.

Tested with clang 3.8 on top-of-tree lldb-mi on Ubuntu 14.


https://reviews.llvm.org/D37533



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


[Lldb-commits] [PATCH] D37533: Fix lldb-mi test data_read_memory_bytes_global

2017-09-06 Thread Ted Woodward via Phabricator via lldb-commits
ted created this revision.
Herald added a subscriber: aprantl.

Test was skipped because -data-evaluate-expression was thought
to not work on globals. This is not the case - the issue was clang
removes debug info for globals in cpp files that are not used.

Add a reference to the globals in question, and fix memory patter in
test to match memory pattern in testcase.


https://reviews.llvm.org/D37533

Files:
  packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
  packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp


Index: packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
===
--- packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
+++ packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
@@ -17,6 +17,8 @@
 {
 char array[] = { 0x01, 0x02, 0x03, 0x04 };
 char *first_element_ptr = &array[0];
+char g = g_CharArray[0];
+char s = s_CharArray[0];
 // BP_local_array_test_inner
 return;
 }
Index: packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
===
--- packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
+++ packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
@@ -88,8 +88,6 @@
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
-# FIXME: the global case worked before refactoring
-@unittest2.skip("-data-evaluate-expression doesn't work on globals")
 def test_lldbmi_data_read_memory_bytes_global(self):
 """Test that -data-read-memory-bytes can access global buffers."""
 
@@ -115,7 +113,7 @@
 # Test that -data-read-memory-bytes works for char[] type (global)
 self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size))
 self.expect(
-
"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1112131400\"}\]"
 %
+
"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1011121300\"}\]"
 %
 (addr, addr + size))
 
 # Get address of static char[]
@@ -127,7 +125,7 @@
 # Test that -data-read-memory-bytes works for static char[] type
 self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size))
 self.expect(
-
"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1112131400\"}\]"
 %
+
"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"2021222300\"}\]"
 %
 (addr, addr + size))
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows


Index: packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
===
--- packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
+++ packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
@@ -17,6 +17,8 @@
 {
 char array[] = { 0x01, 0x02, 0x03, 0x04 };
 char *first_element_ptr = &array[0];
+char g = g_CharArray[0];
+char s = s_CharArray[0];
 // BP_local_array_test_inner
 return;
 }
Index: packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
===
--- packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
+++ packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
@@ -88,8 +88,6 @@
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-# FIXME: the global case worked before refactoring
-@unittest2.skip("-data-evaluate-expression doesn't work on globals")
 def test_lldbmi_data_read_memory_bytes_global(self):
 """Test that -data-read-memory-bytes can access global buffers."""
 
@@ -115,7 +113,7 @@
 # Test that -data-read-memory-bytes works for char[] type (global)
 self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size))
 self.expect(
-"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1112131400\"}\]" %
+"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1011121300\"}\]" %
 (addr, addr + size))
 
 # Get address of static char[]
@@ -127,7 +125,7 @@
 # Test that -data-read-memory-bytes works for static char[] type
 self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size))
 self.expect(
-"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1112131400\"}\]" %
+"\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"2021222300\"}\]" %
 (addr, addr + size))
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows

[Lldb-commits] [PATCH] D37527: Fix for bug 34510 - Minidump target does not resolve new symbols correctly

2017-09-06 Thread Adrian McCarthy via Phabricator via lldb-commits
amccarth accepted this revision.
amccarth added a comment.
This revision is now accepted and ready to land.

This looks fine.

Make sure you've run the LLDB tests.  I don't expect this change to have much 
risk for breaking any of them, but it's a good habit.  `ninja check-lldb`

For future patch reviews, please create the diffs with full context (e.g., `git 
diff -U99`) and from the root of your source tree so that Phabricator shows 
paths rather than just file names.

If you're not using arc, make sure you amend your commit so that the 
description has a line like this:

  `Differential Revision: https://reviews.llvm.org/D37527`

Capitalization and spacing are sensitive in those lines.  When you push your 
change, that'll associate the revision with the review and close the review on 
the Phabricator side.

You can also mention the bug number in the description.


Repository:
  rL LLVM

https://reviews.llvm.org/D37527



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


[Lldb-commits] [PATCH] D37527: Fix for bug 34510 - Minidump target does not resolve new symbols correctly

2017-09-06 Thread Dimitar Vlahovski via Phabricator via lldb-commits
dvlahovski accepted this revision.
dvlahovski added a comment.

LGTM


Repository:
  rL LLVM

https://reviews.llvm.org/D37527



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