Skip to content

Auto-include dump directory in symbol search path#41

Open
SSyl wants to merge 1 commit intosvnscha:mainfrom
SSyl:symbol-path-improvement
Open

Auto-include dump directory in symbol search path#41
SSyl wants to merge 1 commit intosvnscha:mainfrom
SSyl:symbol-path-improvement

Conversation

@SSyl
Copy link

@SSyl SSyl commented Feb 7, 2026

Summary

  • Auto-prepend the dump file's directory to CDB's symbol search path (-y flag) so co-located PDBs are found automatically. This is on by default and matches standard debugging conventions.
  • Add --no-dump-dir-symbols CLI flag to opt out of the automatic behavior.
  • Add per-call symbols_path parameter to open_windbg_dump and run_windbg_cmd for explicit symbol path control. Combined with the server-level default. Only applies when creating a new session — if a session already exists, a note is returned explaining this.
  • Update tool descriptions to mention that sessions are persistent and should be closed when analysis is complete. In practice, some LLMs would leave orphaned CDB processes running without this hint.

Before

PDBs sitting next to the dump file were not found — stack traces showed wrong symbols with huge offsets (export symbols only):

UE4SS!RC::get_mod_ref+0x198c9        <- WRONG, huge offset
UE4SS!RC::get_mod_ref+0x19b17        <- WRONG, huge offset

After

Same dump, correct symbols loaded automatically from the dump's directory:

UE4SS!RC::process_simple_actions::__l2::<lambda_1>::operator()+0x29   <- CORRECT
UE4SS!std::erase_if+0x44                                              <- CORRECT
UE4SS!RC::process_simple_actions+0x59                                 <- CORRECT
UE4SS!RC::engine_tick_hook+0x67                                       <- CORRECT

Test plan

  • Verified open_windbg_dump loads co-located PDBs automatically (private pdb symbols)
  • Verified run_windbg_cmd loads co-located PDBs on demand when stack walking triggers symbol resolution
  • Verified --no-dump-dir-symbols disables the auto-include (falls back to export symbols only)
  • Verified .sympath output shows dump directory prepended to symbol path
  • Verified session-exists warning when symbols_path is provided on an already-active session

🤖 Generated with Claude Code

PDB files co-located with crash dumps were not found because the dump's
directory was never added to CDB's symbol path. This caused degraded
stack traces with wrong symbols and huge offsets (export symbols only).

Changes:
- Auto-prepend dump directory to symbol search path on session creation
- Add --no-dump-dir-symbols CLI flag to opt out
- Add per-call symbols_path parameter to open_windbg_dump and run_windbg_cmd
- Return session-exists warning when symbols_path cannot be applied
- Update tool descriptions to explicitly mention persistent sessions and
  that they should be closed when done. In practice, some LLMs would
  leave orphaned CDB processes running without this hint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant