[Lldb-commits] [PATCH] D81453: [lldb] Replace the LEB128 decoding logic in LLDB's DataExtractor with calls to LLVM's LEB128 implementation

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 10 09:17:46 PDT 2020


JDevlieghere added inline comments.


================
Comment at: lldb/source/Utility/DataExtractor.cpp:911
 uint32_t DataExtractor::Skip_LEB128(offset_t *offset_ptr) const {
   uint32_t bytes_consumed = 0;
   const uint8_t *src = PeekData(*offset_ptr, 1);
----------------
labath wrote:
> JDevlieghere wrote:
> > Should we hoist this into llvm as well (as a separate patch). It seems like at least `lld/ELF/EhFrame.cpp` is using the same functionality. 
> TBH, I'm tempted to just delete it. I doubt that "skipping" an LEB128 is going to be noticeably faster than "reading" it, and llvm::DataExtractor has no equivalent function...
Even better :-) 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81453/new/

https://reviews.llvm.org/D81453





More information about the lldb-commits mailing list