Skip to content

Commit 1f0b92c

Browse files
committed
debug: round 3 — cdb stack from minidump + dump artifact
1 parent c638e75 commit 1f0b92c

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

‎.github/workflows/debug-mcpp230.yml‎

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,32 @@ jobs:
2222
mkdir -p "$HOME/.mcpp/registry"
2323
cp -a "$root/registry/." "$HOME/.mcpp/registry/"
2424
echo "MCPP=$(cygpath -m "$root/bin/mcpp.exe")" >> "$GITHUB_ENV"
25-
- name: repro with verbose + raw exit code
25+
- name: repro (expect 0xC0000409)
2626
shell: powershell
2727
continue-on-error: true
2828
env:
2929
MCPP_INDEX_MIRROR: GLOBAL
30-
MCPP_LOG_LEVEL: debug
3130
run: |
3231
cd tests\examples\archive
33-
$p = Start-Process -FilePath $env:MCPP -ArgumentList "test","--verbose" -NoNewWindow -Wait -PassThru `
32+
$p = Start-Process -FilePath $env:MCPP -ArgumentList "test" -NoNewWindow -Wait -PassThru `
3433
-RedirectStandardOutput out.txt -RedirectStandardError err.txt
35-
"RAW EXIT CODE: $($p.ExitCode) (0x{0:X8})" -f $p.ExitCode
36-
"===== stdout tail ====="
37-
Get-Content out.txt -Tail 40
38-
"===== stderr tail ====="
39-
Get-Content err.txt -Tail 80
40-
- name: dump logs
34+
"RAW EXIT CODE: 0x{0:X8}" -f $p.ExitCode
35+
- name: analyze minidump with cdb
4136
if: always()
42-
shell: bash
37+
shell: powershell
4338
run: |
44-
echo "===== ls ~/.mcpp ====="; ls -la "$HOME/.mcpp" 2>/dev/null || true
45-
echo "===== ls ~/.mcpp/log ====="; ls -la "$HOME/.mcpp/log" 2>/dev/null || true
46-
for f in "$HOME"/.mcpp/log/mcpp.log*; do
47-
[ -f "$f" ] || continue
48-
echo "===== $f (last 200 lines) ====="; tail -n 200 "$f"
49-
done
50-
echo "===== crash dumps ====="; ls -la "$LOCALAPPDATA/CrashDumps" 2>/dev/null || true
39+
$cdb = "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe"
40+
if (!(Test-Path $cdb)) { "cdb not found"; Get-ChildItem "C:\Program Files (x86)\Windows Kits" -Recurse -Filter cdb.exe -ErrorAction SilentlyContinue | Select-Object -First 3 FullName; exit 0 }
41+
$dmp = Get-ChildItem "$env:LOCALAPPDATA\CrashDumps\mcpp.exe.*.dmp" | Select-Object -First 1
42+
if (!$dmp) { "no dump found"; exit 0 }
43+
& $cdb -z $dmp.FullName -c ".exr -1; .ecxr; k 40; lm m mcpp; q"
44+
- name: upload dump artifact
45+
if: always()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: mcpp-crash-dump
49+
path: |
50+
~/AppData/Local/CrashDumps/mcpp.exe.*.dmp
51+
tests/examples/archive/out.txt
52+
tests/examples/archive/err.txt
53+
if-no-files-found: warn

0 commit comments

Comments
 (0)