|
12 | 12 | #include "lldb/Core/PluginManager.h" |
13 | 13 | #include "lldb/Core/Section.h" |
14 | 14 | #include "lldb/Symbol/Symbol.h" |
15 | | -#include "lldb/Target/Target.h" |
16 | 15 | #include "lldb/Utility/LLDBLog.h" |
17 | 16 | #include "lldb/Utility/Log.h" |
18 | 17 | #include "llvm/ADT/DenseSet.h" |
@@ -234,41 +233,6 @@ void ObjectFileJSON::CreateSections(SectionList &unified_section_list) { |
234 | 233 | } |
235 | 234 | } |
236 | 235 |
|
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 §ion_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 §ion_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 | | - |
272 | 236 | bool ObjectFileJSON::MagicBytesMatch(DataBufferSP data_sp, |
273 | 237 | lldb::addr_t data_offset, |
274 | 238 | lldb::addr_t data_length) { |
|
0 commit comments