3 ms·
Yes, .pdb files are used by most toolchains for debug information on Windows. No, Go doesn't use .pdb files. On all platforms Go stores a significant amount o
by kjksf 6y ago
Yes, .pdb files are used by most toolchains for debug information on Windows.
No, Go doesn't use .pdb files.
On all platforms Go stores a significant amount of meta-data in the binary, in the same format so that they can access it using the same code on all platforms.
This information is used by the runtime. Precise garbage collector needs to know the layout of structures and stack to know which fields are pointers; To generate readable callstack Go needs info about function and where they come from (source code file name, position). etc.
A sidenote: you can convert DWARF debug info to .pdb using external tool which allows debugging Go programs with Windows native debuggers like WinDBG.