From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8345 invoked by alias); 28 Jul 2005 21:16:43 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 8324 invoked by uid 22791); 28 Jul 2005 21:16:35 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 28 Jul 2005 21:16:35 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1DyFk2-00013F-3D; Thu, 28 Jul 2005 17:16:34 -0400 Date: Thu, 28 Jul 2005 21:16:00 -0000 From: Daniel Jacobowitz To: Alain Magloire Cc: gdb@sources.redhat.com Subject: Re: Failed breakpoint for C++ in gdb Message-ID: <20050728211634.GA3948@nevyn.them.org> Mail-Followup-To: Alain Magloire , gdb@sources.redhat.com References: <1578FF984ABAD411AFA5000102C4BB5B11DEF102@NIMBUS> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1578FF984ABAD411AFA5000102C4BB5B11DEF102@NIMBUS> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00266.txt.bz2 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 > > 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