lldb

XCode: Programmatically enable a symbolic breakpoint?

流过昼夜 提交于 2020-01-03 17:06:19
问题 Is there a way to programmatically enable a breakpoint? Normally I'd use a breakpoint condition, but I need to use a symbolic breakpoint. Specifically, something is changing the contentOffset of my UIScrollView between a call to scrollToIndexPath and a call to reloadData . I'd like to enable the symbolic breakpoint only after the call to scrollToIndexPath . 回答1: Jim Ingham's answer works on a x86 system. For an iOS device I was able to use the method described in this answer to

XCode: Programmatically enable a symbolic breakpoint?

烂漫一生 提交于 2020-01-03 17:05:54
问题 Is there a way to programmatically enable a breakpoint? Normally I'd use a breakpoint condition, but I need to use a symbolic breakpoint. Specifically, something is changing the contentOffset of my UIScrollView between a call to scrollToIndexPath and a call to reloadData . I'd like to enable the symbolic breakpoint only after the call to scrollToIndexPath . 回答1: Jim Ingham's answer works on a x86 system. For an iOS device I was able to use the method described in this answer to

process handle in lldbinit

我的梦境 提交于 2020-01-02 19:10:47
问题 I'd like to have the following command init my .lldbinit. process handle SIGPROF -n false -p true -s false The problem is that lldb won't run this command when it starts up and doesn't yet have a process. error: Aborting reading of commands after command #1: ' process handle SIGPROF -n false -p true -s false' failed with error: No current target; cannot handle signals until you have a valid target and process. How can I tell lldb to apply this command whenever it does have a process? 回答1: One

How to tell LLDB to pass signal onto program

橙三吉。 提交于 2020-01-01 17:11:39
问题 I set a lot of breakpoints in lldb for a C language based application I installed on my MacOS. The breakpoints were mostly set in the same function in the application. However, the next day that I went back to the application to continue working on it, and I started setting breakpoints again in the same function, a problem arose in that the break didn't occur inside the application function, but rather in one of the underlying libraries of the application and it keeps doing this over and over

Cannot get mac os x lldb process to read the STDIN

自闭症网瘾萝莉.ら 提交于 2020-01-01 07:32:06
问题 Is it me or lldb for mac os x (replacing gdb) does not allow you to pipe a file into the stdin, to be used by the process being debugged? reading the instructions there is no reference to it. I've gone through and installed gnu gdb, but would like to take advantage of what I suppose is improved lldb capability? 回答1: (lldb) process launch -i <file> Should do the trick. Note you can't say: (lldb) run -i <file> since run is an alias for process launch -- so all its arguments are passed to the

LLDB基础知识

走远了吗. 提交于 2019-12-31 09:17:22
LLDB基础知识 LLDB控制台 Xcode中内嵌了LLDB控制台,在Xcode中代码的下方,我们可以看到LLDB控制台。 LLDB控制台平时会输出一些log信息。如果我们想输入命令调试,必须让程序进入暂停状态。让程序进入暂停状态的方式主要有2种: 断点或者watchpoint: 在代码中设置一个断点(watchpoint),当程序运行到断点位置的时候,会进入stop状态 直接暂停,控制台上方有一个暂停按钮,上图红框已标出,点击即可暂停程序 LLDB语法 在使用LLDB之前,我们来先看看LLDB的语法,了解语法可以帮助我们清晰的使用LLDB: <command> [<subcommand> [<subcommand>...]] <action> [-options [option-value]] [argument [argument...]] 一眼看上去可能比较迷茫,给大家解释一下: <command> (命令)和 <subcommand> (子命令):LLDB调试命令的名称。命令和子命令按层级结构来排列:一个命令对象为跟随其的子命令对象创建一个上下文,子命令又为其子命令创建一个上下文,依此类推。 <action> :执行命令的操作 <options> :命令选项 <arguement> :命令的参数 [] :表示命令是可选的,可以有也可以没有 举个例子

Xcode equivalent of Visual Studio's “Find Source”

倖福魔咒の 提交于 2019-12-30 07:09:05
问题 I am developing on a Qt project, and have installed Qt from their installer onto my computer. In Visual Studio it is simple to debug-step into Qt sources: when I enter a function in an unknown file, it will open a file browser to let me locate the original Qt source code. Is there an equivalent function in Xcode or LLDB? 回答1: The debug information records the location of the QT source files when they were built. You can find this information by doing: (lldb) image lookup -va main Address:

LLDB: add symbols file?

烈酒焚心 提交于 2019-12-30 03:06:24
问题 I'm trying to debug an android native app from Android Studio's native debugging using lldb. My native app contains one libmain.so that is compiled and run by Android Studio and another external libother.so compiled by me. when debugging, I am able to set breakpoints in libmain.so but not libother.so. Both shared objects are stripped but somehow Android Studio makes lldb know about the unstripped version of libmain.so. I want to do the same for libother.so. What command do I need to give lldb

LLDB: add symbols file?

烈酒焚心 提交于 2019-12-30 03:06:10
问题 I'm trying to debug an android native app from Android Studio's native debugging using lldb. My native app contains one libmain.so that is compiled and run by Android Studio and another external libother.so compiled by me. when debugging, I am able to set breakpoints in libmain.so but not libother.so. Both shared objects are stripped but somehow Android Studio makes lldb know about the unstripped version of libmain.so. I want to do the same for libother.so. What command do I need to give lldb

Debugging Numba in MacOS

烂漫一生 提交于 2019-12-25 18:46:10
问题 The problem I get a segmentation error when using numba to run some simulations (Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)). I am trying to follow the instructions on the numba docs (https://numba.pydata.org/numba-doc/dev/user/troubleshoot.html#example-debug-usage) but I cannot install GDB on my MacOS. GDB on MacOS I have followed the instructions on this site to install GDB on MacOS https://www.thomasvitale.com/how-to-setup-gdb-and-eclipse-to-debug-c-files-on