diff options
author | Matthew Gardiner <mg11@csr.com> | 2014-09-29 08:02:24 +0000 |
---|---|---|
committer | Matthew Gardiner <mg11@csr.com> | 2014-09-29 08:02:24 +0000 |
commit | f03e6d84bc649ff230b197fb9c2dffaeebd9edef (patch) | |
tree | bc5f86fcf3fa13ed82aaaae36a00d6401be32b6c /lldb/source/Core/Section.cpp | |
parent | 1779d438bc389f0cb67ecd3d9fed7d13bca7db39 (diff) | |
download | bcm5719-llvm-f03e6d84bc649ff230b197fb9c2dffaeebd9edef.tar.gz bcm5719-llvm-f03e6d84bc649ff230b197fb9c2dffaeebd9edef.zip |
Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sections
works, as do breakpoints, run and pause, display zeroth frame.
See
http://reviews.llvm.org/D5503
for a fuller description of the changes in this commit.
llvm-svn: 218596
Diffstat (limited to 'lldb/source/Core/Section.cpp')
-rw-r--r-- | lldb/source/Core/Section.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index 3267c186622..ea33a62b775 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -28,7 +28,8 @@ Section::Section (const ModuleSP &module_sp, lldb::offset_t file_offset, lldb::offset_t file_size, uint32_t log2align, - uint32_t flags) : + uint32_t flags, + uint32_t target_byte_size/*=1*/) : ModuleChild (module_sp), UserID (sect_id), Flags (flags), @@ -44,7 +45,8 @@ Section::Section (const ModuleSP &module_sp, m_children (), m_fake (false), m_encrypted (false), - m_thread_specific (false) + m_thread_specific (false), + m_target_byte_size(target_byte_size) { // printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s\n", // this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, name.GetCString()); @@ -61,7 +63,8 @@ Section::Section (const lldb::SectionSP &parent_section_sp, lldb::offset_t file_offset, lldb::offset_t file_size, uint32_t log2align, - uint32_t flags) : + uint32_t flags, + uint32_t target_byte_size/*=1*/) : ModuleChild (module_sp), UserID (sect_id), Flags (flags), @@ -77,7 +80,8 @@ Section::Section (const lldb::SectionSP &parent_section_sp, m_children (), m_fake (false), m_encrypted (false), - m_thread_specific (false) + m_thread_specific (false), + m_target_byte_size(target_byte_size) { // printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s.%s\n", // this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, parent_section_sp->GetName().GetCString(), name.GetCString()); @@ -186,7 +190,7 @@ Section::ContainsFileAddress (addr_t vm_addr) const { if (file_addr <= vm_addr) { - const addr_t offset = vm_addr - file_addr; + const addr_t offset = (vm_addr - file_addr) * m_target_byte_size; return offset < GetByteSize(); } } |