Bug 485134 - [PATCH] vgcore files unusable in gdb / does not load debug symbols
Summary: [PATCH] vgcore files unusable in gdb / does not load debug symbols
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.16.1
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-06 15:24 UTC by Bernhard Übelacker
Modified: 2024-04-10 05:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
add_auxiliary_vector_to_vgcore_files.patch (1.52 KB, patch)
2024-04-06 15:24 UTC, Bernhard Übelacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Übelacker 2024-04-06 15:24:36 UTC
Created attachment 168219 [details]
add_auxiliary_vector_to_vgcore_files.patch

It seems gcc defaults now quite some time to create pie executables.
And gdb seems to rely for core files of such executables to contain an auxv section.

This was found in this Debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993018
There are more details about reproducing it.

I investigated back then and came up with an patch which makes valgrind write the auxv section into the core file.
Unfortuantely forgot about it and now trying to upstream this.
Would such a patch be acceptable? If yes, how should I proceed?

Patch is attached and it seems still to apply to current valgrind 3.20.0 in Debian Trixie/testing.