Gdb cannot debug Gcc compiled program

Bug #117959 reported by Dalle
2
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: gdb

BFD chokes on the .gnu.hash sections. This is a duplicate of #73724, but even though the original is flagged as fixed it is still broken on x86_64.

---------------------------------------------------------------
dalle@dalburk:~$ cat hello.c
#include <stdio.h>

main()
{
  printf("Hello\n");
  return 0;
}
dalle@dalburk:~$ gcc -g hello.c
dalle@dalburk:~$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), not stripped
dalle@dalburk:~$ gdb a.out
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...BFD: /home/dalle/a.out: don't know how to handle OS specific section `.gnu.hash' [0x6ffffff6]
"/home/dalle/a.out": not in executable format: File format not recognized

(gdb) dalle@dalburk:~$ gcc --version
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

dalle@dalburk:~$ uname -a
Linux dalburk 2.6.20-16-generic #2 SMP Wed May 23 00:30:47 UTC 2007 x86_64 GNU/Linux

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Hi there
Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with the development branch of Ubuntu, Hardy Heron?

Thanks in advance.

Changed in gdb:
assignee: nobody → sourcercito
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Dalle (jan-erik-dahlin) wrote : Re: [Bug 117959] Re: Gdb cannot debug Gcc compiled program

Basilio Kublik wrote:
> Hi there
> Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with the development branch of Ubuntu, Hardy Heron?
>
> Thanks in advance.
>
> ** Changed in: gdb (Ubuntu)
> Importance: Undecided => Low
> Assignee: (unassigned) => Basilio Kublik (sourcercito)
> Status: New => Incomplete
>
I've given up and switched to the 32-bit version so I can't check if
things work or not. If I recall correctly, the i686 version of gdb
(bfd?) had been patched but not the x86_64 version.

Regards,

/Dalle

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Can someone confirm if this is fixed in the x86_64 version of Hardy?
I've no way to check it.

Thanks

Changed in gdb:
assignee: sourcercito → nobody
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in gdb:
status: Incomplete → 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.