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

Panu Matilainen pmatilai at redhat.com
Thu Jun 20 09:42:01 UTC 2019

On 6/17/19 12:23 PM, Mark Wielaard wrote:
> Hi,
> 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:
> https://bugzilla.redhat.com/show_bug.cgi?id=1535174
> 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.

Series applied via https://github.com/rpm-software-management/rpm/pull/754

Thanks for the patches!

	- Panu -

More information about the Rpm-maint mailing list