[Lldb-commits] [lldb] r304864 - Move Object format code to lib/BinaryFormat.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 6 20:49:04 PDT 2017


Author: zturner
Date: Tue Jun  6 22:48:56 2017
New Revision: 304864

URL: http://llvm.org/viewvc/llvm-project?rev=304864&view=rev
Log:
Move Object format code to lib/BinaryFormat.

This creates a new library called BinaryFormat that has all of
the headers from llvm/Support containing structure and layout
definitions for various types of binary formats like dwarf, coff,
elf, etc as well as the code for identifying a file from its
magic.

Differential Revision: https://reviews.llvm.org/D33843

Modified:
    lldb/trunk/include/lldb/Core/dwarf.h
    lldb/trunk/include/lldb/Utility/SafeMachO.h
    lldb/trunk/source/Core/ArchSpec.cpp
    lldb/trunk/source/Core/CMakeLists.txt
    lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt
    lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h
    lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
    lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt
    lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    lldb/trunk/source/Utility/CMakeLists.txt
    lldb/trunk/unittests/Core/ArchSpecTest.cpp
    lldb/trunk/unittests/Core/StructuredDataTest.cpp

Modified: lldb/trunk/include/lldb/Core/dwarf.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/dwarf.h?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/dwarf.h (original)
+++ lldb/trunk/include/lldb/Core/dwarf.h Tue Jun  6 22:48:56 2017
@@ -13,7 +13,7 @@
 #include <stdint.h>
 
 // Get the DWARF constant definitions from llvm
-#include "llvm/Support/Dwarf.h"
+#include "llvm/BinaryFormat/Dwarf.h"
 
 #include "lldb/Core/RangeMap.h"
 

Modified: lldb/trunk/include/lldb/Utility/SafeMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SafeMachO.h?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SafeMachO.h (original)
+++ lldb/trunk/include/lldb/Utility/SafeMachO.h Tue Jun  6 22:48:56 2017
@@ -114,6 +114,6 @@
 #undef CPU_SUBTYPE_MC980000_ALL
 #undef CPU_SUBTYPE_MC98601
 
-#include "llvm/Support/MachO.h"
+#include "llvm/BinaryFormat/MachO.h"
 
 #endif // liblldb_SafeMachO_h_

Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Tue Jun  6 22:48:56 2017
@@ -24,11 +24,11 @@
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/Twine.h" // for Twine
-#include "llvm/Support/COFF.h"
-#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH
-#include "llvm/Support/ELF.h"
+#include "llvm/BinaryFormat/COFF.h"
+#include "llvm/BinaryFormat/ELF.h"
+#include "llvm/BinaryFormat/MachO.h" // for CPUType::CPU_T...
+#include "llvm/Support/Compiler.h"   // for LLVM_FALLTHROUGH
 #include "llvm/Support/Host.h"
-#include "llvm/Support/MachO.h" // for CPUType::CPU_T...
 
 #include <memory> // for shared_ptr
 #include <string>

Modified: lldb/trunk/source/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CMakeLists.txt?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Core/CMakeLists.txt (original)
+++ lldb/trunk/source/Core/CMakeLists.txt Tue Jun  6 22:48:56 2017
@@ -67,6 +67,7 @@ add_lldb_library(lldbCore
     lldbPluginObjectFileJIT
 
   LINK_COMPONENTS
+    BinaryFormat
     Support
     Demangle
   )

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt Tue Jun  6 22:48:56 2017
@@ -8,5 +8,6 @@ add_lldb_library(lldbPluginObjectFileELF
     lldbSymbol
     lldbTarget
   LINK_COMPONENTS
+    BinaryFormat
     Support
   )

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h Tue Jun  6 22:48:56 2017
@@ -21,7 +21,7 @@
 #ifndef liblldb_ELFHeader_h_
 #define liblldb_ELFHeader_h_
 
-#include "llvm/Support/ELF.h"
+#include "llvm/BinaryFormat/ELF.h"
 
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-types.h"

Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt Tue Jun  6 22:48:56 2017
@@ -8,5 +8,6 @@ add_lldb_library(lldbPluginObjectFilePEC
     lldbSymbol
     lldbTarget
   LINK_COMPONENTS
+    BinaryFormat
     Support
   )

Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Tue Jun  6 22:48:56 2017
@@ -10,7 +10,7 @@
 #include "ObjectFilePECOFF.h"
 #include "WindowsMiniDump.h"
 
-#include "llvm/Support/COFF.h"
+#include "llvm/BinaryFormat/COFF.h"
 
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/FileSpecList.h"

Modified: lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt Tue Jun  6 22:48:56 2017
@@ -17,5 +17,6 @@ add_lldb_library(lldbPluginProcessElfCor
     lldbPluginObjectFileELF
     lldbPluginProcessUtility
   LINK_COMPONENTS
+    BinaryFormat
     Support
   )

Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Tue Jun  6 22:48:56 2017
@@ -27,7 +27,7 @@
 #include "lldb/Utility/DataBufferLLVM.h"
 #include "lldb/Utility/Log.h"
 
-#include "llvm/Support/ELF.h"
+#include "llvm/BinaryFormat/ELF.h"
 #include "llvm/Support/Threading.h"
 
 #include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h"

Modified: lldb/trunk/source/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/CMakeLists.txt?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/source/Utility/CMakeLists.txt (original)
+++ lldb/trunk/source/Utility/CMakeLists.txt Tue Jun  6 22:48:56 2017
@@ -38,5 +38,6 @@ add_lldb_library(lldbUtility
   # lldbUtility cannot have any dependencies
 
   LINK_COMPONENTS
+    BinaryFormat
     Support
   )

Modified: lldb/trunk/unittests/Core/ArchSpecTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/ArchSpecTest.cpp?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/ArchSpecTest.cpp (original)
+++ lldb/trunk/unittests/Core/ArchSpecTest.cpp Tue Jun  6 22:48:56 2017
@@ -11,7 +11,7 @@
 
 #include "lldb/Core/ArchSpec.h"
 
-#include "llvm/Support/MachO.h"
+#include "llvm/BinaryFormat/MachO.h"
 
 using namespace lldb;
 using namespace lldb_private;

Modified: lldb/trunk/unittests/Core/StructuredDataTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/StructuredDataTest.cpp?rev=304864&r1=304863&r2=304864&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/StructuredDataTest.cpp (original)
+++ lldb/trunk/unittests/Core/StructuredDataTest.cpp Tue Jun  6 22:48:56 2017
@@ -12,7 +12,7 @@
 #include "lldb/Core/StructuredData.h"
 #include "lldb/Utility/StreamString.h"
 
-#include "llvm/Support/MachO.h"
+#include "llvm/BinaryFormat/MachO.h"
 
 using namespace lldb;
 using namespace lldb_private;




More information about the lldb-commits mailing list