Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone share a sample .lldbinit file?

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.

like image 727
William Jockusch Avatar asked Oct 06 '11 16:10

William Jockusch


People also ask

Where is Lldbinit located?

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 + .

How do I use LLDB code?

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.

What is LLDB command?

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.


2 Answers

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
like image 86
beny Avatar answered Sep 18 '22 00:09

beny


Check out the examples in the lldb repository:

  • bin-utils
  • pwd-cd-and-system
like image 40
John Avatar answered Sep 20 '22 00:09

John