upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts/windows-boot/README.md
diff options
context:
space:
mode:
authorMoonEyes <ducoinbenjamin@yahoo.fr>2026-11-28 14:26:09 +0100
committerGitHub <noreply@github.com>2026-11-28 14:26:09 +0100
commit7ce011205869b2e881a663e390d8317be5f562f3 (patch)
tree6efdaed9954921baaf970fdff867214dda75c67f /scripts/windows-boot/README.md
parent1a0e77ecb72bd538327fb631009dea5426b7c80a (diff)
parent056e6823217b5f2a1fd9b2556ba71fd41a757877 (diff)
Merge pull request #1772 from sodove/feat/windows-boot-mapped-image-stack
windows-boot: recover private stacks for manually mapped images
Diffstat (limited to 'scripts/windows-boot/README.md')
-rw-r--r--scripts/windows-boot/README.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/windows-boot/README.md b/scripts/windows-boot/README.md
index ac76ecdaa..1ace54184 100644
--- a/scripts/windows-boot/README.md
+++ b/scripts/windows-boot/README.md
@@ -99,3 +99,33 @@ game processes on one GPU make both runs meaningless and can take the driver dow
99| `minidump.py PID OUT.dmp` | a minidump through dbghelp's `MiniDumpWriteDump`. Do not use `rundll32 comsvcs.dll MiniDump`: Defender flags it. A dump holds game memory: local only | 99| `minidump.py PID OUT.dmp` | a minidump through dbghelp's `MiniDumpWriteDump`. Do not use `rundll32 comsvcs.dll MiniDump`: Defender flags it. A dump holds game memory: local only |
100 100
101Each prints its usage with `-h` (Python) or `Get-Help` (PowerShell). 101Each prints its usage with `-h` (Python) or `Get-Help` (PowerShell).
102
103## Recover a stack from a manually mapped image
104
105When the exception stack stops inside the mapped executable, run `mapped_stack.py` on the existing
106private dump. Supply the exact PE from the crashing build and an x64 CDB from Debugging Tools for
107Windows. If CDB is on your PATH, omit `--cdb`. The optional `--symbols` takes one local directory
108containing the matching runtime images and PDBs.
109
110```powershell
111py -3 -I scripts\windows-boot\mapped_stack.py D:\runs\fault\crash.dmp D:\package\title.exe --symbols D:\build\RelWithDebInfo --cdb "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe"
112```
113
114The command derives the mapping base, including a relocated base, by locating a unique captured
115instruction window in an executable section of the supplied PE. It checks for a file-backed x64
116unwind entry at the exception RIP and compares captured bytes from the first header page and that
117function's unwind metadata when available.
118A small dump can establish a local code match only. Use the original image even if another build
119has the same function. Exit-only snapshots, faults outside the supplied image, leaf functions
120without unwind entries, and missing, patched or ambiguous instruction windows cannot establish
121this stack.
122
123CDB reads the exception context and uses the disk image's unwind data to recover callers. The
124script makes a temporary copy of the PE beside the dump under the debugger alias `leonida_mapped`.
125It disables network symbols and writes private frame rows to a new `mapped-stack.txt` beside the
126dump. Use `--output` for a different new file. A successful walk recovers at least one caller and
127can stop when later stack memory or module information is missing. Keep dumps and reports outside
128the checkout and share only the outcome and frame count.
129
130Run the synthetic regression tests with `py -3 -I tests\test_mapped_stack.py`. To include the
131native CDB walk, put x64 CDB on PATH or set `LEONIDA_TEST_CDB` to its full path.