[Lldb-commits] [PATCH] D29359: Start breaking some dependencies in lldbUtility

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 31 15:59:03 PST 2017


zturner created this revision.
Herald added a subscriber: mgorny.

The goal here is to make `lldbUtility` a library which depends on no other libraries.  It seems like this library already exists in spirit as a place to house very low level code which is commonly used by all parts of LLDB, so it makes sense to designate this as the one top-level library.  We can change the name in the future to something like `Support` if we choose to (implying that it is analogous to LLVMSupport), but for now I just want to break the dependencies.

So, this patch deletes a bunch of dead code and moves some code that is actually only used in 1-2 places up to where it's actually used.

This is not enough to get `Utility` dependency free.  Further tasks that I've identified, but which are too large to fit into this patch, include:

1. Move `RegularExpression` from Core -> Utility  (Long term: Delete and use LLVM)
2. Move `Stream` from Core -> Utility  (Long term: Delete and use llvm::raw_ostream)
3. Move `ConstString` from Core -> Utility
4. Move `ProcessStructReader` from Utility -> Process
5. Move `RegisterNumber` from Utility -> Target
6. Move `Error` from Core -> Utility
7. Try to convert `ValueObject::GetSP()` from SharingPtr to `std::shared_ptr`, then delete `SharingPtr`.
8. Move `ModuleCache` from Utility -> Target

Finally, once all of those things are done, we can begin breaking up the `lldb-private.h`, and `lldb-enumerations.h`, etc header files and moving the enumerations to more appropriate locations, which will finally break this up.


https://reviews.llvm.org/D29359

Files:
  lldb/include/lldb/Utility/ConvertEnum.h
  lldb/include/lldb/Utility/PriorityPointerPair.h
  lldb/include/lldb/Utility/Utils.h
  lldb/include/lldb/lldb-private-enumerations.h
  lldb/source/Commands/CommandObjectPlatform.cpp
  lldb/source/Core/Section.cpp
  lldb/source/Interpreter/OptionGroupArchitecture.cpp
  lldb/source/Interpreter/OptionGroupFormat.cpp
  lldb/source/Interpreter/OptionGroupOutputFile.cpp
  lldb/source/Interpreter/OptionGroupPlatform.cpp
  lldb/source/Interpreter/OptionGroupUUID.cpp
  lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp
  lldb/source/Interpreter/OptionGroupVariable.cpp
  lldb/source/Interpreter/OptionGroupWatchpoint.cpp
  lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
  lldb/source/Target/Platform.cpp
  lldb/source/Target/ThreadList.cpp
  lldb/source/Target/ThreadPlan.cpp
  lldb/source/Utility/ARM64_DWARF_Registers.cpp
  lldb/source/Utility/ARM64_DWARF_Registers.h
  lldb/source/Utility/ARM_DWARF_Registers.cpp
  lldb/source/Utility/ARM_DWARF_Registers.h
  lldb/source/Utility/CMakeLists.txt
  lldb/source/Utility/ConvertEnum.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29359.86516.patch
Type: text/x-patch
Size: 64307 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170131/0948b0ea/attachment-0001.bin>


More information about the lldb-commits mailing list