Does anyone out there have an .lldbinit file they can share? It would be really useful to see a few commands defined, just to understand the syntax.
lldbinit file located in the home directory. Note that it is a hidden file, if you can't see the file, you can use the following shortcut to show the hidden files in your finder: shift + command + .
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.
lldb is a next generation, high-performance debugger. It is built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler.
Another examples can be found on GitHub https://github.com/search?q=lldbinit. One of few from https://github.com/bsmt/lldbinit/blob/master/lldbinit
# wish lldb supported colors :/
settings set prompt [lldb]$
# breakpoint shortcuts
# break on function/method/selector: b -n name
# break on C/C++ method: b -M method
# break on selector: b -S selector:here:
# break on address: b -a 0xfeedface
command alias b breakpoint set
command alias bd breakpoint disable
command alias be breakpoint enable
command alias bdel breakpoint delete
command alias bcommand breakpoint command add
command alias commands breakpoint command list
# jump aliases
# jump 0xfeedface
command alias jump register write pc
command alias jmp register write pc
command alias j register write pc
# fix p/s
# p/s rsi
command alias p/s register read
# fscript (cbf to fix fscript anywhere)
command alias f_init p (char)[[NSBundle bundleWithPath:@"/Library/Frameworks/FScript.framework"] load]
command alias f_start p (void)[FScriptMenuItem insertInMainMenu]
command alias return thread return
Check out the examples in the lldb repository:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With