[Lldb-commits] [PATCH] D147606: [lldb] fix #61942, discard "empty" ranges in DWARF to better handle gcc binary

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 5 06:41:47 PDT 2023


DavidSpickett added a comment.

I'm not familiar with this code, but the issue as explained I think I understand.

It seems like you're checking for empty ranges in two places, what does each one do?

Is there anything else these ranges indicate or do we think it is simply a missed optimisation in the debug info producer? If they do sometimes mean something, then perhaps improving the searching of the ranges is preferable to discarding the empty ones.
(though if all tests pass with this patch then these empty ranges can't be that important to us can they)



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:1318
+          if (range_base >= subprogram_low_pc) {
+            if (range.IsValid())
+              block->AddRange(Block::Range(range_base - subprogram_low_pc,
----------------
Combine this into one if. Also I'd put the Valid check first, just seems like the right order for it (not that it matters really).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147606



More information about the lldb-commits mailing list