-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlldbinit
52 lines (44 loc) · 2.49 KB
/
lldbinit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
settings set target.x86-disassembly-flavor intel
# Allow stepping in to code you don't have the debug symbols for
settings set target.process.thread.step-in-avoid-nodebug false
# Load local .lldbinit files
settings set target.load-cwd-lldbinit true
# Store a log of the session in /tmp for reference
settings set interpreter.save-session-directory /tmp/
settings set interpreter.save-session-on-quit True
settings set interpreter.open-transcript-in-editor False
# Add type summary for Unmanaged in Swift
type summary add --category swift --summary-string "Unmanaged Contains: ${var._value%@}" Swift.Unmanaged<AnyObject>
command script import ~/.lldbhelpers/aslr.py
command script import ~/.lldbhelpers/break_here.py
command script import ~/.lldbhelpers/breakpoints.py
command script import ~/.lldbhelpers/context.py
command script import ~/.lldbhelpers/delete_breakpoint.py
command script import ~/.lldbhelpers/function_address.py
command script import ~/.lldbhelpers/iblog.py
command script import ~/.lldbhelpers/keypath.py
command script import ~/.lldbhelpers/symbol_address.py
command script import ~/.lldbhelpers/load_swift.py
command regex fw 's/(.+)/expr -l objective-c -O -- @import %1/'
command alias rs process launch --stop-at-entry
command alias reveal expr -l objc++ -- (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2); (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
# log enable -f /tmp/types.log lldb types
# log enable -f /tmp/dwarf.log dwarf all
# log enable -f /tmp/breakpoints.log lldb break
# log enable -f /tmp/all.log lldb all
# log enable -f /tmp/gdb.log gdb-remote process
# log enable -f /tmp/host.log lldb host
# log enable -f /tmp/expr.log lldb expr
# The commands below are the same as importing these modules but avoiding
# some print statements telling you they've been installed
# command script import lldb.macosx.crashlog
# command script import lldb.macosx.heap
command script add -f lldb.macosx.crashlog.save_crashlog save_crashlog
command script add -f lldb.macosx.heap.cstr_refs cstr_refs
command script add -f lldb.macosx.heap.find_variable find_variable
command script add -f lldb.macosx.heap.malloc_info malloc_info
command script add -f lldb.macosx.heap.objc_refs objc_refs
command script add -f lldb.macosx.heap.ptr_refs ptr_refs
# Stop when the process exits with a non-zero exit code
# break set -n exit -c '$arg1 != 0'
# settings set target.import-std-module true