From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28151 invoked by alias); 26 Jul 2005 13:31:22 -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 28126 invoked by uid 22791); 26 Jul 2005 13:31:14 -0000 Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 26 Jul 2005 13:31:14 +0000 Received: by NIMBUS with Internet Mail Service (5.5.2653.19) id ; Tue, 26 Jul 2005 09:31:14 -0400 Message-ID: <1578FF984ABAD411AFA5000102C4BB5B11DEEB0C@NIMBUS> From: Alain Magloire To: gdb@sources.redhat.com Subject: Failed breakpoint for C++ in gdb Date: Tue, 26 Jul 2005 13:31:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2005-07/txt/msg00243.txt.bz2 Why is gdb so fussy about the argument order ? For example: int foo(const char *p) { int i = 0; i++; return i; } int foo() { int y = 0; y += 2; return y; } int main(int argc, char **argv) { Const char *p = "foobar"; foo(p); foo(); Return 0; } (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 ? ??