Coming from WinDbg¶
ntoseye uses the WinDbg command language, so most commands that you type in WinDbg work in ntoseye without changes. This page lists what works the same, what has a different syntax or is not available, and what only ntoseye has.
What carries over¶
Command names and syntax.
bp,kn,dt,!process,lm,u, thed*ande*families,.reload,.sympath,!analyze, and many more commands have the same names and syntax. The command reference lists all of them.MASM expressions.
ntoseyeuses MASM expressions with the WinDbg default radix (hexadecimal). This includespoi(),by/wo/dwo/qwo,@rax,$ip/$proc/$threadand the other pseudo-registers,@$name, and separated addresses such asfffff803`1a2b3c4d. See Expressions.The breakpoint grammar. Breakpoints accept pass counts,
if <expr>conditions,do "<commands>"actions that resume withgorgc, and/1,/p, and/t. See Breakpoints.Command programs and scripts.
ntoseyehas.if/.elsif/.else,.while,.for,.do,.break,.continue,.block,j,.foreach, the!for_each_*commands, and$t0-$t19. You can run script files with$<,$$<,$><,$$><, and$$>a<, and scripts can use${$arg1}and${/d:$arg1}. As withcdb -c,-c '<commands>'runs commands at startup, and with--batchntoseye quits after them; see Commands from the command line.Address ranges.
L<count>,L?<count>,L-<count>, and an end address work the same. The range includes the end address, sodb nt nt+7shows 8 bytes.Symbols. The default symbol server is the Microsoft symbol server, and the cache under
~/.ntoseye/symbolsuses thesymstorelayout, which WinDbg also reads..kdfiles..kdfilesreads WinDbg driver replacement map files. See Driver replacement.
Spelled differently, or missing¶
In WinDbg |
In ntoseye |
|---|---|
|
|
|
Use |
|
|
|
|
|
|
|
You do not need these commands, and |
|
Not available. |
|
Not available. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Behaves differently¶
Breakpoint scoping is a filter.
ntoseyechecksbp /p <pid>and/twhen a breakpoint hits, but the breakpoint itself is global. A breakpoint in a shared DLL therefore stops every process that runs that code, andntoseyeresumes the hits outside the scope without showing a message. Breakpoints in shared pages explains the cost. WinDbg has no equivalent of/c <processor>, which limits a breakpoint to one processor.!uniqstackgroups kernel threads. In WinDbg, the user-mode!uniqstackgroups the threads of one process. Inntoseye, it groups the threads of the.processprocess, or all threads in the system, and a stack includes the user frames below a system call..shellruns only at the interactive prompt.ntoseyedoes not accept.shellin breakpoint actions, exception commands, MCP, DAP, or the SDK, so a client cannot start programs on the host.Some hardware access depends on the backend. Port I/O (
ib,ob, and their word and dword forms) needs thekdorkdnetbackend.!pcireads configuration space overkd,kdnet, orgdb, but cannot read it from memory alone.!pcitreeworks on all backends.Some backends need no debugger in Windows. With the
gdbandmemorybackends, Windows starts normally withoutbcdedit /debug, so it does not detect the debugger and operates as it does in production. See Choosing a backend.
Only in ntoseye¶
Ranges: if the second value of a range is less than its start, the second value is a length in bytes, for example
db nt 20.Target and session:
status,capabilities,vcpu, and convenience variables withset,unset, andvars.Symbols:
.fetchimagedownloads the image of a module, andldforces the symbol load for one module.VBS:
.vtl,!trustlets,.vtlcxr,!hvpartitions,!hvvps,!hvept,!hveptdiff,!hvvmcs,!hvd,!hvu,!hvcalls, and!hvcallinspect the secure kernel and the Windows hypervisor. See VBS and the Windows hypervisor.Scripting: custom REPL commands in Python, which
reload-scriptsreloads.