This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/1801: Linux g++ C++ assert
- From: xavier dot warin at der dot edfgdf dot fr
- To: gdb-gnats at sources dot redhat dot com
- Date: 29 Oct 2004 09:15:49 -0000
- Subject: gdb/1801: Linux g++ C++ assert
- Reply-to: xavier dot warin at der dot edfgdf dot fr
>Number: 1801
>Category: gdb
>Synopsis: Linux g++ C++ assert
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: patch
>Submitter-Id: net
>Arrival-Date: Fri Oct 29 09:18:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: xavier.warin@der.edfgdf.fr
>Release: 6.2.1
>Organization:
>Environment:
Linux clr34bj 2.6.8.1 #1 SMP Wed Oct 13 15:46:16 CEST 2004 i686 GNU/Linux
>Description:
Problem with g++3.3.4
When using an assert in C/C++, if the assert fails, it is impossible to see where the failure is .
g++ --version
g++ (GCC) 3.3.4 (Debian 1:3.3.4-13)
g++ -o test2 -g test2.cpp
clr34bj:~> gdb test2
GNU gdb 6.2.1
Copyright 2004 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run
Starting program: /users/warin/test2
test2: test2.cpp:11: int main(): Assertion `b < 0.' failed.
Program received signal SIGABRT, Aborted.
0x4013fee9 in raise () from /lib/tls/libc.so.6
(gdb) up
#1 0x4024dedc in ?? () from /lib/tls/libc.so.6
(gdb) up
#2 0xbffff950 in ?? ()
(gdb) up
#3 0x40141781 in abort () from /lib/tls/libc.so.6
(gdb) up
#4 0x00000000 in ?? ()
(gdb) up
#5 0x00000020 in ?? ()
(gdb) up
#6 0x00000000 in ?? ()
(gdb)
No mapping for the code.
>How-To-Repeat:
As i did in the description
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test2.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test2.cpp"
CiNpbmNsdWRlIDxhc3NlcnQuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsK
CiAgZG91YmxlIGIgPSAyLiAgOwoKICBhc3NlcnQoIGIgPCAwLiApIDsKICByZXR1cm4gMDsKfQoK
Cg==