You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is critical that we update the Makefile to include a way to build a binary that is debuggable. The only binary that our Makefile can generate is one that has been optimized to strip debug symbols and introduce inlining. This will be an issue if we need to debug a running binary.
Problem Definition
In order to debug a running binary the developer will need the debug symbols and to have no optimization. This type of binary is not ideal for production, but is required if we want to attach to a remote process.
Proposal
Introduce a new target in the Makefile build-debug.
Remove stripping on the linker by removing both the -s and -w flags from ldflags, but only for build-debug.
Disable optimizations and inling by introducing a set of go compiler flags -gcflags "all=-N -l" to build-debug.
Remove trimming by remove -trimpath from the ldflags for build-debug.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Summary
It is critical that we update the Makefile to include a way to build a binary that is debuggable. The only binary that our Makefile can generate is one that has been optimized to strip debug symbols and introduce inlining. This will be an issue if we need to debug a running binary.
Problem Definition
In order to debug a running binary the developer will need the debug symbols and to have no optimization. This type of binary is not ideal for production, but is required if we want to attach to a remote process.
Proposal
build-debug
.-s
and-w
flags from ldflags, but only forbuild-debug
.-gcflags "all=-N -l"
tobuild-debug
.-trimpath
from the ldflags forbuild-debug
.For Admin Use
The text was updated successfully, but these errors were encountered: