Skip to content

Commit 9b28021

Browse files
committed
Revert the ObjectFileJSON changes, will land separately.
1 parent 6a272fc commit 9b28021

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "lldb/Core/PluginManager.h"
1313
#include "lldb/Core/Section.h"
1414
#include "lldb/Symbol/Symbol.h"
15-
#include "lldb/Target/Target.h"
1615
#include "lldb/Utility/LLDBLog.h"
1716
#include "lldb/Utility/Log.h"
1817
#include "llvm/ADT/DenseSet.h"
@@ -234,41 +233,6 @@ void ObjectFileJSON::CreateSections(SectionList &unified_section_list) {
234233
}
235234
}
236235

237-
bool ObjectFileJSON::SetLoadAddress(Target &target, lldb::addr_t value,
238-
bool value_is_offset) {
239-
Log *log(GetLog(LLDBLog::DynamicLoader));
240-
if (!m_sections_up)
241-
return true;
242-
243-
const bool warn_multiple = true;
244-
245-
addr_t slide = value;
246-
if (!value_is_offset) {
247-
addr_t lowest_addr = LLDB_INVALID_ADDRESS;
248-
for (const SectionSP &section_sp : *m_sections_up) {
249-
addr_t section_load_addr = section_sp->GetFileAddress();
250-
lowest_addr = std::min(lowest_addr, section_load_addr);
251-
}
252-
if (lowest_addr == LLDB_INVALID_ADDRESS)
253-
return false;
254-
slide = value - lowest_addr;
255-
}
256-
257-
// Apply slide to each section's file address.
258-
for (const SectionSP &section_sp : *m_sections_up) {
259-
addr_t section_load_addr = section_sp->GetFileAddress();
260-
if (section_load_addr != LLDB_INVALID_ADDRESS) {
261-
LLDB_LOGF(
262-
log,
263-
"ObjectFileJSON::SetLoadAddress section %s to load addr 0x%" PRIx64,
264-
section_sp->GetName().AsCString(), section_load_addr + slide);
265-
target.SetSectionLoadAddress(section_sp, section_load_addr + slide,
266-
warn_multiple);
267-
}
268-
}
269-
return true;
270-
}
271-
272236
bool ObjectFileJSON::MagicBytesMatch(DataBufferSP data_sp,
273237
lldb::addr_t data_offset,
274238
lldb::addr_t data_length) {

lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ class ObjectFileJSON : public ObjectFile {
8686

8787
Strata CalculateStrata() override { return eStrataUser; }
8888

89-
bool SetLoadAddress(Target &target, lldb::addr_t value,
90-
bool value_is_offset) override;
91-
9289
static bool MagicBytesMatch(lldb::DataBufferSP data_sp, lldb::addr_t offset,
9390
lldb::addr_t length);
9491

0 commit comments

Comments
 (0)