|
From: Julian S. <js...@ac...> - 2005-08-24 16:45:24
|
Greg Great stuff. What is the current state of your port? I have a MacOS 10.4 box to hand and would be interested to try it out. It would be good to have an overview of the state of the port and the directions you are going with it. > * Overall, Valgrind 3.x looks far more portable than 2.x. > I appreciate all of the hard rewriting work; Thanks. Note that there are still a lot of cleanups in progress, and in particular a major overhaul of address space management is in progress. That should help non-Linux OSs a lot. > * Darwin always uses a 64-bit off_t, even on 32-bit architectures. Ok. This sounds fairly harmless. > * dispatch.S should be platform-specific instead of arch-specific. True. > * Some Darwin syscalls take 7 arguments (in particular, mmap() > with 64-bit off_t offset). Valgrind currently provides > arg1..arg6. I don't see any obvious 8-argument syscalls. > Do other architectures define a 7th syscall argument and > just never use it, or do they have a 6 argument max? 6 args is as many as Linux uses, it seems, and that's why the m_syswrap abstractions stop at 6. But clearly that could be extended to 7 with minimal effort. > * Darwin syscalls return a full 64-bit result, even on 32-bit > architectures. In particular, the lseek() syscall returns > a 64-bit off_t in registers r3 and r4. I think the m_syswrap abstractions should be able to hide that OK. > * Darwin/PPC syscalls indicate success and failure in an unusual > way: successful calls and failed calls return to different > points. A syscall call usually looks like this: > > // ...set up parameters here... > sc // make the syscall > b BAD // failed calls return here > GOOD: > nop // successful calls return here > // ...handle success case here... > blr > BAD: > // ...handle failure case here... > blr So you're saying that after sc, execution continues either at CIA+4 or CIA+8 depending on outcome. Right? > Handling this in VEX might be more difficult, because VEX > might need to know that `sc` looks like a conditional branch > in basic block analysis. Probably pretty harmless. There's all sorts of tricks that can be played. I think it's a non-problem. J |