From Fedora Project Wiki

Description

This test case ensures that dwz can optimize DWARF debugging information in ELF binaries without corruption.

Setup

  1. Ensure dwz is installed using: dnf install dwz.
  2. Compile a helloworld C/C++ application with debugging information: gcc -g -o sample sample.c.

How to test

  1. Optimize the debugging information with dwz: dwz sample.
  2. Use a debugging tool, like gdb, to debug the sample binary.
  3. Check if debug symbols are accessible and the application is debuggable.

Expected Results

  1. Debugging tools should access the symbols and debug the application without any issues, indicating the DWARF sections were not corrupted.
  2. dwz should complete its optimization without errors.

[r00t@fedora ~]$ dwz sample dwz: sample: DWARF compression not beneficial - old size 340 new size 340

Optional

  1. Run dwz on more complex applications or shared libraries.
  2. Monitor for any size reduction in the debugging information.
  3. Check for speed improvements during debugging due to optimized debug info.