From: <gb...@di...> - 2001-06-21 06:06:42
|
Hi, I made some arrangements to sigsegv.cpp in order to support Darwin in VOSF / direct addressing. The sole problem so far is that the usual hacks for retrieving the fault address don't work there. Instead, we currently need to decode the faultive instruction and read the address from the saved register set. This hack comes from Boehm's garbage collector 6.0alpha8 that comes from some other contributor. Having said that, I have just realized Darwin doesn't honor the protection flags passed to mmap() (say PROT_READ only). So, an explicit mprotect() has to be done just after that. I am going to wrap a number of mmap()/mprotect() functions to reflect that and also the fact that Darwin doesn't support mapping memory from device files (MAP_ANON works though). Is it OK for the following functions going into src/Unix/vm_map.cpp ? - address =3D vm_acquire(size) - address =3D vm_acquire_fixed(address, size) - void vm_release(address, size) - rc =3D vm_protect(address, size, prot_flags) where prot_flags are: VM_PAGE_READ / VM_PAGE_WRITE / VM_PAGE_EXEC This should also simplify some code in main_unix.cpp. Note: vm_protect() exists in Mach/Darwin environments but with 4 arguments. This is not a problem since we use C++. Could this be a problem for Objective C if Nigel wants to have the same naming conventions ? Bye, Gwenol=E9. |