This is an archive of the discontinued LLVM Phabricator instance.

Fix debugserver build breakage on Mavericks caused by lldb commit svn 240728
ClosedPublic

Authored by dawn on Jul 13 2015, 2:44 PM.

Details

Summary

vm_kernel_page_size appears to not be defined on OSX Mavericks, so the build fails with:

...
../tools/lldb/tools/debugserver/source/MacOSX/MachTask.mm:452:41: error: use of undeclared identifier 'vm_kernel_page_size'
         static vm_size_t pagesize = vm_kernel_page_size;
                                     ^
 ../tools/lldb/tools/debugserver/source/MacOSX/MachTask.mm:470:60: error: use of undeclared identifier 'vm_kernel_page_size'
         uint64_t total_used_count = (physical_memory / vm_kernel_page_size) - (vminfo.free_count - vminfo.speculative_count) - vminfo.external_page_count - vminfo.purgeable_count;
...

This patch fixes the build by calculating the pagesize if _VM_PAGE_SIZE_H_ is not defined.

Diff Detail

Repository
rL LLVM

Event Timeline

dawn updated this revision to Diff 29612.Jul 13 2015, 2:44 PM
dawn retitled this revision from to Fix debugserver build breakage on Mavericks caused by lldb commit svn 240728.
dawn updated this object.
dawn added reviewers: jasonmolenda, clayborg.
dawn set the repository for this revision to rL LLVM.
dawn added a subscriber: lldb-commits.
clayborg accepted this revision.Jul 13 2015, 2:48 PM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Jul 13 2015, 2:48 PM
dawn closed this revision.Jul 13 2015, 8:51 PM

Committed to lldb rev. 242114