gdb/2088: Segfault on any action when binary compiled with -ggdb3 (Ubuntu GNU/Linux, AMD64, GDB 6.3-debian, GCC, C)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gdb/2088: Segfault on any action when binary compiled with -ggdb3 (Ubuntu GNU/Linux, AMD64, GDB 6.3-debian, GCC, C)

mrudary

>Number:         2088
>Category:       gdb
>Synopsis:       Segfault on any action when binary compiled with -ggdb3 (Ubuntu GNU/Linux, AMD64, GDB 6.3-debian, GCC, C)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 21 19:08:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     [hidden email]
>Release:        GNU gdb 6.3-debian
>Organization:
>Environment:
System: Linux link 2.6.12-10-amd64-generic #1 Mon Feb 13 12:14:05 UTC 2006 x86_64 GNU/Linux (Ubuntu 5.10)
GDB configuration: x86_64-linux-gnu
Package version: 6.3-6ubuntu2_amd64
GCC version (for compiled programs): 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
>Description:
When compiling any program on my AMD64 (running Ubuntu 5.10 AMD64 version) using the -ggdb3 switch, gdb segfaults on, e.g. "break main", "break 7", etc.

Does not segfault if the program was compiled with -ggdb.

Does not segfault on a 32-bit machine running Ubuntu 5.10.
>How-To-Repeat:
Compile attached program with following command line:
gcc -Wall -ggdb3 binary.c -o binary
Run gdb:
gdb ./binary
Command
break main
causes a segfault.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="binary.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="binary.c"

I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RkbGliLmg+CgppbnQgbWFpbigpIHsKCWNoYXIg
YnVmWzEwMjRdOwoKCXdoaWxlIChmZ2V0cyhidWYsIDEwMjQsIHN0ZGluKSkgewoJCXByaW50Zigi
JWMiLCAoY2hhcikgc3RydG9sKGJ1ZiwgTlVMTCwgMikpOwoJfQoJcHJpbnRmKCJcbiIpOwoJcmV0
dXJuIDA7Cn0K
Reply | Threaded
Open this post in threaded view
|

Re: gdb/2088: Segfault on any action when binary compiled with -ggdb3 (Ubuntu GNU/Linux, AMD64, GDB 6.3-debian, GCC, C)

Daniel Jacobowitz-2
The following reply was made to PR gdb/2088; it has been noted by GNATS.

From: Daniel Jacobowitz <[hidden email]>
To: [hidden email]
Cc: [hidden email]
Subject: Re: gdb/2088: Segfault on any action when binary compiled with -ggdb3 (Ubuntu GNU/Linux, AMD64, GDB 6.3-debian, GCC, C)
Date: Tue, 21 Feb 2006 21:24:29 -0500

 On Tue, Feb 21, 2006 at 06:59:53PM -0000, [hidden email] wrote:
 > System: Linux link 2.6.12-10-amd64-generic #1 Mon Feb 13 12:14:05 UTC 2006 x86_64 GNU/Linux (Ubuntu 5.10)
 > GDB configuration: x86_64-linux-gnu
 > Package version: 6.3-6ubuntu2_amd64
 
 Please try a build of GDB from CVS; I believe this problem has already
 been fixed.
 
 --
 Daniel Jacobowitz
 CodeSourcery