Description of problem:
The FreePascal debugging option -gs (Generate stabs debug information) breaks gdb. Not sure if it's more a gdb or fpc bug, but gdb should not crash in any way. Don't ask me what's going on in the compiler.
Attached please find actual binary file, which crashes gdb. Debugging symbols should be compiled in the binary, no extra files required.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. build tuxcmd sources with the -gs freepascal debugging option
2. gdb ./tuxcmd
$ gdb ./tuxcmd
GNU gdb (GDB) Fedora (7.0-6.fc12)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /data/work/tuxcmd/git/tuxcmd/tuxcmd...Segmentation fault
Created attachment 369705 [details]
backtrace of gdb crash, caught by nested gdb
Created attachment 369706 [details]
x86_64 binary which crashes gdb
That this doesn't work is completely normal. There is no support for 64 bit in the official stabs-format. The problem could be that FPC still tries to generate this info. (This is merely for other debuggers that try to work around the omissing 64 bit support in stabs) And maybe GDB could detect this and avoid the crash.
But stabs and 64 bit is never gonna work, afaik.
I was not aware -gs means STABS.
I hope FPC already generates more useful DWARF as STABS is inferior to it.
Posted upstream although I hope Fedora has no need to actively support STABS.
gdb-7.0-9.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.