-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.lldbinit
More file actions
37 lines (28 loc) · 1.72 KB
/
.lldbinit
File metadata and controls
37 lines (28 loc) · 1.72 KB
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
# LLDB initialization file for OpenMind debugging
# Import common LLDB scripts
command script import ~/lldb/custom_commands.py
# Custom type summaries for mind map types
type summary add MindMapNode -s "Node: ${var.text} (${var.children.count} children)"
type summary add MindMapConnection -s "Connection: ${var.source} → ${var.target}"
type summary add MindMapDocument -s "Document: ${var.title} (${var.nodes.count} nodes)"
# Useful aliases
command alias poc expression -l objc -O --
command alias pvc expression -l objc -O -- [[[UIApplication sharedApplication] keyWindow] recursiveDescription]
command alias pkp expression -l objc -O -- [NSThread callStackSymbols]
# Breakpoint commands
breakpoint set --name malloc_error_break --condition 1
breakpoint set --name "Swift._assertionFailure" --condition 1
breakpoint set --name "Swift._fatalErrorMessage" --condition 1
# Memory debugging
command alias leaks expression -l objc -O -- (void)[[UIApplication sharedApplication] _performMemoryWarning]
command alias malloc_history expression -l objc -O -- (void)malloc_history($arg1)
# SwiftUI debugging helpers
command alias swiftui_update expression -O -l swift -- CATransaction.flush()
command alias swiftui_debug expression -O -l swift -- _forEachField(of: $arg1) { print("\($0): \($1)") }
# Performance debugging
command alias measure expression -O -l swift -- let start = CFAbsoluteTimeGetCurrent(); $arg1; print("Execution time: \(CFAbsoluteTimeGetCurrent() - start) seconds")
# Print view hierarchy
command alias pviews expression -O -l objc -- [[[UIApplication sharedApplication] keyWindow] recursiveDescription]
# Settings
settings set target.process.optimization-warnings false
settings set target.swift-extra-clang-flags -Xcc -fcolor-diagnostics