[Lldb-commits] [lldb] r242114 - Fix debugserver build breakage on Mavericks after lldb commit svn 240728
Dawn Perchik
dawn at burble.org
Mon Jul 13 20:50:10 PDT 2015
Author: dperchik
Date: Mon Jul 13 22:50:10 2015
New Revision: 242114
URL: http://llvm.org/viewvc/llvm-project?rev=242114&view=rev
Log:
Fix debugserver build breakage on Mavericks after lldb commit svn 240728
vm_kernel_page_size appears to not be defined on OSX Mavericks, so the
build fails. This patch fixes the build by calculating the pagesize if
_VM_PAGE_SIZE_H_ is not defined.
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm?rev=242114&r1=242113&r2=242114&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm Mon Jul 13 22:50:10 2015
@@ -448,7 +448,7 @@ MachTask::GetProfileData (DNBProfileData
if (scanType & eProfileMemory)
{
-#if defined (HOST_VM_INFO64_COUNT)
+#if defined (HOST_VM_INFO64_COUNT) && defined (_VM_PAGE_SIZE_H_)
static vm_size_t pagesize = vm_kernel_page_size;
#else
static vm_size_t pagesize;
@@ -467,7 +467,7 @@ MachTask::GetProfileData (DNBProfileData
*/
#if defined (HOST_VM_INFO64_COUNT)
// This mimicks Activity Monitor.
- uint64_t total_used_count = (physical_memory / vm_kernel_page_size) - (vminfo.free_count - vminfo.speculative_count) - vminfo.external_page_count - vminfo.purgeable_count;
+ uint64_t total_used_count = (physical_memory / pagesize) - (vminfo.free_count - vminfo.speculative_count) - vminfo.external_page_count - vminfo.purgeable_count;
#else
uint64_t total_used_count = vminfo.wire_count + vminfo.inactive_count + vminfo.active_count;
#endif
More information about the lldb-commits
mailing list