MORE OFFTOPIC Re: I've just released Vasaro

Jacob Carlborg doob at me.com
Tue Dec 11 16:32:31 UTC 2018


On 2018-12-11 13:23, Iain Buclaw wrote:

> Dwarf data is emitted on OSX. The section where to find all debug
> symbols is prefixed by "__DWARF".  Even DMD does this on OSX. ;-)

Yes, but the linker strips any sections with the "S_ATTR_DEBUG" flag, 
which includes the everything in the "__DWARF" segment. Here's my commit 
message for convenience:

The linker on macOS will remove any debug info, i.e. every section
with the `S_ATTR_DEBUG` flag, this includes everything in the
`__DWARF` section. By using the `S_REGULAR` flag the linker will not
remove this section. This allows to get the filenames and line numbers
for backtraces from the executable.

Normally the linker removes all the debug info but adds a reference to
the object files. The debugger can then read the object files to get
filename and line number information. It's also possible to use an
additional tool that generates a separate `.dSYM` file. This file can
then later be deployed with the application if debug info is needed
when the application is deployed.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list