[Upstream] "/usr/bin/localc": not in executable format: File format not recognized

Bug #871940 reported by penalvch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdb
Invalid
Wishlist
gdb (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

1) lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

2) apt-cache policy gdb
gdb:
  Installed: 7.3-0ubuntu2
  Candidate: 7.3-0ubuntu2
  Version table:
 *** 7.3-0ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy libreoffice-calc
libreoffice-calc:
  Installed: 1:3.4.3-3ubuntu2
  Candidate: 1:3.4.3-3ubuntu2
  Version table:
 *** 1:3.4.3-3ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen at the Terminal:

gdb localc 2>&1 | tee gdb-libreoffice.txt

is LibreOffice Calc opens via gdb for debugging purposes.

4) What happens instead is Calc is not launched with the following shown in the Terminal:

 GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 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-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
"/usr/bin/localc": not in executable format: File format not recognized
(gdb)

Reproducible in:

lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04

apt-cache policy gdb
gdb:
  Installed: 7.4-0ubuntu1
  Candidate: 7.4-0ubuntu1
  Version table:
 *** 7.4-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

WORKAROUND: Attach to the process ID via the Terminal:

sudo gdb localc 21015 2>&1 | tee ~/Desktop/gdb-libreoffice.txt

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gdb 7.3-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic-pae 3.0.4
Uname: Linux 3.0.0-12-generic-pae i686
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Mon Oct 10 14:36:49 2011
EcryptfsInUse: Yes
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110921.3)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gdb
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
penalvch (penalvch) wrote :
penalvch (penalvch)
description: updated
penalvch (penalvch)
Changed in gdb (Ubuntu):
importance: Undecided → Low
penalvch (penalvch)
description: updated
Revision history for this message
In , penalvch (penalvch) wrote :

Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/871940

1) lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04

2) apt-cache policy gdb
gdb:
  Installed: 7.4-0ubuntu1
  Candidate: 7.4-0ubuntu1
  Version table:
 *** 7.4-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy libreoffice-calc
libreoffice-calc:
  Installed: 1:3.5.0~beta2-2ubuntu4
  Candidate: 1:3.5.0~beta2-2ubuntu4
  Version table:
 *** 1:3.5.0~beta2-2ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen at the Terminal:

gdb localc 2>&1 | tee gdb-libreoffice.txt

is LibreOffice Calc opens via gdb for debugging purposes.

4) What happens instead is Calc is not launched with the following shown in the Terminal:

 GNU gdb (Ubuntu/Linaro 7.4-0ubuntu1) 7.4
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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/usr/bin/localc": not in executable format: File format not recognized
(gdb)

WORKAROUND: Attach to the process ID via the Terminal:

sudo gdb localc 21015 2>&1 | tee gdb-libreoffice.txt

Changed in gdb (Ubuntu):
status: New → Triaged
summary: - "/usr/bin/localc": not in executable format: File format not recognized
+ [Upstream] "/usr/bin/localc": not in executable format: File format not
+ recognized
Changed in gdb:
importance: Unknown → Low
status: Unknown → Confirmed
Revision history for this message
In , Tromey-redhat (tromey-redhat) wrote :

I don't have an Ubuntu install, but at least on Fedora,
/usr/bin/oocalc is a shell script.
What does "file /usr/bin/localc" say?

Changed in gdb:
status: Confirmed → Incomplete
Revision history for this message
In , Jan Kratochvil (jan-kratochvil) wrote :

GDB could automatically do:
  gdb --args /bin/sh -c /usr/bin/oocalc

Revision history for this message
In , Tromey-redhat (tromey-redhat) wrote :

(In reply to comment #2)
> GDB could automatically do:
> gdb --args /bin/sh -c /usr/bin/oocalc

Yeah, I have thought about that for the future, maybe as
part of switching over to multi-inferior-by-default or something.
This would be useful for the situation where libtool makes a
shell script for you instead of a real executable...
However, an additional feature would be needed as well, because
the above won't work as expected if you want to pass your own
arguments to the inferior.

Revision history for this message
In , penalvch (penalvch) wrote :

file /usr/bin/localc
/usr/bin/localc: POSIX shell script text executable

Changed in gdb:
status: Incomplete → Confirmed
Revision history for this message
In , Tromey-redhat (tromey-redhat) wrote :

Ok, this isn't a bug.
gdb doesn't know about shell scripts.
I don't really think we're serious in comment #2 and comment #3;
but if someone thinks otherwise they can reopen this and turn
it into a feature request with the appropriate synopsis.

Revision history for this message
In , penalvch (penalvch) wrote :

I did not know if this was a bug or enhancement. Since this is not a bug, this is an enhancement request.

Changed in gdb:
importance: Low → Wishlist
Matthias Klose (doko)
Changed in gdb (Ubuntu):
importance: Low → Wishlist
Revision history for this message
In , Ssbssa (ssbssa) wrote :

Dup.

*** This bug has been marked as a duplicate of bug 12208 ***

Changed in gdb:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.