This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: How to setup a breakpoint on constructor
- From: Daniel Jacobowitz <drow at false dot org>
- To: Michael Elizabeth Chastain <mec dot gnu at mindspring dot com>
- Cc: gdb at sources dot redhat dot com, rolandz at poczta dot fm
- Date: Thu, 15 Jul 2004 09:54:28 -0400
- Subject: Re: How to setup a breakpoint on constructor
- References: <20040715113103.E988A4B104@berman.michael-chastain.com>
On Thu, Jul 15, 2004 at 07:31:03AM -0400, Michael Chastain wrote:
> Hi Roland,
>
> Would you like to try a makeshift and experimental patch?
>
> ftp://ftp.shout.net/pub/users/mec/ctor-dtor-base.patch
>
> (Patch attached to this message too).
>
> You have to apply this to the libiberty/ subdirectory of a
> recent gdb, such as gdb 6.1.1, and then rebuild gdb.
>
> There's a lot of doco in the patch but it rambles.
> The basic idea is that I patched the demangler so that
> it demangles the different ctor's with different names:
>
> A::A()
> A::A$base()
> A::A$allocate()
>
> I don't know if it's a good idea for gdb to work this way,
> but I think it's worth getting some user feedback.
>
> Testing: I haven't run the test suite with this.
> I did test a small program (testsuite/gdb.cp/derivation.cc)
> and it works the way I think it should.
FYI, I implemented this once. The users who tried it didn't like it at
all.
--
Daniel Jacobowitz