public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: joachim.eibl@gmx.de To: gcc-gnats@gcc.gnu.org Cc: joachim.eibl@gmx.de Subject: c++/10512: g++ 3.2 creates multiple constructors: gdb 5.3 can't set breakpoints Date: Sun, 27 Apr 2003 12:16:00 -0000 [thread overview] Message-ID: <20030427121123.24367.qmail@sources.redhat.com> (raw) >Number: 10512 >Category: c++ >Synopsis: g++ 3.2 creates multiple constructors: gdb 5.3 can't set breakpoints >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Apr 27 12:16:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: joachim.eibl@gmx.de >Release: gdb 5.3 in combination with g++ 3.2 >Organization: >Environment: Suse 8.2, i586 >Description: This is not new, but I want to point out that these two bugs are related: http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3187 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=267 In the little program below I want to place a breakpoint in the constructor via gdb. But it will never be called. The reason is that the binary contains the constructor function twice. The breakpoint will be set in the first function. But the second function is called. // File simpletest.cpp: g++ -g3 simpletest.cpp class A { public: A(); private: bool bFlag; int num; }; int main(int argc, char *argv[]) { A* pA = new A; return 0; } A::A() { bFlag = false; // Here I want to place a breakpoint num = 9; } It is visible even in the assembler output, created via g++ -S simpletest.cpp Both constructors are identical and follow behind each other. ... .globl _ZN1AC2Ev .type _ZN1AC2Ev, @function _ZN1AC2Ev: .LFB6: pushl %ebp .LCFI4: movl %esp, %ebp .LCFI5: movl 8(%ebp), %eax movb $0, (%eax) movl 8(%ebp), %eax movl $9, 4(%eax) popl %ebp ret .LFE6: .size _ZN1AC2Ev, .-_ZN1AC2Ev .align 2 .globl _ZN1AC1Ev .type _ZN1AC1Ev, @function _ZN1AC1Ev: .LFB8: pushl %ebp .LCFI6: movl %esp, %ebp .LCFI7: movl 8(%ebp), %eax movb $0, (%eax) movl 8(%ebp), %eax movl $9, 4(%eax) popl %ebp ret ... (I've also posted this message on the gdb-bugs-site.) >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-04-27 12:16 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-27 12:16 joachim.eibl [this message] 2003-04-28 14:32 bangerth 2003-04-29 17:01 bangerth 2003-04-29 17:06 Wolfgang Bangerth
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030427121123.24367.qmail@sources.redhat.com \ --to=joachim.eibl@gmx.de \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).