This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
c++/1691: Breakpoint in constructor doesn't
- From: ac131313 at redhat dot com
- To: gdb-gnats at sources dot redhat dot com
- Cc: blizzard at redhat dot com
- Date: 24 Jun 2004 15:45:40 -0000
- Subject: c++/1691: Breakpoint in constructor doesn't
- Reply-to: ac131313 at redhat dot com
>Number: 1691
>Category: c++
>Synopsis: Breakpoint in constructor doesn't
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 24 15:48:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: ac131313@redhat.com
>Release: 2004-06-21
>Organization:
>Environment:
RHEL 3, g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-34)
>Description:
Breakpoints on descriptors don't work.
>How-To-Repeat:
cagney@toomany$ cat > tmp/foo.cc
#include <stdio.h>
class Foo {
public:
Foo(void);
~Foo(void);
void Bar(void);
};
Foo::Foo(void)
{
printf("FooFoo\n");
}
Foo::~Foo(void)
{
printf("Foo~Foo\n");
}
void
Foo::Bar(void)
{
printf("FooBar\n");
}
int main (int argc, char **argv)
{
Foo *foo = new Foo();
foo->Bar();
delete foo;
return 0;
}
cagney@toomany$ ~/GDB/N-toomany-x86_64-unknown-linux-gnu/gdb/gdb a.out
GNU gdb 2004-06-21-cvs
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 "x86_64-unknown-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) break Foo::Foo
[0] cancel
[1] all
?HERE
?HERE
> 1
Note: breakpoint -1 (disabled) also set at pc 0x0.
Breakpoint 1 at 0x0
Note: breakpoints -1 (disabled) and 1 also set at pc 0x0.
Breakpoint 2 at 0x0
warning: Multiple breakpoints were set.
warning: Use the "delete" command to delete unwanted breakpoints.
(gdb) run
Starting program: /home/cagney/tmp/a.out
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x0: Input/output error.
(gdb)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: