问题
As known,we can use command 'catch syscall' in GDB to break on every system function.
Is there a similar command in LLDB?
(gdb) catch syscall
Catchpoint 1 (syscall)
(gdb) r
Starting program: /tmp/catch-syscall
Catchpoint 1 (call to syscall 'close'), \
0xffffe424 in __kernel_vsyscall ()
(gdb) c
Continuing.
Catchpoint 1 (returned from syscall 'close'), \
0xffffe424 in __kernel_vsyscall ()
(gdb)
回答1:
Not yet, feel free to file an enhancement request using the http://lldb.llvm.org Bug Report link.
If you're on Mac OS X and are just interested in recording syscalls you can use dtrace, you can get it to dump stack traces and the like. That doesn't help if you need to be stopped in the debugger at the syscall, but might work for some purposes.
来源:https://stackoverflow.com/questions/26253347/how-to-catch-syscall-in-lldb