DynamoRIO / DynamoRIO/drmemory
add MacOS support to DrSyscall
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on February 11, 2014 22:55:05_
Split from issue #1438 Xref the changes to DR's syscall routines for Mac in DRr2502. Some notes regarding those changes:
*\* TODO update drsyscall
**\* TODO drsys_syscall_succeeded() takes in an integer value!
Usually called like this though:
drsys_syscall_succeeded(syscall, dr_syscall_get_result(drcontext), &success)
So could have a dynamic context-sensitive version.
**\* TODO 64-bit return values only for certain Mac 32-bit syscalls
DR bailed on it, so drsyscall should try to provide them
**\* TODO how fit 64-bit arg and return types for 32-bit syscalls?
For 32-bit syscalls:
drsys_arg_t has "ptr_uint_t value" -- but for return or for general
args (see below) it can be 64-bit! Make "void *start_addr" into a union
that can hold the high portion of a return (or arg) value?
Plus individual args can be 64-bit (xref SYS_proc_info in
memquery_file_backing()). Ideally we would mark them and not treat as an
extra arg (like DR is likely going to do) -- but xref formal arg splitting
("arg_low", "arg_high") idea above.
drsys_pre_syscall_arg() has "OUT ptr_uint_t *value".
**\* TODO add drsys_{get,set}_errno() to normalize Linux vs MacOS?
Invert errno on Linux. Except DR is already doing this in
dr_syscall_get_result_ex().
_Original issue: http://code.google.com/p/drmemory/issues/detail?id=1440_
Contributor guide
Assessment
This issue has not been assessed yet.