Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Dec 2017 13:39:32 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
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
Message-ID:  <201712241339.vBODdWlC094392@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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<clang::SelectorTable>           m_selector_table_ap;
     std::unique_ptr<clang::Builtin::Context>        m_builtins_ap;
     std::unique_ptr<DWARFASTParserClang>            m_dwarf_ast_parser_ap;
-//  std::unique_ptr<PDBASTParser>                   m_pdb_ast_parser_ap;
+#ifdef LLDB_ENABLE_ALL
+    std::unique_ptr<PDBASTParser>                   m_pdb_ast_parser_ap;
+#endif // LLDB_ENABLE_ALL
     std::unique_ptr<ClangASTSource>                 m_scratch_ast_source_ap;
     std::unique_ptr<clang::MangleContext>           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 <stdio.h>
 
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712241339.vBODdWlC094392>