Your message dated Sun, 03 Aug 2025 16:53:59 -0400
with message-id <[email protected]>
and subject line Closing bug
has caused the Debian Bug report #225481,
regarding gdb: Breaking on trivial class's constructor asks me which one I want
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
225481: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=225481
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gdb
Version: 6.0-2

  So when I debug this program:

class Foo {
public:
    Foo();
};

Foo::Foo() {}

int main(int argc, char **argv) {
    return 0;
}

  ... I get bizarre results when trying to break on the Foo::Foo()
constructor:

[moise@pogo /tmp]$ g++ -g test.C && gdb ./a.out
GNU gdb 6.0-debian
Copyright 2003 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"...
(gdb) break Foo::Foo
[0] cancel
[1] all
[2] Foo at test.C:6
[3] Foo at test.C:6
> 

  It seems to be asking me which constructor to break on, as if Foo
had multiple constructors, but it obviously has only one.
  This is with gcc 3.3.2-1 and libc6 2.3.2.ds1-10 .



--- End Message ---
--- Begin Message ---
Not surprisingly, I can't reproduce this bug on GDB 16.1:

--8<---------------cut here---------------start------------->8---
(gdb) break Foo::Foo() 
Breakpoint 1 at 0x1132: file 1.cc, line 6.
(gdb) break Foo::Foo
Note: breakpoint 1 also set at pc 0x1132.
Breakpoint 2 at 0x1132: file 1.cc, line 6.
--8<---------------cut here---------------end--------------->8---

This bug is more than 20 years old; GDB has been almost completely
rewritten since then, and I don't recall seeing a similar problem
recently.

I'm taking the liberty to close this bug.  Feel free reopen if it's
still applicable.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to