Bug 537837 - FreePascal-generated binaries compiled with -gs make gdb segfaulting on symbol load
Summary: FreePascal-generated binaries compiled with -gs make gdb segfaulting on symbo...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 12
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL: http://sourceware.org/ml/gdb-patches/...
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-16 14:28 UTC by Tomáš Bžatek
Modified: 2015-03-03 22:41 UTC (History)
4 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2009-11-17 16:33:09 UTC


Attachments (Terms of Use)
backtrace of gdb crash, caught by nested gdb (3.11 KB, text/plain)
2009-11-16 14:29 UTC, Tomáš Bžatek
no flags Details
x86_64 binary which crashes gdb (1.88 MB, application/x-bzip)
2009-11-16 14:31 UTC, Tomáš Bžatek
no flags Details

Description Tomáš Bžatek 2009-11-16 14:28:53 UTC
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):
gdb-7.0-6.fc12.x86_64
fpc-2.2.4-4.fc12.2.x86_64

How reproducible:
always

Steps to Reproduce:
1. build tuxcmd sources with the -gs freepascal debugging option
2. gdb ./tuxcmd


Additional info:

$ 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:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /data/work/tuxcmd/git/tuxcmd/tuxcmd...Segmentation fault

Comment 1 Tomáš Bžatek 2009-11-16 14:29:52 UTC
Created attachment 369705 [details]
backtrace of gdb crash, caught by nested gdb

Comment 2 Tomáš Bžatek 2009-11-16 14:31:02 UTC
Created attachment 369706 [details]
x86_64 binary which crashes gdb

Comment 3 Joost van der Sluis 2009-11-17 11:37:59 UTC
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.

Comment 4 Jan Kratochvil 2009-11-17 16:33:09 UTC
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.

Comment 5 Fedora Update System 2009-12-10 04:06:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.