diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Breakpoint/Breakpoint.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/Address.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp index bdeda4f06f4..1dc029654bf 100644 --- a/lldb/source/Breakpoint/Breakpoint.cpp +++ b/lldb/source/Breakpoint/Breakpoint.cpp @@ -555,7 +555,7 @@ void Breakpoint::ModulesChanged(ModuleList &module_list, bool load, // address that we haven't resolved to a section yet. So we'll have to // look in all the new modules to resolve this location. Otherwise, if // it was set in this module, re-resolve it here. - if (!section_sp || section_sp->GetModule() == module_sp) { + if (section_sp && section_sp->GetModule() == module_sp) { if (!seen) seen = true; diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index eb54278d665..f183245f7d3 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -281,7 +281,7 @@ addr_t Address::GetFileAddress() const { // We have a valid file range, so we can return the file based address by // adding the file base address to our offset return sect_file_addr + m_offset; - } else if (SectionWasDeleted()) { + } else if (SectionWasDeletedPrivate()) { // Used to have a valid section but it got deleted so the offset doesn't // mean anything without the section return LLDB_INVALID_ADDRESS; @@ -302,7 +302,7 @@ addr_t Address::GetLoadAddress(Target *target) const { return sect_load_addr + m_offset; } } - } else if (SectionWasDeleted()) { + } else if (SectionWasDeletedPrivate()) { // Used to have a valid section but it got deleted so the offset doesn't // mean anything without the section return LLDB_INVALID_ADDRESS; @@ -761,6 +761,12 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, } bool Address::SectionWasDeleted() const { + if (GetSection()) + return false; + return SectionWasDeletedPrivate(); +} + +bool Address::SectionWasDeletedPrivate() const { lldb::SectionWP empty_section_wp; // If either call to "std::weak_ptr::owner_before(...) value returns true, |