This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
c++/2417: Breakpoints ignored in constructors outside class {} definition
- From: gordon dot prieur at sun dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 27 Feb 2008 22:55:53 -0000
- Subject: c++/2417: Breakpoints ignored in constructors outside class {} definition
- Reply-to: gordon dot prieur at sun dot com
>Number: 2417
>Category: c++
>Synopsis: Breakpoints ignored in constructors outside class {} definition
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Feb 27 22:58:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Gordon Prieur
>Release: gdb 6.5.50 (Cygwin), gdb 6.6 (Ubuntu 7.10, Fedora Core 8, Solaris 10)
>Organization:
>Environment:
Windows/Cygin, Fedora Core 8, Ubuntu 7.10, and Solaris 10
>Description:
If I create a C++ class and define the constructor outside
the class definition, breakpoints in the constructor are
ignored. Adding complexity to the constructor (I/O or function/method calls) resolves the problem.
Doing object file dumps of the debugging/line information
shows the object file has line information for the line
in question. The break commands also succeed. Its just at
run time the breakpoints are ignored.
>How-To-Repeat:
Set breakpoints at lines 7, 14, and 20. Run the program.
Gdb stops at the breakpoints at lines 7 and 20, but does
not stop at the one at line 14.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="iz128099.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="iz128099.cpp"
Y2xhc3MgQXsNCiAgICBpbnQgbnVtMTsNCnB1YmxpYzoNCiAgICBBKCl7DQogICAgICAgIG51bTEg
PSAxOw0KICAgIH0NCiAgICANCiAgICBBKGludCBpKTsNCn07DQoNCkE6OkEoaW50IGkpIHsNCiAg
ICBudW0xID0gaTsNCn0NCg0KaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqKiBhcmd2KSB7DQogICAg
QSBhOw0KICAgIEEgYig1KTsNCiAgICByZXR1cm4gMDsNCn0NCg==