gcc: include gdb helpers for libstdc++ [ci skip] #37864
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So. Gcc (or more specifically libstdc++) includes extra files to make debugging C++ code in gdb easier. This includes pretty printers and xmethods. These files can significantly improve the experience of debugging C++ code. Debian based distros (and probably other ones) already include this into their libstdc++ package.
But Void explicitly deletes these files that are generated when compiling. Rather than deleting these useful files, I included then into the libstdc++ package like Ubuntu does. This doesn't add any extra dependencies, gdb will try to load it if python is present, otherwise it'll ignore it.
There are some other packages that already include extra info for gdb:
gstreamer1
,glib-devel
... Interestingly enough, these packages put the files into/usr/share/gdb/auto-load/usr/lib64
instead of/usr/share/gdb/auto-load/usr/lib
, which isn't loaded by gdb at all (maybe because/usr/lib64
is just a symlink).The files could be moved to
libstdc++-devel
. Maybe it would be more apropriate.I have built and tested the pretty printers and everything works. It took 5 and a half hours to compile for me (I dont have a very beefy computer), so I'm assigning
[ci skip]
.I know messing with a
bootstrap=yes
compiler could cause a disaster if something goes wrong but I'm only modifying revelant files and it's working for me (I have it installed on my computer) so I hope everything will be fine.Testing the changes
Local build testing