This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
gdb/2088: Segfault on any action when binary compiled with -ggdb3 (Ubuntu GNU/Linux, AMD64, GDB 6.3-debian, GCC, C)
- From: mrudary at umich dot edu
- To: gdb-gnats at sources dot redhat dot com
- Date: 21 Feb 2006 18:59:53 -0000
- Subject: gdb/2088: Segfault on any action when binary compiled with -ggdb3 (Ubuntu GNU/Linux, AMD64, GDB 6.3-debian, GCC, C)
- Reply-to: mrudary at umich dot edu
>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: mrudary@umich.edu
>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