You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm dumping user process using !bdump "C:\temp\dump"
While saving register data, Error: Unknown exception [at bdump (line 128 col 5)] occurs
line 128 is const User = host.currentThread.Registers.User; in __collect_user function.
With some debugging, I figured out host.currentThread occurs the error.(on running var curThread = host.currentThread;, it raises same error)
add) host.currentProcess too
using 'windbg x86' / 'windbg preview' (tested both)
used kdnet
dumps x86 user-process
Steps
!process 0 0 testprogram.exe
.process /i [proc]
g
bp testprogram+0x1234
g
.scriptload C:\temp\bdump.js
!bdump "C:\\temp\\dump"
Full logs
kd> !process 0 0 testprogram.exe
PROCESS af60f840 SessionId: 1 Cid: 1554 Peb: 07e37000 ParentCid: 0bb8
DirBase: bffff880 ObjectTable: a138fbc0 HandleCount: 712.
Image: testprogram.exe
kd> .process /i af60f840
You need to continue execution (press 'g' <enter>) for the context
to be switched. When the debugger breaks in again, you will be in
the new process context.
kd> g
Break instruction exception - code 80000003 (first chance)
nt!RtlpBreakWithStatusInstruction:
8537cdc4 cc int 3
kd> .reload
Connected to Windows 10 19041 x86 compatible target at (Thu Nov 4 15:03:21.843 2021 (UTC + 9:00)), ptr64 FALSE
Loading Kernel Symbols
...............................................................
................................................................
...............................................
Loading User Symbols
................................................................
................................................................
........
Loading unloaded module list
...........
kd> bp 0x1234+testprogram
kd> g
Breakpoint 0 hit
testprogram+0x1234:
001b:xxxxxxxx 8bff mov edi,edi
kd> .scriptload C:\temp\bdump.js
[bdump] Usage: !bdump "C:\\path\\to\\dump"
[bdump] Usage: !bdump_full "C:\\path\\to\\dump"
[bdump] Usage: !bdump_active_kernel "C:\\path\\to\\dump"
[bdump] This will create a dump directory and fill it with a memory and register files
[bdump] NOTE: you must include the quotes and escape the backslashes!
JavaScript script successfully loaded from 'C:\temp\bdump.js'
kd> !bdump "C:\\temp\\dump"
[bdump] creating dir...
[bdump] saving regs...
Error: Unknown exception [at bdump (line 128 col 5)]
Unless I've misunderstood something, host.currentThread should essentially always exist, meaning this would be a windbg bug. I'm not really sure how I could handle this other than dumping the regs with r and parsing them out, but that seems pretty gross. If you set the breakpoint a few instructions early then step to your location, does that help convince windbg to create host.currentThread. Does host.currentThread exist in other windbg contexts? (e.g. notepad.exe, etc).
Hi. I'm dumping user process using
!bdump "C:\temp\dump"
While saving register data,
Error: Unknown exception [at bdump (line 128 col 5)]
occursline 128 is
const User = host.currentThread.Registers.User;
in __collect_user function.With some debugging, I figured out
host.currentThread
occurs the error.(on runningvar curThread = host.currentThread;
, it raises same error)add)
host.currentProcess
tooTest Environment
Steps
.scriptload C:\temp\bdump.js
!bdump "C:\\temp\\dump"
Full logs
The text was updated successfully, but these errors were encountered: