Skip to content

Commit 88db720

Browse files
committed
Fix issue with test suite.
Now that we are using Target::ResolveLoadAddress, we had an implicit conversion going on that I found that was causing many failures in the test suite. Fixed now.
1 parent 9169133 commit 88db720

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

lldb/include/lldb/Target/SectionLoadHistory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SectionLoadHistory {
4545
const lldb::SectionSP &section_sp);
4646

4747
bool ResolveLoadAddress(uint32_t stop_id, lldb::addr_t load_addr,
48-
Address &so_addr);
48+
Address &so_addr, bool allow_section_end = false);
4949

5050
bool SetSectionLoadAddress(uint32_t stop_id,
5151
const lldb::SectionSP &section_sp,

lldb/include/lldb/Target/Target.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,8 @@ class Target : public std::enable_shared_from_this<Target>,
12221222
bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr);
12231223

12241224
bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr,
1225-
uint32_t stop_id = SectionLoadHistory::eStopIDNow);
1225+
uint32_t stop_id = SectionLoadHistory::eStopIDNow,
1226+
bool allow_section_end = false);
12261227

12271228
bool SetSectionLoadAddress(const lldb::SectionSP &section,
12281229
lldb::addr_t load_addr,

lldb/source/Core/Address.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,9 @@ AddressClass Address::GetAddressClass() const {
10451045

10461046
bool Address::SetLoadAddress(lldb::addr_t load_addr, Target *target,
10471047
bool allow_section_end) {
1048-
if (target && target->ResolveLoadAddress(load_addr, *this, allow_section_end))
1048+
if (target && target->ResolveLoadAddress(load_addr, *this,
1049+
SectionLoadHistory::eStopIDNow,
1050+
allow_section_end))
10491051
return true;
10501052
m_section_wp.reset();
10511053
m_offset = load_addr;

lldb/source/Target/SectionLoadHistory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ SectionLoadHistory::GetSectionLoadAddress(uint32_t stop_id,
112112
}
113113

114114
bool SectionLoadHistory::ResolveLoadAddress(uint32_t stop_id, addr_t load_addr,
115-
Address &so_addr) {
115+
Address &so_addr,
116+
bool allow_section_end) {
116117
// First find the top level section that this load address exists in
117118
std::lock_guard<std::recursive_mutex> guard(m_mutex);
118119
const bool read_only = true;

lldb/source/Target/Target.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,8 +3216,9 @@ Status Target::Install(ProcessLaunchInfo *launch_info) {
32163216
}
32173217

32183218
bool Target::ResolveLoadAddress(addr_t load_addr, Address &so_addr,
3219-
uint32_t stop_id) {
3220-
return m_section_load_history.ResolveLoadAddress(stop_id, load_addr, so_addr);
3219+
uint32_t stop_id, bool allow_section_end) {
3220+
return m_section_load_history.ResolveLoadAddress(stop_id, load_addr, so_addr,
3221+
allow_section_end);
32213222
}
32223223

32233224
bool Target::ResolveFileAddress(lldb::addr_t file_addr,

0 commit comments

Comments
 (0)