This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Failed breakpoint for C++ in gdb
- From: Daniel Jacobowitz <drow at false dot org>
- To: Alain Magloire <alain at qnx dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 28 Jul 2005 17:16:34 -0400
- Subject: Re: Failed breakpoint for C++ in gdb
- References: <1578FF984ABAD411AFA5000102C4BB5B11DEF102@NIMBUS>
On Thu, Jul 28, 2005 at 05:12:56PM -0400, Alain Magloire wrote:
> From Daniel:
> >On Tue, Jul 26, 2005 at 09:31:10AM -0400, Alain Magloire wrote:
> >> Why is gdb so fussy about the argument order ?
> >
> > GDB generally matches the compiler-generated debug info. There's a
> > long-term plan to be more forgiving about this, but it's hard to
> > implement that without slowing down symbol reading...
> >
> > > (gdb) b foo(const char *)
> > > Function "foo(const char *)" not defined
> > > (gdb) b foo(char const *)
> > > Breakpoint 1 at 0x....... file testing.cpp line 4.
> > >
> > > So is there something I should do ? Do I have to reorder my arguments to
> > put
> > > the const last ?
> >
> > Is this for command line use? Try: b 'foo<TAB>
>
> Niet, for front-end.
>
> Is the "const char *" vs. "char const *" example consistent in GDB i.e. can
> I assume this and do some mangling on my own to satisfy the pickiness of
> GDB?
This is not GDB's pickiness. It is following whatever the compiler has
specified in debug information. You could still query GDB for the
overloads in some fashion, I expect, but I don't know for sure.
--
Daniel Jacobowitz
CodeSourcery, LLC