Bug 966675

Summary: gdb tools/gst-launch-1.0 fails because not recognized file format
Product: [Fedora] Fedora Reporter: FENG Haibo <feng.haibo>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: gbenson, jan.kratochvil, palves, pmuldoon, sergiodj, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-23 16:48:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description FENG Haibo 2013-05-23 16:29:44 UTC
Description of problem:
Downloaded gstreamer-1.0.7 source tarball
./configure GST_DISABLE_GST_DEBUG=no
make CFLAGS="-DGST_DISABLE_GST_DEBUG"
Directly run gst-launch-1.0 works:
$tools/gst-launch-1.0 
ERROR: pipeline could not be constructed: empty pipeline not allowed.

But using gdb, it reports the file format is not recognized:
$ gdb tools/gst-launch-1.0 
GNU gdb (GDB) Fedora (7.5.1-38.fc18)
Copyright (C) 2012 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 "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/home/haibo/dev/gstreamer-1.0.7/tools/gst-launch-1.0": not in executable format: File format not recognized


Version-Release number of selected component (if applicable):
GNU gdb (GDB) Fedora (7.5.1-38.fc18)
gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)

How reproducible:
As the description

Steps to Reproduce:
1.Downloaded gstreamer-1.0.7 source tarball
2../configure GST_DISABLE_GST_DEBUG=no
make CFLAGS="-DGST_DISABLE_GST_DEBUG"
3.$ gdb tools/gst-launch-1.0 


Actual results:
gst-launch-1.0": not in executable format: File format not recognized

Expected results:
gdb can debug it.


Additional info:

Comment 1 Tom Tromey 2013-05-23 16:44:53 UTC
What does "file tools/gst-launch-1.0" say?

Comment 2 Jan Kratochvil 2013-05-23 16:48:02 UTC
tools/gst-launch-1.0
gdb tools/.libs/lt-gst-launch-1.0 

tools/gst-launch-1.0 is a libtool script

There are various other options how to run it, Google something about gdb-ing libtool-built programs.

One could possibly do something like:
  gdb -ex r --args bash tools/gst-launch-1.0
But I do not recommend it, you may run also gcc under gdb etc.
You are right gdb does not support inferior 'shebang'.