本文介绍了如何在LLDB中“捕获syscall"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知,我们可以在GDB中使用命令'catch syscall'来中断每个系统功能.

As known,we can use command 'catch syscall' in GDB to break on every system function.

LLDB中是否有类似的命令?

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)

推荐答案

尚未,请随时使用提交增强请求http://lldb.llvm.org 错误报告链接.

Not yet, feel free to file an enhancement request using the http://lldb.llvm.org Bug Report link.

如果您使用的是Mac OS X,并且仅对记录系统调用感兴趣,则可以使用dtrace,可以将其转储堆栈跟踪等.如果您需要在调试器中的系统调用中停止运行,那无济于事,但可能出于某些目的而起作用.

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.

这篇关于如何在LLDB中“捕获syscall"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 21:20