[Lldb-commits] [PATCH] D61498: 01/06: Merge GetCompileUnit + GetCompileUnitContainingDIEOffset

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 6 00:10:01 PDT 2019


labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Thanks, this looks much better.

In D61498#1490885 <https://reviews.llvm.org/D61498#1490885>, @jankratochvil wrote:

> OK, I agree; originally I did not want to touch more code than what I needed for .debug_types.


I think that "not wanting to touch more code than needed" was the reason why all previous attemtps at debug_types were hacky in one way or another. :)



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp:129-130
+
+  // llvm::lower_bound is not used as for DIE offsets it would still return
+  // index +1 and GetOffset() returning index itself would be a special case.
+  auto pos = llvm::upper_bound(m_compile_units, offset,
----------------
Ah, I think I finally understand the `--pos` thingy. :)


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D61498





More information about the lldb-commits mailing list