Skip to content

Debugging Tool Release Symbols

Mainkill1 edited this page Sep 21, 2026 · 1 revision

Release symbols with objcopy and strip

← Debugging Tools and Commands

An optimized executable and its matching separate DWARF file preserve production timing while allowing sampled addresses to resolve back to source.

Property Details
Supported OS GNU Binutils runs on Windows, Linux, and macOS; xemu Win64 builds commonly use the MinGW-prefixed tools.
Install Install GNU Binutils or use the project pinned build toolchain.
Verify x86_64-w64-mingw32-objcopy --version
Primary output See the workflow below.

When to use it

For timing-sensitive xemu investigations, use an optimized Release-equivalent build and retain debug information separately.

DWARF does not make the executable a Debug build. It allows optimized machine addresses to be mapped back to source.

If the build pipeline already creates the stripped executable and matching debug file, use that path. A manual GNU-binutils split looks like this:

x86_64-w64-mingw32-objcopy --only-keep-debug xemu.exe xemu.debug
x86_64-w64-mingw32-strip --strip-debug xemu.exe
x86_64-w64-mingw32-objcopy --add-gnu-debuglink=xemu.debug xemu.exe

Hash the final stripped executable and the retained debug artifact after the split.

Why this matters

Debug/unoptimized binaries can materially change:

  • thread timing;
  • lock hold time;
  • worker completion order;
  • shader/pipeline compile overlap;
  • queue pressure;
  • TCG dispatch behavior;
  • renderer/vCPU races;
  • snapshot/lifecycle ordering.

If the bug only reproduces under optimized timing, a Debug build may make the investigation disappear or move somewhere else.


Boundaries and common mistakes

Create the debug file from the exact linked executable, then strip that same executable and add its debug link. Hash both outputs after the operation. Never symbolize one build with another build's DWARF.

Debug information does not imply an unoptimized Debug build. Optimization level and symbol retention are separate decisions.

Evidence to retain

  • Tool name and exact version.
  • Source commit/tree and executable SHA-256.
  • The complete command or saved profile used.
  • Input artifact hashes and the explicitly selected time or address range.
  • Raw output plus any derived report; do not retain only a screenshot or conclusion.
  • Admission failures, warnings, dropped events, incomplete rows, or unsupported operations.

Official references

Related xemu guides

Clone this wiki locally