| Command | WinDbg | LLDB |
|---|---|---|
| Start | windbg {executable} [{args}] |
lldb {executable} [--args] |
| Attach | windbg -p {pid} |
lldb --attach-pid {pid} |
| Command | WinDbg | LLDB |
|---|---|---|
| (Re)load symbols | lb {module-name} |
target symbols add {symbol-file-path} |
| List modules | lm |
image list |
| Dump module information | lmvm {module-name} |
image dump [symtab|sections|ast|symfile|line-table] {module-name} |
| Resolve native function address | x {module-name}!{function} (wildcards accepted) |
image lookup -vn {function} (-r for Regex search) |
| Find nearest symbol | ln {address} |
image lookup -va {address} |
| Command | WinDbg | LLDB |
|---|---|---|
| Show processes | | |
|
| Switch to process | |{process-num}s |
|
| List threads | ~ |
thread list |
| Select thread | ~{thread-num}s |
thread select {thread-num} |
| Execute on all threads | ~*{command} |
|
| Enable child process debugging | .childdbg 1 |
| Command | WinDbg | LLDB |
|---|---|---|
| Disasemble | u {address} |
disasemble [-s {address}] (alias: di) |
| Disasemble function | uf {address} |
disasemble -n {function-name} |
| Continue | g |
{thread|process} continue |
| Step out | gu |
thread step-out |
| Step into | t |
thread step-in (s) thread step-inst (si) |
| Step over | p |
thread step-over |
| Continue until address | {g|t|p}a {address} |
thread until -a {address} |
| Command | WinDbg | LLDB |
|---|---|---|
| List breakpoints | bl |
break[point] list |
| Create breakpoint | bp {address|functuion-name} [{command}] |
break[point] set -a {address} break[point] set -n {funtion-name} |
| Enable/disable breakpoint | b{e|d} {breakpoint-number} |
break[point] {enable|disable} {breakpoint-number} |
| Delete breakpoint | bc {breakpoint-number|*} |
break[point] delete {breakpoint-number} |
| Create data breakpoint | [~{thread-num}]ba {access}{size}{address} [{command}] |
watch[point] {address} [-w {access}] [-s {size}] |
dumpdomain- dump information about AppDomainsdumpmt {address}- dump a Method Tabledumpclass {address}dumpmd {address}name2ee {module}!{type-or-method}- resolve a class name into MT or a method name into MD
bpmd {module} {method}orbpmd -md {md}- create a method breakpointbpmd {source-file}:{line-number}- create a breakpoint in the source code filebpmd -list- list pending breakpointsbpmd -clear {breakpoint-number}- remove a pending breakpointbpmd -clearall- remove all pending breakpoints
eeheap [-gc] [-loader]- show information about the internal CLR memorydumpheap -stat- show managed heap statisticsdumpheap -mt {mt}ordumpheap -type {typename}- dump objects of a specific typedumpobj {address}- dump a managed objectgcroot {address}- look for reference (or roots) to an objectfinalizequeue- show all objects registered for finalization
!threads(WinDbg) /clrthreads(LLDB) - list all the managed threadsclrstack- show the managed call stack of the current threaddumpstack- show the complete call stack (native + managed)dso- dump managed objects referenced in the call stackpe- show exception details
dumpil {md}- dump the IL code of the specified methodip2md {address}- match the assembly instruction address with MDu {md|address}- disassembly a method or a code address (with managed metadata annotations)