【发布时间】:2018-05-17 11:58:57
【问题描述】:
LLDB 命令jump 让我可以在与它停止的位置不同的位置恢复程序执行,但它似乎仅限于当前函数内的地址:
(lldb) jump CLI.cpp:15
error: CLI.cpp:15 is outside the current function.
我对此很好奇,因为lldb 的帮助中没有记录此限制,而jump <file>:<line> 的语法不知何故表明可以使用任意入口点:
(lldb) help jump ('_regexp-jump') Set the program counter to a new address. Expects 'raw' input (see 'help raw-input'.) Syntax: _regexp-jump <line> _regexp-jump +<line-offset> | -<line-offset> _regexp-jump <file>:<line> _regexp-jump *<addr> 'jump' is an abbreviation for '_regexp-jump'
我知道在不同的帧/堆栈中恢复可能会使程序进入不一致的状态,并产生“奇妙”的副作用。
如何跳转到lldb 中当前函数之外的行(忽略可能的副作用)?
【问题讨论】: