From owner-svn-src-vendor@freebsd.org Thu Jun 1 20:59:30 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE400B7EC96; Thu, 1 Jun 2017 20:59:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C619E68177; Thu, 1 Jun 2017 20:59:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51KxTv1035566; Thu, 1 Jun 2017 20:59:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KxTQo035560; Thu, 1 Jun 2017 20:59:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51KxTQo035560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319471 - in vendor/lldb/dist: cmake/modules packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts tools/lldb-mi www X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:31 -0000 Author: dim Date: Thu Jun 1 20:59:29 2017 New Revision: 319471 URL: https://svnweb.freebsd.org/changeset/base/319471 Log: Vendor import of lldb trunk r304460: https://llvm.org/svn/llvm-project/lldb/trunk@304460 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp (contents, props changed) Modified: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp vendor/lldb/dist/www/projects.html Modified: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake ============================================================================== --- vendor/lldb/dist/cmake/modules/LLDBConfig.cmake Thu Jun 1 20:59:25 2017 (r319470) +++ vendor/lldb/dist/cmake/modules/LLDBConfig.cmake Thu Jun 1 20:59:29 2017 (r319471) @@ -334,28 +334,26 @@ if (HAVE_LIBDL) list(APPEND system_libs ${CMAKE_DL_LIBS}) endif() -if (CMAKE_SYSTEM_NAME MATCHES "Linux") - # Check for syscall used by lldb-server on linux. - # If these are not found, it will fall back to ptrace (slow) for memory reads. - check_cxx_source_compiles(" - #include - int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }" - HAVE_PROCESS_VM_READV) +# Check for syscall used by lldb-server on linux. +# If these are not found, it will fall back to ptrace (slow) for memory reads. +check_cxx_source_compiles(" + #include + int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }" + HAVE_PROCESS_VM_READV) - if (HAVE_PROCESS_VM_READV) - add_definitions(-DHAVE_PROCESS_VM_READV) - else() - # If we don't have the syscall wrapper function, but we know the syscall number, we can - # still issue the syscall manually - check_cxx_source_compiles(" - #include - int main() { return __NR_process_vm_readv; }" - HAVE_NR_PROCESS_VM_READV) +if (HAVE_PROCESS_VM_READV) + add_definitions(-DHAVE_PROCESS_VM_READV) +else() + # If we don't have the syscall wrapper function, but we know the syscall number, we can + # still issue the syscall manually + check_cxx_source_compiles(" + #include + int main() { return __NR_process_vm_readv; }" + HAVE_NR_PROCESS_VM_READV) - if (HAVE_NR_PROCESS_VM_READV) - add_definitions(-DHAVE_NR_PROCESS_VM_READV) - endif() - endif() + if (HAVE_NR_PROCESS_VM_READV) + add_definitions(-DHAVE_NR_PROCESS_VM_READV) + endif() endif() # Figure out if lldb could use lldb-server. If so, then we'll Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile Thu Jun 1 20:59:29 2017 (r319471) @@ -0,0 +1,3 @@ +LEVEL = ../../../make +CXX_SOURCES := main.cpp +include $(LEVEL)/Makefile.rules Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py Thu Jun 1 20:59:29 2017 (r319471) @@ -0,0 +1,7 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest( + __file__, globals(), [ + decorators.expectedFailureAll( + oslist=["windows"], bugnumber="llvm.org/pr24764")]) Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp Thu Jun 1 20:59:29 2017 (r319471) @@ -0,0 +1,29 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +namespace n { + struct D { + int i; + static int anInt() { return 2; } + int dump() { return i; } + }; +} + +using namespace n; + +int foo(D* D) { + return D->dump(); //% self.expect("expression -- D->dump()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "2"]) +} + +int main (int argc, char const *argv[]) +{ + D myD { D::anInt() }; + foo(&myD); + return 0; +} Modified: vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp ============================================================================== --- vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp Thu Jun 1 20:59:25 2017 (r319470) +++ vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp Thu Jun 1 20:59:29 2017 (r319471) @@ -510,22 +510,20 @@ bool CMICmdCmdVarUpdate::ExamineSBValueForChange(lldb: } lldb::SBType valueType = vrwValue.GetType(); - if (!valueType.IsPointerType() && !valueType.IsReferenceType()) { - const MIuint nChildren = vrwValue.GetNumChildren(); - for (MIuint i = 0; i < nChildren; ++i) { - lldb::SBValue member = vrwValue.GetChildAtIndex(i); - if (!member.IsValid()) - continue; - if (member.GetValueDidChange()) { - vrwbChanged = true; - return MIstatus::success; - } else if (ExamineSBValueForChange(member, vrwbChanged) && vrwbChanged) - // Handle composite types (i.e. struct or arrays) - return MIstatus::success; - } - } + const MIuint nChildren = vrwValue.GetNumChildren(); + for (MIuint i = 0; i < nChildren; ++i) { + lldb::SBValue member = vrwValue.GetChildAtIndex(i); + if (!member.IsValid()) + continue; + if (member.GetValueDidChange()) { + vrwbChanged = true; + return MIstatus::success; + } else if (ExamineSBValueForChange(member, vrwbChanged) && vrwbChanged) + // Handle composite types (i.e. struct or arrays) + return MIstatus::success; + } vrwbChanged = false; return MIstatus::success; } Modified: vendor/lldb/dist/www/projects.html ============================================================================== --- vendor/lldb/dist/www/projects.html Thu Jun 1 20:59:25 2017 (r319470) +++ vendor/lldb/dist/www/projects.html Thu Jun 1 20:59:29 2017 (r319471) @@ -244,6 +244,25 @@
  • + Reimplement the command interpreter commands using the SB API +

    + Currently, all the CommandObject::DoExecute methods are implemented + using the lldb_private API's. That generally means that there's code + that gets duplicated between the CommandObject and the SB API that does + roughly the same thing. We would reduce this code duplication, present a + single coherent face to the users of lldb, and keep + ourselves more honest about what we need in the SB API's if we implemented + the CommandObjects::DoExecute methods using the SB API's. +

    +

    + BTW, it is only the way it was much easier to develop lldb if it had a functioning + command-line early on. So we did that first, and developed the SB API's when lldb + was more mature. There's no good technical reason to have the commands use the + lldb_private API's. +

    +
  • + +
  • Documentation and better examples