Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d8a9cc9
Implement a new CodeView debugging symbol emitter to cover additions …
LightBender Jun 29, 2026
b6c3461
Merge branch 'master' of github.com:LightBender/dmd into newpdb
LightBender Jun 29, 2026
d88e5e7
Merge branch 'master' of github.com:LightBender/dmd into newpdb
LightBender Jun 29, 2026
77d6b8d
Fix incorrect record generations.
LightBender Jun 29, 2026
bc6952a
Add changelog entry.
LightBender Jun 29, 2026
6bd451e
Remove reference to MSCOFF.
LightBender Jun 30, 2026
28b1bb3
Added initBuf local method to simplify code. Invert if to reduce nest…
LightBender Jun 30, 2026
b31e991
Fix trailing whitespace.
LightBender Jun 30, 2026
6017d3e
Update help test.
LightBender Jun 30, 2026
191523a
Update globals.h
LightBender Jul 1, 2026
6e93d2a
Enable -preview=newpdb on the testpdb.d test.
LightBender Jul 1, 2026
4f6acb2
Fix testpdb.d
LightBender Jul 1, 2026
52fefed
Fixes for Rainer's feedback.
LightBender Jul 1, 2026
494c9f3
Combine cv4.d/cv8.d/pdb.d into a single file named codeview.d and rem…
LightBender Jul 3, 2026
6ff75f8
Revert "Combine cv4.d/cv8.d/pdb.d into a single file named codeview.d…
LightBender Jul 6, 2026
da1264e
Moved all new additions and improvements to cv8.d and removed pdb.d a…
LightBender Jul 6, 2026
6fd9426
Add support for LF_UDT_SRC_LINE.
LightBender Jul 6, 2026
1001171
Fix OOM by capping function IDs at CV8_MAX_SYMBOL_LENGTH
LightBender Jul 6, 2026
afa9a1b
Nit cleanup.
LightBender Jul 6, 2026
66ff1be
Merge branch 'master' into newpdb
LightBender Jul 6, 2026
9285dc7
use toAbsolute()
LightBender Jul 6, 2026
ff0eb7d
Fix cv_udt Docs.
LightBender Jul 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions changelog/dmd.newpdb.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Improved CodeView / PDB symbolic debug info on Windows

The Windows CodeView / PDB debug information emitter (used with `-g` when producing MS-COFF object files) now emits additional modern records expected by Microsoft and LLVM debugging tools. These improvements are enabled by default, so debugging with Visual Studio, WinDbg and LLVM-based tools works better out of the box.

The following are now generated:

$(LIST
* `S_OBJNAME` and `S_COMPILE3` compiland records reporting the configured language and the real compiler version string,
* `S_ENVBLOCK` and `S_BUILDINFO` (`LF_BUILDINFO`) records describing the build environment,
* `S_FRAMEPROC` records describing each function's stack frame,
* `LF_UDT_SRC_LINE` records recording the source file and line where each user-defined type (struct, class, enum) is defined, so debuggers can jump to a type's definition,
* blake3 source-file checksums in the file-checksums subsection so debuggers can verify the source matches.
)

No action is required; simply compile with `-g` as before:

```console
dmd -g myapp.d
```
7 changes: 5 additions & 2 deletions compiler/src/dmd/backend/backconfig.d
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import core.stdc.stdio;
import dmd.backend.cdef;
import dmd.backend.cc;
import dmd.backend.code;
import dmd.backend.global : ErrorCallbackBackend, error, errorCallbackBackend;
import dmd.backend.global : ErrorCallbackBackend, error, errorCallbackBackend,
GetFileContentsCallback, getFileContentsCallback;
import dmd.backend.go : go_flag, GlobalOptimizer;
import dmd.backend.rtlsym : rtlsym_init;
import dmd.backend.ty;
Expand Down Expand Up @@ -87,11 +88,13 @@ void out_config_init(
bool generatedMain, // a main entrypoint is generated
bool dataimports,
ref GlobalOptimizer go,
ErrorCallbackBackend errorCallback)
ErrorCallbackBackend errorCallback,
GetFileContentsCallback getFileContents)
{
//printf("out_config_init()\n");

errorCallbackBackend = errorCallback;
getFileContentsCallback = getFileContents;
auto cfg = &config;

cfg._version = _version;
Expand Down
Loading
Loading