1
1

* updates to build on OS X 10.3

This commit was SVN r11082.
Этот коммит содержится в:
Brian Barrett 2006-08-01 22:41:51 +00:00
родитель a84e557815
Коммит 9d5f91997f
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -89,7 +89,9 @@ First checked in. This code still has bugs, but I've written enough code that c
// Some extra Mach interfaces that we don't need in the public header. // Some extra Mach interfaces that we don't need in the public header.
// Again, we need C++ guards. // Again, we need C++ guards.
#ifdef HAVE_MACH_MACH_VM_H
#include <mach/mach_vm.h> #include <mach/mach_vm.h>
#endif
#include <mach/vm_region.h> #include <mach/vm_region.h>
// We want both PowerPC and Intel thread state information. // We want both PowerPC and Intel thread state information.
@ -271,6 +273,7 @@ static bool TaskIs64Bits(task_t task)
// task can be 64-bit. // task can be 64-bit.
result = false; result = false;
#ifdef HAVE_MACH_VM_REGION
if ( mach_vm_region != NULL ) { if ( mach_vm_region != NULL ) {
kern_return_t err; kern_return_t err;
mach_vm_address_t addr; mach_vm_address_t addr;
@ -304,6 +307,7 @@ static bool TaskIs64Bits(task_t task)
assert(junkPort == MACH_PORT_NULL); assert(junkPort == MACH_PORT_NULL);
} }
#endif /* HAVE_MACH_VM_REGION */
return result; return result;
} }
@ -799,6 +803,7 @@ static int MachReadBytes(MoreBTContext *context, MoreBTAddr src, void *dst, size
// reverting to using [mach_]vm_read, which means I have to vm_deallocate // reverting to using [mach_]vm_read, which means I have to vm_deallocate
// the space afterwards. Such is life, kerplunk. // the space afterwards. Such is life, kerplunk.
#ifdef HAVE_MACH_VM_READ
if (mach_vm_read != NULL) { if (mach_vm_read != NULL) {
err = mach_vm_read( err = mach_vm_read(
context->task, context->task,
@ -807,7 +812,9 @@ static int MachReadBytes(MoreBTContext *context, MoreBTAddr src, void *dst, size
&dataRead, &dataRead,
&sizeRead &sizeRead
); );
} else { } else
#endif /* HAVE_MACH_VM_READ */
{
#if MORE_DEBUG #if MORE_DEBUG
// If I'm running 32-bits, vm_read's arguments are only 32-bits, // If I'm running 32-bits, vm_read's arguments are only 32-bits,
// and thus an attempt to read a 64-bit address is bad. This // and thus an attempt to read a 64-bit address is bad. This

Просмотреть файл

@ -38,6 +38,10 @@ AC_DEFUN([MCA_backtrace_darwin_CONFIG],[
fi fi
fi fi
AS_IF([test "$backtrace_darwin_happy" = "yes"],
[AC_CHECK_HEADERS([mach/mach_vm.h])
AC_CHECK_FUNCS([mach_vm_region mach_vm_read])])
AS_IF([test "$backtrace_darwin_happy" = "yes"], AS_IF([test "$backtrace_darwin_happy" = "yes"],
[$1], [$2]) [$1], [$2])
]) ])