c++/1976: cannot set a breakpoint on function when a struct type with the same name exist

Wan Hing Wah hingwah@hingwah.net
Fri Nov 4 02:08:00 GMT 2005


The following reply was made to PR c++/1976; it has been noted by GNATS.

From: Wan Hing Wah <hingwah@hingwah.net>
To: ramana.radhakrishnan@codito.com
Cc: gdb-prs@sources.redhat.com,  nobody@sources.redhat.com, 
 gdb-gnats@sources.redhat.com
Subject: Re: c++/1976: cannot set a breakpoint on function when a struct	type
 with the same name exist
Date: Fri, 04 Nov 2005 09:58:03 +0800

 Ramana Radhakrishnan wrote:
 
 >http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1976
 >
 >Can you produce a testcase ? I have not been able to reproduce this with any simple testcases. 
 >
 >cheers
 >Ramana
 >
 >  
 >
 
 hingwah@hingwah:/tmp$ cat > a.cpp
 #include <signal.h>
 int main()
 {
 }
 
 doesn't works:
 
 hingwah@hingwah:/tmp$ g++-3.3 a.cpp -o a -g
 
 hingwah@hingwah:/tmp$ gdb ./a
 GNU gdb 6.3-debian
 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 "i386-linux"...Using host libthread_db 
 library "/lib/tls/i686/cmov/libthread_db.so.1".
 
 (gdb) start
 Breakpoint 1 at 0x80483a4: file a.cpp, line 4.
 Starting program: /tmp/a
 main () at a.cpp:4
 4       }
 (gdb) break sigaction
 "sigaction" is not a function
 (gdb) The program is running.  Exit anyway? (y or n) y
 
 works:
 
 hingwah@hingwah:/tmp$ g++-3.4 a.cpp -o a -g
 hingwah@hingwah:/tmp$ gdb ./a
 GNU gdb 6.3-debian
 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 "i386-linux"...Using host libthread_db 
 library "/lib/tls/i686/cmov/libthread_db.so.1".
 
 (gdb) start
 Breakpoint 1 at 0x80483b0: file a.cpp, line 4.
 Starting program: /tmp/a
 main () at a.cpp:4
 4       }
 (gdb) break sigaction
 Breakpoint 2 at 0xb7f6fc36
 (gdb) The program is running.  Exit anyway? (y or n) y
 
 
 
 
 I remember I can reproduce it also with 3.4 or 4.0 with more complex 
 program, but not have time to figure it how
 



More information about the Gdb-prs mailing list