summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-07-03 09:30:19 +0000
committerTamas Berghammer <tberghammer@google.com>2015-07-03 09:30:19 +0000
commit09839c33b666d9000c9f636a9fc954fa8830d442 (patch)
treee52a97a793a87b72b873170f68a70c49fca08936 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
parent623652a0fd6f5ec03db60c38c956561756210a42 (diff)
downloadbcm5719-llvm-09839c33b666d9000c9f636a9fc954fa8830d442.tar.gz
bcm5719-llvm-09839c33b666d9000c9f636a9fc954fa8830d442.zip
Fix qMemoryRegionInfo packet to return current value for address after the last memory region
Differential revision: http://reviews.llvm.org/D10899 llvm-svn: 241333
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index b956b88ce45..588c11231a4 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -2702,12 +2702,25 @@ NativeProcessLinux::GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInf
// The target memory address comes somewhere after the region we just parsed.
}
- // If we made it here, we didn't find an entry that contained the given address.
- error.SetErrorString ("address comes after final region");
-
- if (log)
- log->Printf ("NativeProcessLinux::%s failed to find map entry for address 0x%" PRIx64 ": %s", __FUNCTION__, load_addr, error.AsCString ());
-
+ // If we made it here, we didn't find an entry that contained the given address. Return the
+ // load_addr as start and the amount of bytes betwwen load address and the end of the memory as
+ // size.
+ range_info.GetRange ().SetRangeBase (load_addr);
+ switch (m_arch.GetAddressByteSize())
+ {
+ case 4:
+ range_info.GetRange ().SetByteSize (0x100000000ull - load_addr);
+ break;
+ case 8:
+ range_info.GetRange ().SetByteSize (0ull - load_addr);
+ break;
+ default:
+ assert(false && "Unrecognized data byte size");
+ break;
+ }
+ range_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo);
+ range_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo);
+ range_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo);
return error;
}
OpenPOWER on IntegriCloud