Date: Thu, 1 Jun 2017 20:59:29 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> 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 Message-ID: <201706012059.v51KxTQo035560@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/uio.h> - 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 <sys/uio.h> + 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 <sys/syscall.h> - 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 <sys/syscall.h> + 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 @@ </li> <li> + Reimplement the command interpreter commands using the SB API + <p> + 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. + </p> + <p> + 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. + </p> + </li> + + <li> Documentation and better examples <p>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706012059.v51KxTQo035560>