This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/1087: "next" seems to act as "step" under g++-3.2.1 / Solaris 2.7
- From: Jason dot Elbaum at motorola dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 23 Feb 2003 11:09:25 -0000
- Subject: gdb/1087: "next" seems to act as "step" under g++-3.2.1 / Solaris 2.7
- Reply-to: Jason dot Elbaum at motorola dot com
>Number: 1087
>Category: gdb
>Synopsis: "next" seems to act as "step" under g++-3.2.1 / Solaris 2.7
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 23 11:18:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Jason dot Elbaum at motorola dot com
>Release: GNU gdb 2003-02-03-cvs
>Organization:
>Environment:
uname -a:
SunOS gremlin 5.7 Generic_106541-19 sun4u sparc SUNW,Ultra-5_10
gcc -v:
Configured with: ./configure --enable-largefile --disable-shared --prefix=/users/jasone/install/gcc-3.2.1-new --with-local-prefix=/usr/local --inc=/usr/local/include
Thread model: posix
gcc version 3.2.1
This GDB was configured as "sparc-sun-solaris2.7"...
>Description:
When debugging a C++ program compiled with g++-3.2.1, gdb's "next" command sometimes appears to be broken. It seems to function like "step" - though maybe not even that. It might just be broken.
This problem does not appear to occur with g++-3.2, so the bug may be in the compiler rather than the debugger.
>How-To-Repeat:
In the interaction below, the "next" command plunges the debugger into std::allocator<char>::allocator() instead of walking past the string constructor.
> g++ -o sstream_test2 -g sstream_test2.cc
> gdb sstream_test2
GNU gdb 2003-02-03-cvs
Copyright 2003 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 "sparc-sun-solaris2.7"...
(gdb) break 8
Breakpoint 1 at 0x292b4: file sstream_test2.cc, line 8.
(gdb) run
Starting program: /users/jasone/projects/misc/sstream_gdb3.2.1plain
Breakpoint 1, main () at sstream_test2.cc:8
8 string s("aaa 2.3 3 bbb");
(gdb) n
0x00044a10 in std::allocator<char>::allocator() ()
at /users/jasone/install/gcc-3.2.1/libstdc++-v3/src/fstream.cc:41
41 basic_filebuf<char>::_M_underflow_common(bool __bump)
(gdb) q
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="sstream_test2.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="sstream_test2.cc"
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHNzdHJlYW0+Cgp1c2luZyBuYW1lc3BhY2Ugc3Rk
OwoKbWFpbigpCnsgICAgICAgIAogICAgc3RyaW5nIHMoImFhYSAyLjMgMyBiYmIiKTsKCiAgICBp
bnQgajsgIAogICAgZG91YmxlIGQ7CiAgICBzdHJpbmcgczEsIHMyOwoKICAgIGlzdHJpbmdzdHJl
YW0gcGFyc2VTdHJlYW0ocyk7CiAgICBwYXJzZVN0cmVhbSA+PiBzMSA+PiBkID4+IGogPj4gczI7
CQp9Cg==