diff options
author | Adrian McCarthy <amccarth@google.com> | 2015-12-04 22:22:15 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2015-12-04 22:22:15 +0000 |
commit | 0c35cde9b1fd0e7b54e77e7ba14116af6aae0ea9 (patch) | |
tree | f71047ab9225277c30fa4cfe4a30d7596058c033 /lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp | |
parent | 072bff80362c24ae81a4e5a3feff2caa128aec10 (diff) | |
download | bcm5719-llvm-0c35cde9b1fd0e7b54e77e7ba14116af6aae0ea9.tar.gz bcm5719-llvm-0c35cde9b1fd0e7b54e77e7ba14116af6aae0ea9.zip |
Implement GetMemoryRegionInfo for mini dumps.
Differential Revision: http://reviews.llvm.org/D15218
llvm-svn: 254780
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp b/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp index 819c4dd4375..55102cc12eb 100644 --- a/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp +++ b/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp @@ -743,12 +743,13 @@ ProcessWindowsLive::GetMemoryRegionInfo(lldb::addr_t vm_addr, MemoryRegionInfo & error.GetError(), vm_addr); return error; } - bool readable = !(mem_info.Protect & PAGE_NOACCESS); - bool executable = mem_info.Protect & (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY); - bool writable = mem_info.Protect & (PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY | PAGE_READWRITE | PAGE_WRITECOPY); + const bool readable = IsPageReadable(mem_info.Protect); + const bool executable = IsPageExecutable(mem_info.Protect); + const bool writable = IsPageWritable(mem_info.Protect); info.SetReadable(readable ? MemoryRegionInfo::eYes : MemoryRegionInfo::eNo); info.SetExecutable(executable ? MemoryRegionInfo::eYes : MemoryRegionInfo::eNo); info.SetWritable(writable ? MemoryRegionInfo::eYes : MemoryRegionInfo::eNo); + error.SetError(::GetLastError(), eErrorTypeWin32); WINLOGV_IFALL(WINDOWS_LOG_MEMORY, "Memory region info for address 0x%I64u: readable=%s, executable=%s, writable=%s", BOOL_STR(readable), BOOL_STR(executable), BOOL_STR(writable)); |