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
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?
GDB could automatically do: gdb --args /bin/sh -c /usr/bin/oocalc
(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.
file /usr/bin/localc /usr/bin/localc: POSIX shell script text executable
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.
I did not know if this was a bug or enhancement. Since this is not a bug, this is an enhancement request.
Dup. *** This bug has been marked as a duplicate of bug 12208 ***