Hi, There is an existing bug (probably on rpm-build's debugedit) which introduces a problem on .debug_macro sections in objfiles and causes GDB to segfault when trying to extract the DWARF index (via the gdb-add-index script). This bug manifests when a binary is built using GCC's -g3 flag, which is the case with grub2. The workaround for it is to just build it with -g, which is also the recommended flag for building Fedora packages. I will provide a patch that does that. Related: Bug 1708192 and Bug 1535174. Thanks.
Created attachment 1566798 [details] Don't use -g3 when compiling grub2
(In reply to Sergio Durigan Junior from comment #1) > Created attachment 1566798 [details] > Don't use -g3 when compiling grub2 Thanks a lot for the patch. I've picked it and built grub2-2.02-88.fc31 that includes this.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.