1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:54:40 -07:00
go/cmd/splitdwarf
David Chase d30e00c240 splitdwarf: initial working commit
splitdwarf osxMachoFile [ osxDsymFile ]

splitdwarf takes an executable produced by go build as input,
and uncompresses and copies the DWARF segment into a separate
file in the way that is expected by OSX-hosted tools
(lldb and ports of gdb).
If osxDsymFile is not named explicitly, the default of
"<osxMachoFile>.dSYM/Contents/Resources/DWARF/<osxMachoFile>"
is used instead, with directories created as needed.

If the input file contains no UUID, then one is created by
hashing non-DWARF segment contents, and added to the
executable. This is necessary because gdb and lldb both
expect matching UUIDs to be present in the executable
and its debugging symbols.

Includes a modified version of debug/macho, with additional
definitions and the ability to write segments, sections, and
some MachO load commands added.

Change-Id: Ia5b0e289260f72bbca392cdf2c7c0a75e3ca40e5
Reviewed-on: https://go-review.googlesource.com/c/143357
Reviewed-by: Austin Clements <austin@google.com>
2019-01-09 16:56:30 +00:00
..
internal/macho splitdwarf: initial working commit 2019-01-09 16:56:30 +00:00
doc.go splitdwarf: initial working commit 2019-01-09 16:56:30 +00:00
splitdwarf.go splitdwarf: initial working commit 2019-01-09 16:56:30 +00:00