【问题标题】:LLDB stop at breakpoint while expr functionLLDB 在 expr 函数时在断点处停止
【发布时间】:2025-12-30 21:35:11
【问题描述】:

例如

void foo()
{
   int a = 0;
   printf("%d",a);
}

我在foo函数处设置断点,然后用expr求值,它只是运行函数,没有在断点处停止。

(lldb) br set -n foo
(lldb) expr foo()

有没有办法在 lldb 断点仍在工作时运行任何函数/代码?

【问题讨论】:

    标签: xcode lldb


    【解决方案1】:

    是的,我发现 expr 有一个选项 --ignore-breakpoints

    expr --ignore-breakpoints false -- foo()
    

    会工作

    【讨论】: