diff options
author | Ted Woodward <ted.woodward@codeaurora.org> | 2018-09-10 18:19:01 +0000 |
---|---|---|
committer | Ted Woodward <ted.woodward@codeaurora.org> | 2018-09-10 18:19:01 +0000 |
commit | 860bafa07d7be231a35472bfd71b5e5ca28ae5a2 (patch) | |
tree | 4f6f6c2b297e368df58a18ede1b466ce6a336168 /lldb/source/Core/Address.cpp | |
parent | bef0941b6b4b01374f24d5d0d3155826e015c231 (diff) | |
download | bcm5719-llvm-860bafa07d7be231a35472bfd71b5e5ca28ae5a2.tar.gz bcm5719-llvm-860bafa07d7be231a35472bfd71b5e5ca28ae5a2.zip |
Fix raw address breakpoints not resolving
Summary: An address breakpoint of the form "b 0x1000" won't resolve if it's created while the process isn't running. This patch deletes Address::SectionWasDeleted, renames Address::SectionWasDeletedPrivate to SectionWasDeleted (and makes it public), and changes the section check in Breakpoint::ModulesChanged back to its original form
Reviewers: jingham, #lldb
Reviewed By: jingham
Subscribers: davide, lldb-commits
Differential Revision: https://reviews.llvm.org/D51816
llvm-svn: 341849
Diffstat (limited to 'lldb/source/Core/Address.cpp')
-rw-r--r-- | lldb/source/Core/Address.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index f183245f7d3..eb54278d665 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 (SectionWasDeletedPrivate()) { + } else if (SectionWasDeleted()) { // 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 (SectionWasDeletedPrivate()) { + } else if (SectionWasDeleted()) { // 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,12 +761,6 @@ 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, |