-
Notifications
You must be signed in to change notification settings - Fork 246
LLDB Logging
vadimcn edited this page Oct 23, 2022
·
4 revisions
LLDB has an internal logging facility, which may help in diagnosing many debugging-related problems. It is controlled via the "log" command:
log enable <channel> <category1> [<categry2> ...]
.
For example, if you are having trouble with remote debugging, you might put the following line into your launch configuration:
"initCommands": ["log enable gdb-remote default"],
. Log output will appear in the Debug Console.
As of this writing, LLDB supports the following logging channels and categories:
Logging categories for 'posix':
all - all available logging categories
default - default set of logging categories
break - log breakpoints
memory - log memory reads and writes
process - log process events and activities
ptrace - log all calls to ptrace
registers - log register read/writes
thread - log thread events and activities
watch - log watchpoint related activities
Logging categories for 'dwarf':
all - all available logging categories
default - default set of logging categories
comp - log insertions of object files into DWARF debug maps
info - log the parsing of .debug_info
line - log the parsing of .debug_line
lookups - log any lookups that happen by name, regex, or address
map - log struct/unions/class type completions
Logging categories for 'gdb-remote':
all - all available logging categories
default - default set of logging categories
async - log asynchronous activity
break - log breakpoints
comm - log communication activity
packets - log gdb remote packets
memory - log memory reads and writes
data-short - log memory bytes for memory reads and writes for short transactions only
data-long - log memory bytes for memory reads and writes for all transactions
process - log process events and activities
step - log step related activities
thread - log thread events and activities
watch - log watchpoint related activities
Logging categories for 'lldb':
all - all available logging categories
default - default set of logging categories
api - log API calls and return values
ast - log AST
break - log breakpoints
commands - log command argument parsing
comm - log communication activities
conn - log connection details
demangle - log mangled names to catch demangler crashes
dyld - log shared library related activities
event - log broadcaster, listener and event queue activities
expr - log expressions
formatters - log data formatters related activities
host - log host activities
jit - log JIT events in the target
language - log language runtime events
mmap - log mmap related activities
module - log module activities such as when modules are created, destroyed, replaced, and more
object - log object construction/destruction for important objects
os - log OperatingSystem plugin related activities
platform - log platform events and activities
process - log process events and activities
script - log events about the script interpreter
state - log private and public process state changes
step - log step related activities
symbol - log symbol related issues and warnings
system-runtime - log system runtime events
target - log target events and activities
temp - log internal temporary debug messages
thread - log thread events and activities
types - log type system related activities
unwind - log stack unwind activities
watch - log watchpoint related activities
on-demand - log symbol on-demand related activities
For an up-to-date list use log list
.