[Lldb-commits] [lldb] [lldb/Symbol] Relax LineEntry validity for PC-less frames (PR #158811)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 3 10:03:11 PST 2025


================
@@ -60,7 +60,7 @@ SBAddress SBLineEntry::GetEndAddress() const {
   LLDB_INSTRUMENT_VA(this);
 
   SBAddress sb_address;
-  if (m_opaque_up) {
+  if (m_opaque_up && m_opaque_up->range.IsValid()) {
     sb_address.SetAddress(m_opaque_up->range.GetBaseAddress());
     sb_address.OffsetAddress(m_opaque_up->range.GetByteSize());
   }
----------------
clayborg wrote:

Might be the same issue as above where the resulting `sb_address` is the same as before this change unless the byte size is set to something valid, but the base address isn't. If the base address is invalid, it will be set to LLDB_INVALID_ADDRESS which is UINT64_MAX. So even if the byte size is set to something valid, it will result in us returning an address that was offset from UINT64_MAX, which won't be useful

https://github.com/llvm/llvm-project/pull/158811


More information about the lldb-commits mailing list