[Lldb-commits] [lldb] r327865 - Xcode: Include DWARFUnit.{h, cpp} in the build

2018-03-19 Thread Vedant Kumar via lldb-commits
Author: vedantk
Date: Mon Mar 19 09:24:58 2018
New Revision: 327865

URL: http://llvm.org/viewvc/llvm-project?rev=327865&view=rev
Log:
Xcode: Include DWARFUnit.{h,cpp} in the build

This should address a bot failure due to r327809.

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

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=327865&r1=327864&r2=327865&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Mar 19 09:24:58 2018
@@ -774,6 +774,8 @@
6D99A3631BBC2F3200979793 /* ArmUnwindInfo.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp 
*/; };
6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */; };
6DEC6F391BD66D750091ABA6 /* TaskPool.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */; };
+   7F2AAA5A20601BE000A422D8 /* DWARFUnit.h in CopyFiles */ = {isa 
= PBXBuildFile; fileRef = 7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */; };
+   7F2AAA5B20601BE000A422D8 /* DWARFUnit.cpp in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */; };
7F94D7182040A13A006EE3EA /* CleanUpTest.cpp in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 7F94D7172040A13A006EE3EA /* CleanUpTest.cpp */; 
};
8C26C4261C3EA5F90031DF7C /* TSanRuntime.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 8C26C4241C3EA4340031DF7C /* TSanRuntime.cpp */; 
};
8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp 
*/; };
@@ -1247,7 +1249,9 @@
dstPath = "$(DEVELOPER_INSTALL_DIR)/usr/share/man/man1";
dstSubfolderSpec = 0;
files = (
+   7F2AAA5A20601BE000A422D8 /* DWARFUnit.h in 
CopyFiles */,
7F94D7182040A13A006EE3EA /* CleanUpTest.cpp in 
CopyFiles */,
+   7F2AAA5B20601BE000A422D8 /* DWARFUnit.cpp in 
CopyFiles */,
AF90106515AB7D3600FF120D /* lldb.1 in CopyFiles 
*/,
);
runOnlyForDeploymentPostprocessing = 1;
@@ -2682,6 +2686,8 @@
6D9AB3DE1BB2B76B003F2289 /* TypeMap.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeMap.h; path = 
include/lldb/Symbol/TypeMap.h; sourceTree = ""; };
6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = TaskPool.cpp; path = source/Host/common/TaskPool.cpp; sourceTree = 
""; };
6DEC6F3A1BD66D950091ABA6 /* TaskPool.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
TaskPool.h; path = include/lldb/Host/TaskPool.h; sourceTree = ""; };
+   7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
DWARFUnit.h; sourceTree = ""; };
+   7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = DWARFUnit.cpp; sourceTree = ""; };
7F94D7172040A13A006EE3EA /* CleanUpTest.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = CleanUpTest.cpp; sourceTree = ""; };
8C26C4241C3EA4340031DF7C /* TSanRuntime.cpp */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
TSanRuntime.cpp; path = TSan/TSanRuntime.cpp; sourceTree = ""; };
8C26C4251C3EA4340031DF7C /* TSanRuntime.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TSanRuntime.h; 
path = TSan/TSanRuntime.h; sourceTree = ""; };
@@ -3875,6 +3881,8 @@
260C89B210F57C5600BB2B04 /* DWARF */ = {
isa = PBXGroup;
children = (
+   7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */,
+   7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */,
6D95DC031B9DC06F000E318A /* DIERef.h */,
6D95DC041B9DC06F000E318A /* 
SymbolFileDWARFDwo.h */,
6D95DBFD1B9DC057000E318A /* DIERef.cpp */,


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


Re: [Lldb-commits] [PATCH] D44526: [dotest] Clean up test folder clean-up

2018-03-19 Thread Greg Clayton via lldb-commits
I would be nice to have the option to nuke each test build directory if the 
test passed. Can be an option that we specify. That way, the only folders left 
over could be the tests that are failing. The options doesn't need to default 
to true, but if anyone is in that code and would know how to do that, that 
would be a great option to have. This option could also clean up the log 
directory and remove any logs for tests that succeeded or were skipped. I alway 
have to go and nuke these files manually.


Greg

> On Mar 15, 2018, at 10:38 AM, Adrian Prantl via Phabricator via lldb-commits 
>  wrote:
> 
> aprantl accepted this revision.
> aprantl added a comment.
> This revision is now accepted and ready to land.
> 
> Thanks! I think this makes sense.
> 
> 
> 
> 
> Comment at: packages/Python/lldbsuite/test/lldbtest.py:707
> +"""Create the test-specific working directory, deleting any previous
> +contents."""
> # See also dotest.py which sets up ${LLDB_BUILD}.
> 
> I was thinking whether this was necessary, since we could just `rm -rf` the 
> entire --build-dir, but for running individual tests, doing it this way makes 
> it easier.
> 
> 
> 
> Comment at: test/CMakeLists.txt:9
>   add_custom_target(${name}
> # Clear the test directory first.
> COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS}
> 
> That comment is obsolete now?
> 
> 
> https://reviews.llvm.org/D44526
> 
> 
> 
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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


[Lldb-commits] [PATCH] D44526: [dotest] Clean up test folder clean-up

2018-03-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added subscribers: labath, clayborg.
clayborg added a comment.

I would be nice to have the option to nuke each test build directory if the 
test passed. Can be an option that we specify. That way, the only folders left 
over could be the tests that are failing. The options doesn't need to default 
to true, but if anyone is in that code and would know how to do that, that 
would be a great option to have. This option could also clean up the log 
directory and remove any logs for tests that succeeded or were skipped. I alway 
have to go and nuke these files manually.

Greg


Repository:
  rL LLVM

https://reviews.llvm.org/D44526



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


[Lldb-commits] [PATCH] D44613: Support template template parameters

2018-03-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments.



Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2043
+is_template_template_argument = true;
+[[clang::fallthrough]];
   case DW_TAG_template_type_parameter:

Shouldn't we be using a #define so this works on any compiler?



Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2093
+  if (!is_template_template_argument) {
+assert(clang_type && "AST context could not provide void type.");
 bool is_signed = false;

Do we really want to kill the program here? lldbassert would be better IMHO. 
Templates are one of the most contentious areas of the DWARF from compiler to 
compiler and I would rather we not crash when we can't successfully dig out a 
type from DWO/DWZ/type units/-gmodules etc...


https://reviews.llvm.org/D44613



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


[Lldb-commits] [PATCH] D44613: Support template template parameters

2018-03-19 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments.



Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2043
+is_template_template_argument = true;
+[[clang::fallthrough]];
   case DW_TAG_template_type_parameter:

clayborg wrote:
> Shouldn't we be using a #define so this works on any compiler?
You're right. I had looked in clang to see if it was used like this, but I 
think the many instances I saw were in the test directory. 



Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2093
+  if (!is_template_template_argument) {
+assert(clang_type && "AST context could not provide void type.");
 bool is_signed = false;

clayborg wrote:
> Do we really want to kill the program here? lldbassert would be better IMHO. 
> Templates are one of the most contentious areas of the DWARF from compiler to 
> compiler and I would rather we not crash when we can't successfully dig out a 
> type from DWO/DWZ/type units/-gmodules etc...
Well, the lines above are   
> if (!clang_type)
> clang_type = m_ast.GetBasicType(eBasicTypeVoid);

I could add a test and a return false like it was before, but it seems pretty 
silly to expect anything when you can't even figure out the builtin void type


https://reviews.llvm.org/D44613



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


[Lldb-commits] [lldb] r327893 - [ClangASTContext] Remove dead code. NFCI.

2018-03-19 Thread Davide Italiano via lldb-commits
Author: davide
Date: Mon Mar 19 12:35:20 2018
New Revision: 327893

URL: http://llvm.org/viewvc/llvm-project?rev=327893&view=rev
Log:
[ClangASTContext] Remove dead code. NFCI.

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

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=327893&r1=327892&r2=327893&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Mon Mar 19 12:35:20 2018
@@ -2121,51 +2121,6 @@ ClangASTContext::CreateEnumerationType(c
   return CompilerType();
 }
 
-// Disable this for now since I can't seem to get a nicely formatted float
-// out of the APFloat class without just getting the float, double or quad
-// and then using a formatted print on it which defeats the purpose. We ideally
-// would like to get perfect string values for any kind of float semantics
-// so we can support remote targets. The code below also requires a patch to
-// llvm::APInt.
-// bool
-// ClangASTContext::ConvertFloatValueToString (ASTContext *ast,
-// lldb::opaque_compiler_type_t clang_type, const uint8_t* bytes, size_t
-// byte_size, int apint_byte_order, std::string &float_str)
-//{
-//  uint32_t count = 0;
-//  bool is_complex = false;
-//  if (ClangASTContext::IsFloatingPointType (clang_type, count, is_complex))
-//  {
-//  unsigned num_bytes_per_float = byte_size / count;
-//  unsigned num_bits_per_float = num_bytes_per_float * 8;
-//
-//  float_str.clear();
-//  uint32_t i;
-//  for (i=0; i 0)
-//  {
-//  if (i > 0)
-//  float_str.append(", ");
-//  float_str.append(s);
-//  if (i == 1 && is_complex)
-//  float_str.append(1, 'i');
-//  }
-//  }
-//  return !float_str.empty();
-//  }
-//  return false;
-//}
-
 CompilerType ClangASTContext::GetIntTypeFromBitSize(clang::ASTContext *ast,
 size_t bit_size,
 bool is_signed) {


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


[Lldb-commits] [PATCH] D44455: [SymbolFilePDB] Remove a few null pointer checks by passing ref

2018-03-19 Thread Zachary Turner via Phabricator via lldb-commits
zturner accepted this revision.
zturner added a comment.
This revision is now accepted and ready to land.

Feel free to use your own judgement, and if you think it doesn't pass some 
complexity threshold, you can just submit without review and we can do 
post-commit review.


Repository:
  rL LLVM

https://reviews.llvm.org/D44455



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


[Lldb-commits] [lldb] r327906 - [test] Skip flaky tests in TestMiSyntax on Darwin

2018-03-19 Thread Vedant Kumar via lldb-commits
Author: vedantk
Date: Mon Mar 19 13:50:50 2018
New Revision: 327906

URL: http://llvm.org/viewvc/llvm-project?rev=327906&view=rev
Log:
[test] Skip flaky tests in TestMiSyntax on Darwin

These tests tend to time out locally and on our bots.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py?rev=327906&r1=327905&r2=327906&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py 
Mon Mar 19 13:50:50 2018
@@ -19,6 +19,7 @@ class MiSyntaxTestCase(lldbmi_testcase.M
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
 @skipIfRemote   # We do not currently support remote debugging via the MI.
+@skipIfDarwin
 def test_lldbmi_tokens(self):
 """Test that 'lldb-mi --interpreter' prints command tokens."""
 
@@ -43,6 +44,7 @@ class MiSyntaxTestCase(lldbmi_testcase.M
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
 @skipIfRemote   # We do not currently support remote debugging via the MI.
+@skipIfDarwin
 def test_lldbmi_specialchars(self):
 """Test that 'lldb-mi --interpreter' handles complicated strings."""
 
@@ -68,6 +70,7 @@ class MiSyntaxTestCase(lldbmi_testcase.M
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@skipIfDarwin
 @skipIfRemote   # We do not currently support remote debugging via the MI.
 def test_lldbmi_output_grammar(self):
 """Test that 'lldb-mi --interpreter' uses standard output syntax."""


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


[Lldb-commits] [lldb] r327905 - [test] Skip flaky TestThreadStates tests on Darwin

2018-03-19 Thread Vedant Kumar via lldb-commits
Author: vedantk
Date: Mon Mar 19 13:50:49 2018
New Revision: 327905

URL: http://llvm.org/viewvc/llvm-project?rev=327905&view=rev
Log:
[test] Skip flaky TestThreadStates tests on Darwin

These tests do not pass/fail consistently, so just skip them.

This is llvm.org/pr15824 & rdar://problem/28557237.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py?rev=327905&r1=327904&r2=327905&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
 Mon Mar 19 13:50:49 2018
@@ -21,9 +21,7 @@ class ThreadStateTestCase(TestBase):
 @expectedFailureAll(
 oslist=["linux"],
 bugnumber="llvm.org/pr15824 thread states not properly maintained")
-@expectedFailureAll(
-oslist=lldbplatformutil.getDarwinOSTriples(),
-bugnumber="llvm.org/pr15824 thread states not properly maintained and 
")
+@skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and 

 @expectedFailureAll(
 oslist=["freebsd"],
 bugnumber="llvm.org/pr18190 thread states not properly maintained")
@@ -58,6 +56,7 @@ class ThreadStateTestCase(TestBase):
 @expectedFailureAll(
 oslist=["windows"],
 bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+@skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and 

 def test_process_interrupt(self):
 """Test process interrupt."""
 self.build(dictionary=self.getBuildFlags(use_cpp11=False))
@@ -68,6 +67,7 @@ class ThreadStateTestCase(TestBase):
 @expectedFailureAll(
 oslist=["windows"],
 bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+@skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and 

 def test_process_state(self):
 """Test thread states (comprehensive)."""
 self.build(dictionary=self.getBuildFlags(use_cpp11=False))


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


[Lldb-commits] [lldb] r327913 - Add DWARFUnit.cpp to the correct target.

2018-03-19 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Mon Mar 19 14:55:48 2018
New Revision: 327913

URL: http://llvm.org/viewvc/llvm-project?rev=327913&view=rev
Log:
Add DWARFUnit.cpp to the correct target.

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

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=327913&r1=327912&r2=327913&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Mar 19 14:55:48 2018
@@ -774,8 +774,6 @@
6D99A3631BBC2F3200979793 /* ArmUnwindInfo.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp 
*/; };
6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */; };
6DEC6F391BD66D750091ABA6 /* TaskPool.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */; };
-   7F2AAA5A20601BE000A422D8 /* DWARFUnit.h in CopyFiles */ = {isa 
= PBXBuildFile; fileRef = 7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */; };
-   7F2AAA5B20601BE000A422D8 /* DWARFUnit.cpp in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */; };
7F94D7182040A13A006EE3EA /* CleanUpTest.cpp in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 7F94D7172040A13A006EE3EA /* CleanUpTest.cpp */; 
};
8C26C4261C3EA5F90031DF7C /* TSanRuntime.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 8C26C4241C3EA4340031DF7C /* TSanRuntime.cpp */; 
};
8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp 
*/; };
@@ -1023,6 +1021,7 @@
AFDBC36E204663AF00B9C8F2 /* EmulateInstructionPPC64.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = AFDBC36C204663AF00B9C8F2 /* 
EmulateInstructionPPC64.cpp */; };
AFDCDBCB19DD0F42005EA55E /* SBExecutionContext.h in Headers */ 
= {isa = PBXBuildFile; fileRef = 940B02F419DC96CB00AD0F52 /* 
SBExecutionContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
AFDFDFD119E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp 
in Sources */ = {isa = PBXBuildFile; fileRef = AFDFDFD019E34D3400EAE509 /* 
ConnectionFileDescriptorPosix.cpp */; };
+   AFE228832060699D0042D0C8 /* DWARFUnit.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */; };
AFEC3362194A8ABA00FF05C6 /* StructuredData.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp 
*/; };
AFEC5FD81D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp 
in Sources */ = {isa = PBXBuildFile; fileRef = AFEC5FD51D94F9380076A480 /* 
Testx86AssemblyInspectionEngine.cpp */; };
AFF87C87150FF669000E1742 /* com.apple.debugserver.plist in 
CopyFiles */ = {isa = PBXBuildFile; fileRef = AFF87C86150FF669000E1742 /* 
com.apple.debugserver.plist */; };
@@ -1249,9 +1248,7 @@
dstPath = "$(DEVELOPER_INSTALL_DIR)/usr/share/man/man1";
dstSubfolderSpec = 0;
files = (
-   7F2AAA5A20601BE000A422D8 /* DWARFUnit.h in 
CopyFiles */,
7F94D7182040A13A006EE3EA /* CleanUpTest.cpp in 
CopyFiles */,
-   7F2AAA5B20601BE000A422D8 /* DWARFUnit.cpp in 
CopyFiles */,
AF90106515AB7D3600FF120D /* lldb.1 in CopyFiles 
*/,
);
runOnlyForDeploymentPostprocessing = 1;
@@ -3881,8 +3878,6 @@
260C89B210F57C5600BB2B04 /* DWARF */ = {
isa = PBXGroup;
children = (
-   7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */,
-   7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */,
6D95DC031B9DC06F000E318A /* DIERef.h */,
6D95DC041B9DC06F000E318A /* 
SymbolFileDWARFDwo.h */,
6D95DBFD1B9DC057000E318A /* DIERef.cpp */,
@@ -3935,6 +3930,8 @@
260C89D210F57C5600BB2B04 /* 
DWARFDIECollection.h */,
260C89D310F57C5600BB2B04 /* DWARFFormValue.cpp 
*/,
260C89D410F57C5600BB2B04 /* DWARFFormValue.h */,
+   7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */,
+   7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */,
26A0DA4D140F721D006DA411 /* HashedNameToDIE.h 
*/,
26109B3B1155D70100CC3529 /* LogChannelDWARF.cpp 
*/,
   

[Lldb-commits] [lldb] r327915 - Add the ios-mini target to the top-level xcodeproj, which builds

2018-03-19 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Mon Mar 19 15:04:45 2018
New Revision: 327915

URL: http://llvm.org/viewvc/llvm-project?rev=327915&view=rev
Log:
Add the ios-mini target to the top-level xcodeproj, which builds
the debugserver-mini target in debugserver.  Add a new plist
which needs to be installed for debugserver-mini.
 

Added:

lldb/trunk/tools/debugserver/source/remotectl_com.apple.internal.xpc.remote.debugserver.plist
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=327915&r1=327914&r2=327915&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Mar 19 15:04:45 2018
@@ -50,6 +50,18 @@
name = ios;
productName = ios;
};
+   AFA9B71120606A13008E86C6 /* ios-mini */ = {
+   isa = PBXAggregateTarget;
+   buildConfigurationList = AFA9B71F20606A13008E86C6 /* 
Build configuration list for PBXAggregateTarget "ios-mini" */;
+   buildPhases = (
+   AFA9B71820606A13008E86C6 /* CopyFiles */,
+   );
+   dependencies = (
+   AFA9B71220606A13008E86C6 /* PBXTargetDependency 
*/,
+   );
+   name = "ios-mini";
+   productName = ios;
+   };
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
@@ -1003,6 +1015,7 @@
AF9B8F33182DB52900DA866F /* SystemRuntimeMacOSX.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = AF9B8F31182DB52900DA866F /* 
SystemRuntimeMacOSX.cpp */; };
AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */; 
};
AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */; 
};
+   AFA9B72820606A5F008E86C6 /* 
remotectl_com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = AFA9B72720606A5F008E86C6 /* 
remotectl_com.apple.internal.xpc.remote.debugserver.plist */; };
AFAFD80A1E57E1B90017A14F /* ModuleCacheTest.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp 
*/; };
AFB3D2801AC262AB003B4B30 /* MICmdCmdGdbShow.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp 
*/; };
AFC234091AF85CE100CDE8B6 /* CommandObjectLanguage.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = AFC234061AF85CE000CDE8B6 /* 
CommandObjectLanguage.cpp */; };
@@ -1194,6 +1207,13 @@
remoteGlobalIDString = 26DC6A0F1337FE6900FF7998;
remoteInfo = "lldb-server";
};
+   AFA9B71320606A13008E86C6 /* PBXContainerItemProxy */ = {
+   isa = PBXContainerItemProxy;
+   containerPortal = 265E9BE1115C2BAA00D0DCCB /* 
debugserver.xcodeproj */;
+   proxyType = 1;
+   remoteGlobalIDString = 456F67431AD46CE9002850C2;
+   remoteInfo = "debugserver-mini";
+   };
AFCA21D11D18E556004386B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 265E9BE1115C2BAA00D0DCCB /* 
debugserver.xcodeproj */;
@@ -1253,6 +1273,16 @@
);
runOnlyForDeploymentPostprocessing = 1;
};
+   AFA9B71820606A13008E86C6 /* CopyFiles */ = {
+   isa = PBXCopyFilesBuildPhase;
+   buildActionMask = 8;
+   dstPath = /AppleInternal/Library/LaunchDaemons;
+   dstSubfolderSpec = 0;
+   files = (
+   AFA9B72820606A5F008E86C6 /* 
remotectl_com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */,
+   );
+   runOnlyForDeploymentPostprocessing = 1;
+   };
AFF87C85150FF5CC000E1742 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 8;
@@ -3122,6 +3152,7 @@
AF9B8F32182DB52900DA866F /* SystemRuntimeMacOSX.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SystemRuntimeMacOSX.h; sourceTree = ""; };
AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */ = {is

[Lldb-commits] [lldb] r327918 - I didn't see that SocketAddress.cpp was already being pulled

2018-03-19 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Mon Mar 19 15:55:19 2018
New Revision: 327918

URL: http://llvm.org/viewvc/llvm-project?rev=327918&view=rev
Log:
I didn't see that SocketAddress.cpp was already being pulled
in to debugserver; my re-addition resulted in duplicated
symbols.  Remove my added SocketAddress.cpp, and change the
original one to also be included for the debugserver-mini target.

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

Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=327918&r1=327917&r2=327918&view=diff
==
--- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj 
(original)
+++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Mon Mar 
19 15:55:19 2018
@@ -97,10 +97,9 @@
456F67691AD46CE9002850C2 /* DNBArchImplARM64.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 266B5ECF1460A68200E43F0A /* 
DNBArchImplARM64.cpp */; };
456F676B1AD46CE9002850C2 /* CoreFoundation.framework in 
Frameworks */ = {isa = PBXBuildFile; fileRef = 26ACA3340D3E956300A2120B /* 
CoreFoundation.framework */; settings = {ATTRIBUTES = (Required, ); }; };
49D404621E39260F00570CDC /* Foundation.framework in Frameworks 
*/ = {isa = PBXBuildFile; fileRef = 49D404611E39260F00570CDC /* 
Foundation.framework */; };
-   AF3467C220606B9400824E84 /* SocketAddress.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF3467C120606B9400824E84 /* SocketAddress.cpp 
*/; };
-   AF3467C320606B9400824E84 /* SocketAddress.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF3467C120606B9400824E84 /* SocketAddress.cpp 
*/; };
AF48558C1D75126800D19C07 /* StdStringExtractor.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = AF48558B1D75126800D19C07 /* 
StdStringExtractor.cpp */; };
AF48558D1D75127500D19C07 /* StdStringExtractor.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = AF48558B1D75126800D19C07 /* 
StdStringExtractor.cpp */; };
+   AF588449206077BD00A0CB5A /* SocketAddress.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = D6631CA81E848FE9006A7B11 /* SocketAddress.cpp 
*/; };
AFA3FCA11E39984900218D5E /* Foundation.framework in Frameworks 
*/ = {isa = PBXBuildFile; fileRef = 49D404611E39260F00570CDC /* 
Foundation.framework */; };
AFEC3364194A8B0B00FF05C6 /* Genealogy.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = AFEC3363194A8B0B00FF05C6 /* Genealogy.cpp */; };
D6631CA91E848FE9006A7B11 /* SocketAddress.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = D6631CA81E848FE9006A7B11 /* SocketAddress.cpp 
*/; };
@@ -217,7 +216,6 @@
9457ECF61419864100DFE7D8 /* stack_logging.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stack_logging.h; 
sourceTree = ""; };
AF0934BA18E12B92005A11FD /* Genealogy.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
Genealogy.h; sourceTree = ""; };
AF0934BB18E12B92005A11FD /* GenealogySPI.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
GenealogySPI.h; sourceTree = ""; };
-   AF3467C120606B9400824E84 /* SocketAddress.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = SocketAddress.cpp; path = ../../../source/Host/common/SocketAddress.cpp; 
sourceTree = ""; };
AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = StdStringExtractor.cpp; sourceTree = ""; };
AF61C60418F75ABC00B48D9D /* 
debugserver-macosx-entitlements.plist */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.xml; path = 
"debugserver-macosx-entitlements.plist"; sourceTree = ""; };
AF67ABFF0D34604D0022D128 /* PseudoTerminal.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = PseudoTerminal.cpp; sourceTree = ""; };
@@ -338,7 +336,6 @@
26A028FF114AB6BB0029C479 /* libdebugnub */ = {
isa = PBXGroup;
children = (
-   AF3467C120606B9400824E84 /* SocketAddress.cpp 
*/,
26C637E60C71334A0024798E /* MacOSX */,
260828DE0CBAF7F400F95054 /* DNBRuntimeAction.h 
*/,
26A8FE1E0D11A77B00203048 /* DNBTimer.h */,
@@ -615,7 +612,6 @@
26CE05BB115C363F0022F371 /* DNBRegisterInfo.cpp 
in Sources */,
26CE05BC115C36420022F371 /* PThreadEvent.cpp in 
Sources */,
 

[Lldb-commits] [lldb] r327922 - Rename remotectl_com.apple.internal.xpc.remote.debugserver.plist

2018-03-19 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Mon Mar 19 16:07:31 2018
New Revision: 327922

URL: http://llvm.org/viewvc/llvm-project?rev=327922&view=rev
Log:
Rename remotectl_com.apple.internal.xpc.remote.debugserver.plist
to com.apple.internal.xpc.remote.debugserver.plist, not sure where
that remotectl_ prefix came from.

 

Added:

lldb/trunk/tools/debugserver/source/com.apple.internal.xpc.remote.debugserver.plist
Removed:

lldb/trunk/tools/debugserver/source/remotectl_com.apple.internal.xpc.remote.debugserver.plist
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=327922&r1=327921&r2=327922&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Mar 19 16:07:31 2018
@@ -989,6 +989,7 @@
AF415AE71D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = AF415AE51D949E4400FCE0D4 /* 
x86AssemblyInspectionEngine.cpp */; };
AF415AE81D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h in 
Headers */ = {isa = PBXBuildFile; fileRef = AF415AE61D949E4400FCE0D4 /* 
x86AssemblyInspectionEngine.h */; };
AF45FDE518A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp 
in Sources */ = {isa = PBXBuildFile; fileRef = AF45FDE318A1F3AC0007051C /* 
AppleGetThreadItemInfoHandler.cpp */; };
+   AF5CEC88206079A500384F20 /* 
com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */ = {isa = 
PBXBuildFile; fileRef = AF5CEC87206079A500384F20 /* 
com.apple.internal.xpc.remote.debugserver.plist */; };
AF6335E21C87B21E00F7D554 /* SymbolFilePDB.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp 
*/; };
AF6335E31C87B21E00F7D554 /* SymbolFilePDB.h in Headers */ = 
{isa = PBXBuildFile; fileRef = AF6335E11C87B21E00F7D554 /* SymbolFilePDB.h */; 
};
AF6CA6661FBBAF28005A0DC3 /* ArchSpec.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = AF6CA6651FBBAF27005A0DC3 /* ArchSpec.cpp */; };
@@ -1015,7 +1016,6 @@
AF9B8F33182DB52900DA866F /* SystemRuntimeMacOSX.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = AF9B8F31182DB52900DA866F /* 
SystemRuntimeMacOSX.cpp */; };
AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */; 
};
AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */; 
};
-   AFA9B72820606A5F008E86C6 /* 
remotectl_com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = AFA9B72720606A5F008E86C6 /* 
remotectl_com.apple.internal.xpc.remote.debugserver.plist */; };
AFAFD80A1E57E1B90017A14F /* ModuleCacheTest.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp 
*/; };
AFB3D2801AC262AB003B4B30 /* MICmdCmdGdbShow.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp 
*/; };
AFC234091AF85CE100CDE8B6 /* CommandObjectLanguage.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = AFC234061AF85CE000CDE8B6 /* 
CommandObjectLanguage.cpp */; };
@@ -1279,7 +1279,7 @@
dstPath = /AppleInternal/Library/LaunchDaemons;
dstSubfolderSpec = 0;
files = (
-   AFA9B72820606A5F008E86C6 /* 
remotectl_com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */,
+   AF5CEC88206079A500384F20 /* 
com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
@@ -3110,6 +3110,7 @@
AF45E1FD1BF57C8D000563EB /* PythonTestSuite.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
PythonTestSuite.h; sourceTree = ""; };
AF45FDE318A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; path = AppleGetThreadItemInfoHandler.cpp; sourceTree = 
""; };
AF45FDE418A1F3AC0007051C /* AppleGetThreadItemInfoHandler.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = AppleGetThreadItemInfoHandler.h; sourceTree = ""; 
};
+   AF5CEC87206079A500384F20 /* 
com.apple.internal.xpc.remote.debugserver.plist */ = {isa = PBXFileReference; 
lastKnownFileType = text.plist.xml; name = 
com.apple.in

[Lldb-commits] [lldb] r327924 - Modernize a test.

2018-03-19 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Mon Mar 19 16:15:06 2018
New Revision: 327924

URL: http://llvm.org/viewvc/llvm-project?rev=327924&view=rev
Log:
Modernize a test.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py?rev=327924&r1=327923&r2=327924&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
 Mon Mar 19 16:15:06 2018
@@ -48,35 +48,8 @@ class TestCppIncompleteTypes(TestBase):
 # Get main source file
 src_file = "main.cpp"
 src_file_spec = lldb.SBFileSpec(src_file)
-self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
-# Get the path of the executable
-exe_path = self.getBuildArtifact(exe)
-
-# Load the executable
-target = self.dbg.CreateTarget(exe_path)
-self.assertTrue(target.IsValid(), VALID_TARGET)
-
-# Break on main function
-main_breakpoint = target.BreakpointCreateBySourceRegex(
-"break here", src_file_spec)
-self.assertTrue(
-main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 
1,
-VALID_BREAKPOINT)
-
-# Launch the process
-args = None
-env = None
-process = target.LaunchSimple(
-args, env, self.get_process_working_directory())
-self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
-# Get the thread of the process
-self.assertTrue(
-process.GetState() == lldb.eStateStopped,
-PROCESS_STOPPED)
-thread = lldbutil.get_stopped_thread(
-process, lldb.eStopReasonBreakpoint)
 
+(target, process, thread, main_breakpoint) = 
lldbutil.run_to_source_breakpoint(self, 
+"break here", src_file_spec, exe_name = exe)
 # Get frame for current thread
 return thread.GetSelectedFrame()


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


[Lldb-commits] [PATCH] D42145: [lldb] Use vFlash commands when writing to target's flash memory regions

2018-03-19 Thread Owen Shaw via Phabricator via lldb-commits
owenpshaw added a comment.

In https://reviews.llvm.org/D42145#1034499, @labath wrote:

> I like this a lot. That's the kind of change I wanted to do as a follow-up 
> one day. Thank you.


Thanks!  I don't have commit access to land this.


https://reviews.llvm.org/D42145



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


[Lldb-commits] [PATCH] D44456: [SymbolFilePDB] Simplify getting the source file path

2018-03-19 Thread Aaron Smith via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL327925: [SymbolFilePDB] Simplify getting the source file 
path (authored by asmith, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D44456?vs=138299&id=139032#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D44456

Files:
  lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h

Index: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
===
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
@@ -198,9 +198,6 @@
   void GetCompileUnitIndex(const llvm::pdb::PDBSymbolCompiland &pdb_compiland,
uint32_t &index);
 
-  std::string GetSourceFileNameForPDBCompiland(
-  const llvm::pdb::PDBSymbolCompiland *pdb_compiland);
-
   std::unique_ptr
   GetPDBCompilandByUID(uint32_t uid);
 
Index: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -614,59 +614,6 @@
   return resolved_flags;
 }
 
-std::string SymbolFilePDB::GetSourceFileNameForPDBCompiland(
-const PDBSymbolCompiland *pdb_compiland) {
-  if (!pdb_compiland)
-return std::string();
-
-  std::string source_file_name;
-  // `getSourceFileName` returns the basename of the original source file
-  // used to generate this compiland.  It does not return the full path.
-  // Currently the only way to get that is to do a basename lookup to get the
-  // IPDBSourceFile, but this is ambiguous in the case of two source files
-  // with the same name contributing to the same compiland. This is an edge
-  // case that we ignore for now, although we need to a long-term solution.
-  std::string file_name = pdb_compiland->getSourceFileName();
-  if (!file_name.empty()) {
-auto one_src_file_up =
-m_session_up->findOneSourceFile(pdb_compiland, file_name,
-PDB_NameSearchFlags::NS_CaseInsensitive);
-if (one_src_file_up)
-  source_file_name = one_src_file_up->getFileName();
-  }
-  // For some reason, source file name could be empty, so we will walk through
-  // all source files of this compiland, and determine the right source file
-  // if any that is used to generate this compiland based on language
-  // indicated in compilanddetails language field.
-  if (!source_file_name.empty())
-return source_file_name;
-
-  auto details_up = pdb_compiland->findOneChild();
-  PDB_Lang pdb_lang = details_up ? details_up->getLanguage() : PDB_Lang::Cpp;
-  auto src_files_up =
-  m_session_up->getSourceFilesForCompiland(*pdb_compiland);
-  if (src_files_up) {
-while (auto file_up = src_files_up->getNext()) {
-  FileSpec file_spec(file_up->getFileName(), false,
- FileSpec::ePathSyntaxWindows);
-  auto file_extension = file_spec.GetFileNameExtension();
-  if (pdb_lang == PDB_Lang::Cpp || pdb_lang == PDB_Lang::C) {
-static const char* exts[] = { "cpp", "c", "cc", "cxx" };
-if (llvm::is_contained(exts, file_extension.GetStringRef().lower())) {
-  source_file_name = file_up->getFileName();
-  break;
-}
-  } else if (pdb_lang == PDB_Lang::Masm &&
- ConstString::Compare(file_extension, ConstString("ASM"),
-  false) == 0) {
-source_file_name = file_up->getFileName();
-break;
-  }
-}
-  }
-  return source_file_name;
-}
-
 uint32_t SymbolFilePDB::ResolveSymbolContext(
 const lldb_private::FileSpec &file_spec, uint32_t line, bool check_inlines,
 uint32_t resolve_scope, lldb_private::SymbolContextList &sc_list) {
@@ -690,15 +637,7 @@
   // For inline functions, we don't have to match the FileSpec since they
   // could be defined in headers other than file specified in FileSpec.
   if (!check_inlines) {
-// `getSourceFileName` returns the basename of the original source file
-// used to generate this compiland.  It does not return the full path.
-// Currently the only way to get that is to do a basename lookup to get
-// the IPDBSourceFile, but this is ambiguous in the case of two source
-// files with the same name contributing to the same compiland.  This is
-// a moderately extreme edge case, so we consider this OK for now,
-// although we need to find a long-term solution.
-std::string source_file =
-GetSourceFileNameForPDBCompiland(compiland.get());
+std::string source_file = compiland->getSourceFileFullPath();
 if (source_file.e

Re: [Lldb-commits] [lldb] r327924 - Modernize a test.

2018-03-19 Thread Davide Italiano via lldb-commits
On Mon, Mar 19, 2018 at 4:15 PM, Jim Ingham via lldb-commits
 wrote:
> Author: jingham
> Date: Mon Mar 19 16:15:06 2018
> New Revision: 327924
>
> URL: http://llvm.org/viewvc/llvm-project?rev=327924&view=rev
> Log:
> Modernize a test.
>
> Modified:
> 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
>
> Modified: 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py?rev=327924&r1=327923&r2=327924&view=diff
> ==
> --- 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
>  (original)
> +++ 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
>  Mon Mar 19 16:15:06 2018
> @@ -48,35 +48,8 @@ class TestCppIncompleteTypes(TestBase):
>  # Get main source file
>  src_file = "main.cpp"
>  src_file_spec = lldb.SBFileSpec(src_file)
> -self.assertTrue(src_file_spec.IsValid(), "Main source file")
> -
> -# Get the path of the executable
> -exe_path = self.getBuildArtifact(exe)
> -
> -# Load the executable
> -target = self.dbg.CreateTarget(exe_path)
> -self.assertTrue(target.IsValid(), VALID_TARGET)
> -
> -# Break on main function
> -main_breakpoint = target.BreakpointCreateBySourceRegex(
> -"break here", src_file_spec)
> -self.assertTrue(
> -main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() 
> >= 1,
> -VALID_BREAKPOINT)
> -
> -# Launch the process
> -args = None
> -env = None
> -process = target.LaunchSimple(
> -args, env, self.get_process_working_directory())
> -self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
> -
> -# Get the thread of the process
> -self.assertTrue(
> -process.GetState() == lldb.eStateStopped,
> -PROCESS_STOPPED)
> -thread = lldbutil.get_stopped_thread(
> -process, lldb.eStopReasonBreakpoint)
>
> +(target, process, thread, main_breakpoint) = 
> lldbutil.run_to_source_breakpoint(self,
> +"break here", src_file_spec, exe_name = exe)
>  # Get frame for current thread
>  return thread.GetSelectedFrame()
>

Thanks. I was actually adding a new test and complaining to myself
that there was too much boilerplate.
This helper clearly makes things much better. It's probably worth
documenting it somewhere? What do you think?

Thanks!

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


Re: [Lldb-commits] [lldb] r327924 - Modernize a test.

2018-03-19 Thread Jim Ingham via lldb-commits
Yes, I should have written this function much earlier.  I've been trying to 
convert over to it every time a tests draws my attention (in this case 'cause I 
pointed it out for you to copy...)

It is the way to make a test in the sample_test/TestSampleTest.py.  That seemed 
the most effective way to draw it to people's attention.

We could also document it in the README-testsuite as well, after the line 
recommending that you use the sample_test, but my experience is that people 
don't much read that doc?  

Might also be worth a mention in the Projects doc - convert all relevant tests 
to use run_to_source_breakpoint...

I can't think of another prominent place to put docs for it.  Maybe if 
lldbutil.py had a header that lists the most important routines that module 
provides, people might run across it there.

As a new person coming to the code base, where would you have looked to find 
this?

Jim

> On Mar 19, 2018, at 6:31 PM, Davide Italiano  wrote:
> 
> On Mon, Mar 19, 2018 at 4:15 PM, Jim Ingham via lldb-commits
>  wrote:
>> Author: jingham
>> Date: Mon Mar 19 16:15:06 2018
>> New Revision: 327924
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=327924&view=rev
>> Log:
>> Modernize a test.
>> 
>> Modified:
>>
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
>> 
>> Modified: 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py?rev=327924&r1=327923&r2=327924&view=diff
>> ==
>> --- 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
>>  (original)
>> +++ 
>> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
>>  Mon Mar 19 16:15:06 2018
>> @@ -48,35 +48,8 @@ class TestCppIncompleteTypes(TestBase):
>> # Get main source file
>> src_file = "main.cpp"
>> src_file_spec = lldb.SBFileSpec(src_file)
>> -self.assertTrue(src_file_spec.IsValid(), "Main source file")
>> -
>> -# Get the path of the executable
>> -exe_path = self.getBuildArtifact(exe)
>> -
>> -# Load the executable
>> -target = self.dbg.CreateTarget(exe_path)
>> -self.assertTrue(target.IsValid(), VALID_TARGET)
>> -
>> -# Break on main function
>> -main_breakpoint = target.BreakpointCreateBySourceRegex(
>> -"break here", src_file_spec)
>> -self.assertTrue(
>> -main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() 
>> >= 1,
>> -VALID_BREAKPOINT)
>> -
>> -# Launch the process
>> -args = None
>> -env = None
>> -process = target.LaunchSimple(
>> -args, env, self.get_process_working_directory())
>> -self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
>> -
>> -# Get the thread of the process
>> -self.assertTrue(
>> -process.GetState() == lldb.eStateStopped,
>> -PROCESS_STOPPED)
>> -thread = lldbutil.get_stopped_thread(
>> -process, lldb.eStopReasonBreakpoint)
>> 
>> +(target, process, thread, main_breakpoint) = 
>> lldbutil.run_to_source_breakpoint(self,
>> +"break here", src_file_spec, exe_name = exe)
>> # Get frame for current thread
>> return thread.GetSelectedFrame()
>> 
> 
> Thanks. I was actually adding a new test and complaining to myself
> that there was too much boilerplate.
> This helper clearly makes things much better. It's probably worth
> documenting it somewhere? What do you think?
> 
> Thanks!
> 
> --
> Davide

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


Re: [Lldb-commits] [lldb] r327924 - Modernize a test.

2018-03-19 Thread Davide Italiano via lldb-commits
On Mon, Mar 19, 2018 at 6:38 PM, Jim Ingham  wrote:
> Yes, I should have written this function much earlier.  I've been trying to 
> convert over to it every time a tests draws my attention (in this case 'cause 
> I pointed it out for you to copy...)
>
> It is the way to make a test in the sample_test/TestSampleTest.py.  That 
> seemed the most effective way to draw it to people's attention.
>
> We could also document it in the README-testsuite as well, after the line 
> recommending that you use the sample_test, but my experience is that people 
> don't much read that doc?
>
> Might also be worth a mention in the Projects doc - convert all relevant 
> tests to use run_to_source_breakpoint...
>
> I can't think of another prominent place to put docs for it.  Maybe if 
> lldbutil.py had a header that lists the most important routines that module 
> provides, people might run across it there.
>
> As a new person coming to the code base, where would you have looked to find 
> this?
>

I (but I can't speak for everybody of course :) generally look at
other tests so having everything converted to the new style would
help.
That said, having maybe a doc for test best practices & how to debug
now that we're building a pretty decent infrastructure would help
At least, if we have it, in the code reviews we can just paste a link
instead of repeating the same set of facts over and over (and
eventually enough people will see it that they'll learn :)
.
I'd mention, among others:
a) inline tests (IMHO, completely change the way of writing test, much
more concise and nicer for the "common" case)
b) Jonas' work on lldb-dotest (for people running CMake build, another
game changer as you don't have to worry about the location of your
executables when reproducing issues)
c) common utilities (like the one you recommended)
d) how to drop into a python debugger (Adrian taught this to me and I
need to ask him all the time because I forget)

I'll add this to my TODO list, unless somebody beats me to the punch
(as my work queue is an append-only data structure these days).

Thanks!

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


Re: [Lldb-commits] [lldb] r327924 - Modernize a test.

2018-03-19 Thread Jim Ingham via lldb-commits
So that file you are looking for is 
"packages/Python/lldbsuite/test/README-testsuite.  It would be great to have a 
fresh pair of eyes look this over and add whatever you would have found 
useful...

Jim


> On Mar 19, 2018, at 6:44 PM, Davide Italiano  wrote:
> 
> On Mon, Mar 19, 2018 at 6:38 PM, Jim Ingham  wrote:
>> Yes, I should have written this function much earlier.  I've been trying to 
>> convert over to it every time a tests draws my attention (in this case 
>> 'cause I pointed it out for you to copy...)
>> 
>> It is the way to make a test in the sample_test/TestSampleTest.py.  That 
>> seemed the most effective way to draw it to people's attention.
>> 
>> We could also document it in the README-testsuite as well, after the line 
>> recommending that you use the sample_test, but my experience is that people 
>> don't much read that doc?
>> 
>> Might also be worth a mention in the Projects doc - convert all relevant 
>> tests to use run_to_source_breakpoint...
>> 
>> I can't think of another prominent place to put docs for it.  Maybe if 
>> lldbutil.py had a header that lists the most important routines that module 
>> provides, people might run across it there.
>> 
>> As a new person coming to the code base, where would you have looked to find 
>> this?
>> 
> 
> I (but I can't speak for everybody of course :) generally look at
> other tests so having everything converted to the new style would
> help.
> That said, having maybe a doc for test best practices & how to debug
> now that we're building a pretty decent infrastructure would help
> At least, if we have it, in the code reviews we can just paste a link
> instead of repeating the same set of facts over and over (and
> eventually enough people will see it that they'll learn :)

That file exists, it is:

packages/Python/lldbsuite/test/README-testsuite

but it could certainly use some love.  I wonder if moving it into the www 
directory and linking it on the project page might not make it easier to find?

> .
> I'd mention, among others:
> a) inline tests (IMHO, completely change the way of writing test, much
> more concise and nicer for the "common" case)
> b) Jonas' work on lldb-dotest (for people running CMake build, another
> game changer as you don't have to worry about the location of your
> executables when reproducing issues)
> c) common utilities (like the one you recommended)
> d) how to drop into a python debugger (Adrian taught this to me and I
> need to ask him all the time because I forget)
> 
> I'll add this to my TODO list, unless somebody beats me to the punch
> (as my work queue is an append-only data structure these days).

