Give the PdbGen tests real coverage via the compiler's breakpoint map - #3815
Merged
Conversation
The PdbGen tests compared the reconstructed PDB to the C# compiler's byte-for-byte, so any non-trivial method failed on reconstructed IL ranges, hidden sequence points and local scopes - none of which the decompiler can reproduce exactly. That left four of seven fixtures [Ignore]d and the suite with almost no coverage. Compare only what a debugging user actually feels: the visible (non-hidden) breakpoint map, parsed straight from the sequence-point blobs and keyed by method-definition row (shared between the PDB and the PE it describes). IL offsets, hidden points, local scopes and the embedded source are dropped. The compiler's own PDB is the oracle, so the tests assert correct debugging behavior rather than the decompiler's past output. Methods where the decompiler legitimately diverges pin an auto-derived residual snapshot, the same accept-the-diff workflow as the pretty tests; a separate oracle-free check rejects duplicate or overlapping sequence points. Un-ignores ForLoopTests, LambdaCapturing and Members (its source is regenerated to match the decompiler's per-type output, collapsing ~50 lines of indentation-induced coordinate noise to two genuine differences). Assisted-by: Claude:claude-opus-4-8:Claude Code
siegfriedpammer
force-pushed
the
pdbgen-sequence-point-tests
branch
2 times, most recently
from
June 25, 2026 21:51
e6cde7a to
4b1db46
Compare
Extends the breakpoint-map comparison to hidden sequence points, anchoring each hidden point to the visible point it follows so the descriptor stays independent of the IL offsets the decompiler reconstructs. Adds PdbGen cases spanning try/catch/finally, switch, async/await, yield, loops, LINQ, pattern matching and more, pinning the known residuals where the decompiler folds a compiler-hidden branch into an adjacent point. Assisted-by: Claude:claude-opus-4-8:Claude Code
siegfriedpammer
force-pushed
the
pdbgen-sequence-point-tests
branch
from
June 25, 2026 22:23
4b1db46 to
ed23d94
Compare
The PDB sequence-point tests were missing real while-loop input, and their residual comparison treated breakpoint locations as an unordered multiset. Add coverage for while/do-while fixtures and compare residuals in sequence order so stepping-order changes are pinned. Assisted-by: CodeAlta:gpt-5.5:CodeAlta
siegfriedpammer
force-pushed
the
pdbgen-sequence-point-tests
branch
from
June 26, 2026 04:00
ed23d94 to
4e36add
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Gives the PdbGen test kind real coverage. Previously the tests compared ILSpy's reconstructed PDB to the C# compiler's PDB byte-for-byte, so any non-trivial method failed on IL ranges, hidden sequence points and local scopes the decompiler cannot reproduce exactly. Several fixtures were ignored or scaffolded with empty source bodies that passed vacuously.
How
.cctorstatic-field initializers, folded loop back-branches, etc.) pin an auto-derived residual snapshot, using the same accept-the-diff workflow as the pretty tests. A separate oracle-free check rejects duplicate or overlapping sequence points..csfiles rather than source embedded in XML CDATA, and empty/stub fixtures are filled with source that exercises the named constructs.Test-only change; no decompiler or UI behavior is affected.
Assisted-by: CodeAlta:gpt-5.5:CodeAlta