diff options
author | Greg Clayton <gclayton@apple.com> | 2013-01-25 18:06:21 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-01-25 18:06:21 +0000 |
commit | c7bece56faa5eef1c3d141d0c0b0b68b28a9aed2 (patch) | |
tree | 9a0132fc3b0bb4f38d06a0f352ee75ac57994771 /lldb/source/Target | |
parent | d0ed6c249dbd6bd488b6491b536a387548c00f7e (diff) | |
download | bcm5719-llvm-c7bece56faa5eef1c3d141d0c0b0b68b28a9aed2.tar.gz bcm5719-llvm-c7bece56faa5eef1c3d141d0c0b0b68b28a9aed2.zip |
<rdar://problem/13069948>
Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.
So I defined a new "lldb::offset_t" which should be used for all file offsets.
After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.
Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.
llvm-svn: 173463
Diffstat (limited to 'lldb/source/Target')
-rw-r--r-- | lldb/source/Target/Process.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/Target.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 97339235746..a6bbdcf83a7 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -2001,7 +2001,7 @@ Process::CreateBreakpointSite (const BreakpointLocationSP &owner, bool use_hardw } else { - bp_site_sp.reset (new BreakpointSite (&m_breakpoint_site_list, owner, load_addr, LLDB_INVALID_THREAD_ID, use_hardware)); + bp_site_sp.reset (new BreakpointSite (&m_breakpoint_site_list, owner, load_addr, use_hardware)); if (bp_site_sp) { if (EnableBreakpoint (bp_site_sp.get()).Success()) @@ -2520,7 +2520,7 @@ Process::WriteMemory (addr_t addr, const void *buf, size_t size, Error &error) } size_t -Process::WriteScalarToMemory (addr_t addr, const Scalar &scalar, uint32_t byte_size, Error &error) +Process::WriteScalarToMemory (addr_t addr, const Scalar &scalar, size_t byte_size, Error &error) { if (byte_size == UINT32_MAX) byte_size = scalar.GetByteSize(); @@ -2555,7 +2555,7 @@ Process::ReadScalarIntegerFromMemory (addr_t addr, if (bytes_read == byte_size) { DataExtractor data (&uval, sizeof(uval), GetByteOrder(), GetAddressByteSize()); - uint32_t offset = 0; + lldb::offset_t offset = 0; if (byte_size <= 4) scalar = data.GetMaxU32 (&offset, byte_size); else diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 435081c8bba..676fe8a8cd4 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1418,7 +1418,7 @@ Target::ReadScalarIntegerFromMemory (const Address& addr, if (bytes_read == byte_size) { DataExtractor data (&uval, sizeof(uval), m_arch.GetByteOrder(), m_arch.GetAddressByteSize()); - uint32_t offset = 0; + lldb::offset_t offset = 0; if (byte_size <= 4) scalar = data.GetMaxU32 (&offset, byte_size); else |