Re: [Lldb-commits] [lldb] r330314 - Attempt to fix TestMiniDump on windows
On Thu, 19 Apr 2018 at 18:11, Leonard Mosescu wrote: > The mix of backward and forward slashes doesn't impact my current project but it would be nice to have a consistent path syntax (both within a single path and also cross platforms). >> Leonard, is it reasonable to assume that all paths in the minidumps will be >> absolute (and thus resolving is pointless anyway)? > Yes. Mostly :) For non-Windows minidumps the way we capture module names is a bit fuzzy (we depend on loader data structures and things like /proc/self/maps). > What exactly does "resolving the path" means here? Breaking down into path components and re-assembling it doesn't seem particularly interesting. It is pretty much what "realpath" does, but we also have some additional logic to handle ~ and such. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r330405 - Move FileSpecTest to Utility
Author: labath Date: Fri Apr 20 01:27:27 2018 New Revision: 330405 URL: http://llvm.org/viewvc/llvm-project?rev=330405&view=rev Log: Move FileSpecTest to Utility FileSpec class was moved to the Utility module a while ago, but the test file was left behind. This corrects that. Added: lldb/trunk/unittests/Utility/FileSpecTest.cpp - copied, changed from r330314, lldb/trunk/unittests/Host/FileSpecTest.cpp Removed: lldb/trunk/unittests/Host/FileSpecTest.cpp Modified: lldb/trunk/unittests/Host/CMakeLists.txt lldb/trunk/unittests/Utility/CMakeLists.txt Modified: lldb/trunk/unittests/Host/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/CMakeLists.txt?rev=330405&r1=330404&r2=330405&view=diff == --- lldb/trunk/unittests/Host/CMakeLists.txt (original) +++ lldb/trunk/unittests/Host/CMakeLists.txt Fri Apr 20 01:27:27 2018 @@ -1,5 +1,4 @@ set (FILES - FileSpecTest.cpp FileSystemTest.cpp HostInfoTest.cpp HostTest.cpp Removed: lldb/trunk/unittests/Host/FileSpecTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/FileSpecTest.cpp?rev=330404&view=auto == --- lldb/trunk/unittests/Host/FileSpecTest.cpp (original) +++ lldb/trunk/unittests/Host/FileSpecTest.cpp (removed) @@ -1,310 +0,0 @@ -//===-- FileSpecTest.cpp *- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===--===// - -#include "gtest/gtest.h" - -#include "lldb/Utility/FileSpec.h" - -using namespace lldb_private; - -TEST(FileSpecTest, FileAndDirectoryComponents) { - FileSpec fs_posix("/foo/bar", false, FileSpec::ePathSyntaxPosix); - EXPECT_STREQ("/foo/bar", fs_posix.GetCString()); - EXPECT_STREQ("/foo", fs_posix.GetDirectory().GetCString()); - EXPECT_STREQ("bar", fs_posix.GetFilename().GetCString()); - - FileSpec fs_windows("F:\\bar", false, FileSpec::ePathSyntaxWindows); - EXPECT_STREQ("F:\\bar", fs_windows.GetCString()); - // EXPECT_STREQ("F:\\", fs_windows.GetDirectory().GetCString()); // It returns - // "F:/" - EXPECT_STREQ("bar", fs_windows.GetFilename().GetCString()); - - FileSpec fs_posix_root("/", false, FileSpec::ePathSyntaxPosix); - EXPECT_STREQ("/", fs_posix_root.GetCString()); - EXPECT_EQ(nullptr, fs_posix_root.GetDirectory().GetCString()); - EXPECT_STREQ("/", fs_posix_root.GetFilename().GetCString()); - - FileSpec fs_windows_drive("F:", false, FileSpec::ePathSyntaxWindows); - EXPECT_STREQ("F:", fs_windows_drive.GetCString()); - EXPECT_EQ(nullptr, fs_windows_drive.GetDirectory().GetCString()); - EXPECT_STREQ("F:", fs_windows_drive.GetFilename().GetCString()); - - FileSpec fs_windows_root("F:\\", false, FileSpec::ePathSyntaxWindows); - EXPECT_STREQ("F:\\", fs_windows_root.GetCString()); - EXPECT_STREQ("F:", fs_windows_root.GetDirectory().GetCString()); - // EXPECT_STREQ("\\", fs_windows_root.GetFilename().GetCString()); // It - // returns "/" - - FileSpec fs_posix_long("/foo/bar/baz", false, FileSpec::ePathSyntaxPosix); - EXPECT_STREQ("/foo/bar/baz", fs_posix_long.GetCString()); - EXPECT_STREQ("/foo/bar", fs_posix_long.GetDirectory().GetCString()); - EXPECT_STREQ("baz", fs_posix_long.GetFilename().GetCString()); - - FileSpec fs_windows_long("F:\\bar\\baz", false, FileSpec::ePathSyntaxWindows); - EXPECT_STREQ("F:\\bar\\baz", fs_windows_long.GetCString()); - // EXPECT_STREQ("F:\\bar", fs_windows_long.GetDirectory().GetCString()); // It - // returns "F:/bar" - EXPECT_STREQ("baz", fs_windows_long.GetFilename().GetCString()); - - FileSpec fs_posix_trailing_slash("/foo/bar/", false, - FileSpec::ePathSyntaxPosix); - EXPECT_STREQ("/foo/bar/.", fs_posix_trailing_slash.GetCString()); - EXPECT_STREQ("/foo/bar", fs_posix_trailing_slash.GetDirectory().GetCString()); - EXPECT_STREQ(".", fs_posix_trailing_slash.GetFilename().GetCString()); - - FileSpec fs_windows_trailing_slash("F:\\bar\\", false, - FileSpec::ePathSyntaxWindows); - EXPECT_STREQ("F:\\bar\\.", fs_windows_trailing_slash.GetCString()); - // EXPECT_STREQ("F:\\bar", - // fs_windows_trailing_slash.GetDirectory().GetCString()); // It returns - // "F:/bar" - EXPECT_STREQ(".", fs_windows_trailing_slash.GetFilename().GetCString()); -} - -TEST(FileSpecTest, AppendPathComponent) { - FileSpec fs_posix("/foo", false, FileSpec::ePathSyntaxPosix); - fs_posix.AppendPathComponent("bar"); - EXPECT_STREQ("/foo/bar", fs_posix.GetCString()); - EXPECT_STREQ("/foo", fs_posix.GetDirectory().GetCString()); - EXPECT_STREQ("bar", fs_posix.GetFilename().GetCString()); - - FileSpec fs_posix_2("/foo", false, FileSpec:
[Lldb-commits] [PATCH] D45333: WIP: [LIT] Have lit run the lldb test suite
alberto_magni added a comment. Hi Jonas, This change is causing a cmake generation-time error on Windows when using Visual Studio as generator: -G "Visual Studio 15 2017 Win64" -Thost=x64 The error is: CMake Error in tools/lldb/test/CMakeLists.txt: Evaluation file to be written multiple times for different configurations or languages with different content: D:/build/master_win/tools/lldb/test/../lit/Suite/lit.site.cfg CMake Error in tools/lldb/test/CMakeLists.txt: Evaluation file to be written multiple times for different configurations or languages with different content: D:/build/master_win/tools/lldb/test/../lit/Suite/lit.site.cfg CMake Error in tools/lldb/test/CMakeLists.txt: Evaluation file to be written multiple times for different configurations or languages with different content: D:/build/master_win/tools/lldb/test/../lit/Suite/lit.site.cfg … and so on Notice everything runs fine when using Ninja as a Generator and clang-cl.exe as compiler: -G Ninja -DCMAKE_CXX_COMPILER=clang-cl.exe -DCMAKE_C_COMPILER=clang-cl.exe Would it be possible for you to repro this ? Let me know if I can help with this. Repository: rL LLVM https://reviews.llvm.org/D45333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D45333: WIP: [LIT] Have lit run the lldb test suite
ted added a comment. @JDevlieghere I'm seeing the same issue as @alberto_magni . The Visual Studio cmake generator gives errors. We're reverting it internally, but it needs to be fixed or reverted ASAP. The issue could be this set of code from test/CMakeLists.txt: configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../lit/Suite/lit.site.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg ) file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg INPUT ${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg ) The equivalent from clang/test/CMakeLists.txt is: configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py MAIN_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py ) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py MAIN_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py ) Repository: rL LLVM https://reviews.llvm.org/D45333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r330450 - Fix a crash when resolving overloads of C++ virtual methods.
Author: adrian Date: Fri Apr 20 10:14:05 2018 New Revision: 330450 URL: http://llvm.org/viewvc/llvm-project?rev=330450&view=rev Log: Fix a crash when resolving overloads of C++ virtual methods. The isOverload() method needs to account for situations where the two methods being compared don't have the same number of arguments. rdar://problem/39542960 Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile?rev=330450&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile Fri Apr 20 10:14:05 2018 @@ -0,0 +1,5 @@ +LEVEL = ../../../make + +CXX_SOURCES := main.cpp + +include $(LEVEL)/Makefile.rules Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py?rev=330450&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py Fri Apr 20 10:14:05 2018 @@ -0,0 +1,3 @@ +from lldbsuite.test import lldbinline + +lldbinline.MakeInlineTest(__file__, globals()) Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp?rev=330450&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp Fri Apr 20 10:14:05 2018 @@ -0,0 +1,17 @@ +// Test that lldb doesn't get confused by an overload of a virtual +// function of the same name. +struct Base { + virtual void f(int i) {} + virtual ~Base() {} +}; + +struct Derived : Base { + virtual void f(int i, int j) {} +}; + +int main(int argc, char **argv) { + Derived obj; + obj.f(1, 2); //% self.expect("fr var", "not crashing", substrs = ["obj"]) + return 0; +} + Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=330450&r1=330449&r2=330450&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri Apr 20 10:14:05 2018 @@ -2170,7 +2170,10 @@ static bool isOverload(clang::CXXMethodD m2p.getUnqualifiedType()); }; - return !std::equal(m1Type->param_type_begin(), m1Type->param_type_end(), + // FIXME: In C++14 and later, we can just pass m2Type->param_type_end() + //as a fourth parameter to std::equal(). + return (m1->getNumParams() != m2->getNumParams()) || + !std::equal(m1Type->param_type_begin(), m1Type->param_type_end(), m2Type->param_type_begin(), compareArgTypes); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D45333: WIP: [LIT] Have lit run the lldb test suite
stella.stamenova added a comment. Since Visual Studio as a Generator supports multiple build configurations, each of the CMakeLists.txt that correspond to lit tests also need to include handling of the build mode unless you can guarantee that all the properties are set correctly before test/CMakeLists.txt is processed. It would be safer, of course, to not rely on build order and always set the correct properties. This is to create project files that allow the build mode to be specified at build/compile time of the project rather than configuration time when CMake is called. So you will need to add something along the lines of (Note: I think these are all the properties you will need, but I have not tested the change, so you will need to make sure this covers all the properties): if (CMAKE_CFG_INTDIR STREQUAL ".") set(LLVM_BUILD_MODE ".") else () set(LLVM_BUILD_MODE "%(build_mode)s") endif () string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_LIBS_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) I suspect you will also need to add handling for the custom c/cxx compiler options. You can look at: `lldb/lit/lit.site.cfg.in` and `lldb/lit/CMakeLists.txt` for the details. Repository: rL LLVM https://reviews.llvm.org/D45333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r330460 - Fix the Xcode gtest target for the move of FileSpecTest.cpp.
Author: jingham Date: Fri Apr 20 11:30:31 2018 New Revision: 330460 URL: http://llvm.org/viewvc/llvm-project?rev=330460&view=rev Log: Fix the Xcode gtest target for the move of FileSpecTest.cpp. 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=330460&r1=330459&r2=330460&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Apr 20 11:30:31 2018 @@ -3437,7 +3437,6 @@ 9A20572F1F3B8E7600F6C293 /* HostTest.cpp */, 9A2057301F3B8E7600F6C293 /* MainLoopTest.cpp */, 2321F9381BDD332400BA9A93 /* CMakeLists.txt */, - 23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */, 2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */, 2321F93A1BDD332400BA9A93 /* SocketTest.cpp */, 2321F93B1BDD332400BA9A93 /* SymbolsTest.cpp */, @@ -3472,6 +3471,7 @@ 7F94D7172040A13A006EE3EA /* CleanUpTest.cpp */, 23E2E5161D903689006F38BB /* ArchSpecTest.cpp */, 9A3D43C81F3150D200EB767C /* ConstStringTest.cpp */, + 23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */, 9A3D43C71F3150D200EB767C /* LogTest.cpp */, 9A3D43CB1F3150D200EB767C /* NameMatchesTest.cpp */, 9A3D43C61F3150D200EB767C /* StatusTest.cpp */, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits