Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reload .lldbinit without reloading the app?

Tags:

xcode

lldb

Is there a way to reload a .lldbinit file, without rebuilding the app? Similar to what one can do with gdb as follows:

 source ~/.gdbinit
like image 467
William Jockusch Avatar asked May 23 '13 18:05

William Jockusch


People also ask

How to use lldb for debugging?

Loading a Program into lldb First we need to set the program to debug. As with gdb, you can start lldb and specify the file you wish to debug on the command line: $ lldb /Projects/Sketch/build/Debug/Sketch. app Current executable set to '/Projects/Sketch/build/Debug/Sketch.

How to put breakpoint in lldb?

In lldb you can set breakpoints by typing either break or b followed by information on where you want the program to pause. After the b command, you can put either: a function name (e.g., b my_subroutine )

Where is Lldbinit?

If you are using the lldb command line interface, this is ~/. lldbinit-lldb. If you are using lldb inside a GUI debugger like Xcode this will be ~/. lldbinit- Xcode.


1 Answers

Use command source.

(lldb) command source ~/.lldbinit

If you are loading a Python file,

(lldb) command script import ~/lldb/bbt.py

although note that you cannot re-import a function that you've already imported in an lldb debug session; when refining a python script you'll need to quit & restart the debugger to try new versions.

like image 121
Jason Molenda Avatar answered Oct 24 '22 04:10

Jason Molenda