[Rpm-maint] debugedit: Add some testcases and handle .debug_macro (gcc -g3)

Mark Wielaard mark at klomp.org
Mon Jun 17 09:23:21 UTC 2019


debugedit wouldn't properly handle gcc -g3 which generates .debug_macro
sections. The sections would contain references to .debug_str which
debugedit rewrites. But it would not update the references in .debug_macro
which would upset various tools.  For example gdb:

Michael Schroeder had a patch for that, but that didn't handle relocations
(which happen in e.g. linux kernel modules). So I added support for that.
(patch four).

debugedit didn't have any specific tests. It was only tested as part of
the whole rpmbuild debuginfo pipeline. So I first added a bunch of test
cases (the first two patches). That helped make sure my debugedit relocation
code refactoring was working as expected (the third patches).

It also found an small issue (under valgrind) with the .debug_line
rewriting code (the last patch).

[PATCH 1/5] Add some color to the tests if available and the terminal
[PATCH 2/5] Add some debugedit tests.
[PATCH 3/5] debugedit: Refactor reading/writing of relocated values.
[PATCH 4/5] Handle .debug_macro in debugedit.
[PATCH 5/5] debugedit: Make sure .debug_line old/new idx start equal.



More information about the Rpm-maint mailing list