- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
编辑:现在看来,它不仅限于 frame info
,但实际上,breakpoint command add
命令都不起作用。只有在 (lldb) 命令提示符下手动输入它们才会起作用
我通过 XCode 控制台在 LLDB 中设置了一些断点,以检查一个类及其在代码中的使用方式。
(lldb) breakpoint set --func-regex "DVLayer"
断点 7:73 个位置。
(lldb) breakpoint command add 7
输入您的调试器命令。输入“DONE”结束。
frame info
continue
DONE
这在 XCode 4 之前的所有 XCode 版本中都运行良好。但是现在,我得到的只是控制台中的这些语句,没有帧信息。我已经在 5 个不同的类上尝试了断点命令,但它对它们都不起作用......总是这个输出。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
命令#2“继续”继续目标。
另请注意,THIS ONLY FAILS TO WORK INSIDE A breakpoint command add
语句
如果我只是在 (lldb) 命令提示符处停在 LLDB 的断点处,我可以键入 frame info
并且它按预期工作,但是,如上所述,添加 frame info
作为断点命令完全失败,输出如上。
最佳答案
以下解决方法在 Xcode 8.0 中对我有效:
(lldb) breakpoint set --func-regex "setTitle"
Breakpoint 2: 296 locations.
(lldb) breakpoint command add --script-type python 2
Enter your Python command(s). Type 'DONE' to end.
def function (frame, bp_loc, internal_dict):
"""frame: the lldb.SBFrame for the location at which you stopped
bp_loc: an lldb.SBBreakpointLocation for the breakpoint location information
internal_dict: an LLDB support object not to be used"""
print str(frame)
frame.GetThread().GetProcess().Continue()
DONE
(lldb)
frame #0: 0x00000001879ca4b8 UIKit`-[UIButton _setTitleShadowOffset:]
frame #0: 0x00000001879ca4b8 UIKit`-[UIButton _setTitleShadowOffset:]
frame #0: 0x00000001879ca4b8 UIKit`-[UIButton _setTitleShadowOffset:]
frame #0: 0x000000018781ef68 UIKit`-[UIButton setTitleColor:forState:]
frame #0: 0x000000018781efb4 UIKit`-[UIButtonContent setTitleColor:]
frame #0: 0x000000018781ef68 UIKit`-[UIButton setTitleColor:forState:]
frame #0: 0x000000018781efb4 UIKit`-[UIButtonContent setTitleColor:]
frame #0: 0x000000018781ef68 UIKit`-[UIButton setTitleColor:forState:]
frame #0: 0x000000018781efb4 UIKit`-[UIButtonContent setTitleColor:]
frame #0: 0x000000018781edec UIKit`-[UIButton setTitle:forState:]
frame #0: 0x000000018781ee6c UIKit`-[UIButtonContent setTitle:]
编辑:更多信息:我无法让外部 python 脚本进入 Xcode 8。
编辑:链接到 LLDB python 命令:https://lldb.llvm.org/python-reference.html
关于ios - lldb 断点命令在 XCode 8 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40593039/
我正在尝试使用 lldb 远程启动和调试新进程没有太大的成功。 通过运行以下命令附加到已启动的进程效果很好: process connect process attach -P gdb-remote
如果我针对给定主题调用 lldb 帮助,大部分内容都会从屏幕上消失。例子: (lldb) help expression 我可以退出调试器,并在 typescript 中收集帮助,但这很笨拙。 lld
在 lldb 中有没有办法继续直到循环结束?我正在寻找 finish 的类似物,但它不是跳出堆栈帧,而是跳出循环。 for (int i = 0; i < 10000000; i++) { .
我已阅读 this tutorial ,但我还没有发现任何有关反向调试的信息。 lldb 是否有一些功能,例如 target record在 gdb 中?如果是,我在哪里可以阅读它? 最佳答案 还没有
lldb 是否具有 gdb 的等效项 shell命令从提示符运行外部命令? (见 How can I execute external commands from the gdb command pr
LLDB 有 convenience variables ?如果是这样,我该如何使用它们?如果没有,我可以使用类似的东西吗? 引用:http://software.intel.com/sites/pr
有没有办法使用 lldb 调试器设置零标志? 类似 gdb 中的 set ($eflags)=似乎只有 register write rflags ... 来设置所有 最佳答案 这是在 lldb 中设
有没有办法使用 lldb 调试器设置零标志? 类似 gdb 中的 set ($eflags)=似乎只有 register write rflags ... 来设置所有 最佳答案 这是在 lldb 中设
我正在使用 lldb 来跟踪调用 CoreFoundation 函数(例如 CFRunLoopTimerCreate)的一些纯 C 或 C++ 代码(32 位)。 我在 CFRunLoopTimerC
我在 lldb 中为我在 MacOS 上安装的基于 C 语言的应用程序设置了很多断点。断点大多设置在应用程序的同一函数中。然而,第二天我回到应用程序继续工作,我又开始在同一个函数中设置断点,出现了一个
您最喜欢的打印 NSArray 内容的方式是什么?使用LLDB? 一个python脚本? 内联 for 循环? 一个Objective-C 方法调用? 我知道按索引打印对象很容易。我想一次打印所有对象
我想从脚本中运行类似以下命令的内容: lldb -f /path/to/my/file -o command1 -o command2 ... -o detach 有没有办法在执行后退出lldb而不进
众所周知,我们可以在 GDB 中使用命令“catch syscall”来中断每个系统函数。 LLDB 中是否有类似的命令? (gdb) catch syscall Catchpoint 1 (sysc
使用 Xcode 10,当我使用断点停止我的应用程序并尝试在控制台中打印对象的内容时,我获得: "Couldn't IRGen expression, no additional error" 但是,
由于这些天在 Mac 上使用 gdb 变得越来越困难(至少我觉得我正在与 Apple 进行艰苦的斗争),所以我开始尝试使用 lldb。 是否有与 gdb -tui 等效的模式,可以显示源代码的良好、持
使用 Xcode 10,当我使用断点停止我的应用程序并尝试在控制台中打印对象的内容时,我得到: "Couldn't IRGen expression, no additional error" 但是,
$cat testleak01.cpp #include int main() { int*p=new int[3]; return 0; } 用调试信息编译它 $g++ testle
如何检查LLDB中不同线程中运行和步进的线程数? GDB 有信息线程。 LLDB 有类似的命令吗? 最佳答案 跑过: (lldb) help thread 命令来看看你可以用 lldb 中的线程做什么
我正在运行 Xubuntu 16.04。从存储库安装 lldb 后,当我尝试使用它时,我得到以下输出: lldb foo (lldb) target create "foo" Current exec
我目前正在为 C++ 中的自定义对象开发绘图命令。我正在使用 Xcode v10.1。 我使用command script import test.py 导入我自己的命令,其中有一个函数如下: imp
我是一名优秀的程序员,十分优秀!