[英]How to step-into outermost function call in the line with LLDB?
Let's say I'm debugging code like this 假设我正在调试这样的代码
outer(fn1(), fn2());
If I use the s
command, LLDB will first step into fn1
, then I type fin
to step-out, s
again steps into fn2
, fin
... and only now I'm able to step-into outer
which is what I wanted since the beginning. 如果我使用
s
命令,则LLDB将首先进入fn1
,然后键入fin
进行跳出,再次将s
进入fn2
, fin
...然后才可以进入outer
,这正是我想要的从一开始。
Is there a way to tell LLDB on which function call to step-in? 有没有一种方法可以告诉LLDB哪个函数调用步入?
thread step-in --step-in-target outer
or more compactly, s -t outer
will stop when it has stepped into outer
. thread step-in --step-in-target outer
或更紧凑,当s -t outer
步入outer
时将停止。 See help s
for the documentation. 有关文档,请参见
help s
。
lldb comes with an alias for exactly this: sif
. lldb附带一个别名:
sif
。 In the given example, you can run: 在给定的示例中,您可以运行:
(lldb) sif outer
You can remember it as s tep i nto f unction 你可以记住它为S TEP 扎成 ˚F油膏
It works with partial matches, it doesn't have to be called with the full function name. 它适用于部分匹配,而不必使用完整的函数名来调用。 In this case, you could also run
sif out
for example. 在这种情况下,您也可以运行
sif out
例如。
直接不是。但是您可以在外部函数的定义中设置断点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.