4 ms·
Given the article is talking about DWARF debugging formats, I believe the numbers in the article are for Linux binaries. I'm not sure if Windows binaries store
by skykooler 6y ago
Given the article is talking about DWARF debugging formats, I believe the numbers in the article are for Linux binaries. I'm not sure if Windows binaries store line numbers in the same way.
- ygra 6y agoDoesn't Windows usually just use a .pdb file next to the exe/dll, containing the debugging information? So stripping debug information on Windows is just deleting (or not distributing) that file.
- mehrdadn 6y agoNot entirely, there's also a debug directory embedded inside executables that gets stripped.
- kjksf 6y agoYes, .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.