From owner-svn-src-projects@freebsd.org Sun Dec 24 13:39:33 2017 Return-Path: Delivered-To: svn-src-projects@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 BB3EBE8F095 for ; Sun, 24 Dec 2017 13:39:33 +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 94F367A026; Sun, 24 Dec 2017 13:39:33 +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 vBODdW2J094396; Sun, 24 Dec 2017 13:39:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBODdWlC094392; Sun, 24 Dec 2017 13:39:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712241339.vBODdWlC094392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 24 Dec 2017 13:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327151 - in projects/clang600-import/contrib/llvm/tools/lldb: include/lldb/Symbol source/Initialization source/Plugins/Process/gdb-remote source/Symbol X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang600-import/contrib/llvm/tools/lldb: include/lldb/Symbol source/Initialization source/Plugins/Process/gdb-remote source/Symbol X-SVN-Commit-Revision: 327151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Dec 2017 13:39:33 -0000 Author: dim Date: Sun Dec 24 13:39:32 2017 New Revision: 327151 URL: https://svnweb.freebsd.org/changeset/base/327151 Log: For our lldb customizations, instead of commenting out lines, use #ifdef LLDB_ENABLE_ALL / #endif preprocess directives instead, so our diffs against upstream only consist of added lines. Modified: projects/clang600-import/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h projects/clang600-import/contrib/llvm/tools/lldb/source/Initialization/SystemInitializerCommon.cpp projects/clang600-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp projects/clang600-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp Modified: projects/clang600-import/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h Sun Dec 24 13:22:57 2017 (r327150) +++ projects/clang600-import/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h Sun Dec 24 13:39:32 2017 (r327151) @@ -38,7 +38,9 @@ #include "lldb/lldb-enumerations.h" class DWARFASTParserClang; -//class PDBASTParser; +#ifdef LLDB_ENABLE_ALL +class PDBASTParser; +#endif // LLDB_ENABLE_ALL namespace lldb_private { @@ -425,7 +427,9 @@ class ClangASTContext : public TypeSystem { (public) // TypeSystem methods //------------------------------------------------------------------ DWARFASTParser *GetDWARFParser() override; - //PDBASTParser *GetPDBParser(); +#ifdef LLDB_ENABLE_ALL + PDBASTParser *GetPDBParser(); +#endif // LLDB_ENABLE_ALL //------------------------------------------------------------------ // ClangASTContext callbacks for external source lookups. @@ -997,7 +1001,9 @@ class ClangASTContext : public TypeSystem { (public) std::unique_ptr m_selector_table_ap; std::unique_ptr m_builtins_ap; std::unique_ptr m_dwarf_ast_parser_ap; -// std::unique_ptr m_pdb_ast_parser_ap; +#ifdef LLDB_ENABLE_ALL + std::unique_ptr m_pdb_ast_parser_ap; +#endif // LLDB_ENABLE_ALL std::unique_ptr m_scratch_ast_source_ap; std::unique_ptr m_mangle_ctx_ap; CompleteTagDeclCallback m_callback_tag_decl; Modified: projects/clang600-import/contrib/llvm/tools/lldb/source/Initialization/SystemInitializerCommon.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lldb/source/Initialization/SystemInitializerCommon.cpp Sun Dec 24 13:22:57 2017 (r327150) +++ projects/clang600-import/contrib/llvm/tools/lldb/source/Initialization/SystemInitializerCommon.cpp Sun Dec 24 13:39:32 2017 (r327151) @@ -13,9 +13,13 @@ #include "Plugins/Instruction/MIPS/EmulateInstructionMIPS.h" #include "Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h" #include "Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h" -//#include "Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h" +#ifdef LLDB_ENABLE_ALL +#include "Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h" +#endif // LLDB_ENABLE_ALL #include "Plugins/ObjectFile/ELF/ObjectFileELF.h" -//#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" +#ifdef LLDB_ENABLE_ALL +#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" +#endif // LLDB_ENABLE_ALL #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" @@ -82,7 +86,9 @@ void SystemInitializerCommon::Initialize() { // Initialize plug-ins ObjectContainerBSDArchive::Initialize(); ObjectFileELF::Initialize(); -//ObjectFilePECOFF::Initialize(); +#ifdef LLDB_ENABLE_ALL + ObjectFilePECOFF::Initialize(); +#endif // LLDB_ENABLE_ALL EmulateInstructionARM::Initialize(); EmulateInstructionMIPS::Initialize(); @@ -91,7 +97,9 @@ void SystemInitializerCommon::Initialize() { //---------------------------------------------------------------------- // Apple/Darwin hosted plugins //---------------------------------------------------------------------- -//ObjectContainerUniversalMachO::Initialize(); +#ifdef LLDB_ENABLE_ALL + ObjectContainerUniversalMachO::Initialize(); +#endif // LLDB_ENABLE_ALL #if defined(__APPLE__) ObjectFileMachO::Initialize(); @@ -109,13 +117,17 @@ void SystemInitializerCommon::Terminate() { Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); ObjectContainerBSDArchive::Terminate(); ObjectFileELF::Terminate(); -//ObjectFilePECOFF::Terminate(); +#ifdef LLDB_ENABLE_ALL + ObjectFilePECOFF::Terminate(); +#endif // LLDB_ENABLE_ALL EmulateInstructionARM::Terminate(); EmulateInstructionMIPS::Terminate(); EmulateInstructionMIPS64::Terminate(); -//ObjectContainerUniversalMachO::Terminate(); +#ifdef LLDB_ENABLE_ALL + ObjectContainerUniversalMachO::Terminate(); +#endif // LLDB_ENABLE_ALL #if defined(__APPLE__) ObjectFileMachO::Terminate(); #endif Modified: projects/clang600-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Sun Dec 24 13:22:57 2017 (r327150) +++ projects/clang600-import/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Sun Dec 24 13:39:32 2017 (r327151) @@ -70,7 +70,9 @@ // Project includes #include "GDBRemoteRegisterContext.h" -//#include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" +#ifdef LLDB_ENABLE_ALL +#include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" +#endif // LLDB_ENABLE_ALL #include "Plugins/Process/Utility/GDBRemoteSignals.h" #include "Plugins/Process/Utility/InferiorCallPOSIX.h" #include "Plugins/Process/Utility/StopInfoMachException.h" @@ -2474,7 +2476,7 @@ Status ProcessGDBRemote::DoDestroy() { if (log) log->Printf("ProcessGDBRemote::DoDestroy()"); -#if 0 // XXX Currently no iOS target support on FreeBSD +#ifdef LLDB_ENABLE_ALL // XXX Currently no iOS target support on FreeBSD // There is a bug in older iOS debugservers where they don't shut down the // process // they are debugging properly. If the process is sitting at a breakpoint or @@ -2587,7 +2589,7 @@ Status ProcessGDBRemote::DoDestroy() { } } } -#endif +#endif // LLDB_ENABLE_ALL // Interrupt if our inferior is running... int exit_status = SIGABRT; Modified: projects/clang600-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp Sun Dec 24 13:22:57 2017 (r327150) +++ projects/clang600-import/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp Sun Dec 24 13:39:32 2017 (r327151) @@ -99,7 +99,9 @@ #include "lldb/Utility/RegularExpression.h" #include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h" -//#include "Plugins/SymbolFile/PDB/PDBASTParser.h" +#ifdef LLDB_ENABLE_ALL +#include "Plugins/SymbolFile/PDB/PDBASTParser.h" +#endif // LLDB_ENABLE_ALL #include @@ -9603,13 +9605,13 @@ DWARFASTParser *ClangASTContext::GetDWARFParser() { return m_dwarf_ast_parser_ap.get(); } -#if 0 +#ifdef LLDB_ENABLE_ALL PDBASTParser *ClangASTContext::GetPDBParser() { if (!m_pdb_ast_parser_ap) m_pdb_ast_parser_ap.reset(new PDBASTParser(*this)); return m_pdb_ast_parser_ap.get(); } -#endif +#endif // LLDB_ENABLE_ALL bool ClangASTContext::LayoutRecordType( void *baton, const clang::RecordDecl *record_decl, uint64_t &bit_size,