How to 'catch syscall' in LLDB?

我与影子孤独终老i 提交于 2020-01-25 14:52:16

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!