These all sound great!  

Jim

> 
> Thanks!
> 
> --
> Davide

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


[Lldb-commits] [lldb] r327941 - Add a suggestion to convert dotest tests to use run_to_source_breakpoint.

2018-03-19 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Mon Mar 19 19:15:23 2018
New Revision: 327941

URL: http://llvm.org/viewvc/llvm-project?rev=327941&view=rev
Log:
Add a suggestion to convert dotest tests to use run_to_source_breakpoint.

Modified:
lldb/trunk/www/projects.html

Modified: lldb/trunk/www/projects.html
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/www/projects.html?rev=327941&r1=327940&r2=327941&view=diff
==
--- lldb/trunk/www/projects.html (original)
+++ lldb/trunk/www/projects.html Mon Mar 19 19:15:23 2018
@@ -403,6 +403,20 @@
 
 
 
+  Convert the dotest style tests 
to use lldbutil.run_to_source_breakpoint.
+
+  
+run_to_source_breakpoint & 
run_to_name_breakpoint provide a compact API that
+does in one line what the 
first 10 or 20 lines of most of the old tests now do by
+hand.  Using these functions 
makes tests much more readable, and by centralizing
+common functionality will make 
maintaining the testsuites easier in the future.
+This is more of a finger 
exercise, and perhaps best implemented by a rule like:
+"If you touch a test case, 
and it isn't using run_to_source_breakpoint, please
+make it do so".
+  
+
+
+
   Unify Watchpoint's & 
Breakpoints.  
   
 Option handling isn't shared, 
and more importantly the PerformAction's have a lot 


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