From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13316 invoked by alias); 22 Nov 2006 12:03:45 -0000 Received: (qmail 13306 invoked by uid 22791); 22 Nov 2006 12:03:45 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Nov 2006 12:03:36 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kAMC3QfC009759; Wed, 22 Nov 2006 07:03:26 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kAMC3Qsv022520; Wed, 22 Nov 2006 07:03:26 -0500 Received: from wells.artheist.org (vpn-14-87.rdu.redhat.com [10.11.14.87]) by potter.sfbay.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kAMC3NOc014204; Wed, 22 Nov 2006 07:03:24 -0500 Date: Wed, 22 Nov 2006 12:03:00 -0000 From: Benjamin Kosnik To: Paul Pogonyshev Cc: libstdc++@gcc.gnu.org, gdb@sourceware.org Subject: setting breakpoints with C++ typedef names [was: Re: debug information] Message-Id: <20061122130341.a4436ce2.bkoz@redhat.com> In-Reply-To: <200611212225.28377.pogonyshev@gmx.net> References: <200611191342.48724.pogonyshev@gmx.net> <20061121100701.6b980f48.bkoz@redhat.com> <200611212225.28377.pogonyshev@gmx.net> X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.10.4; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00150.txt.bz2 > > But still function names include full type name: `b 'bar(basic_pod)''. > Not much of a problem in this case, but sometimes the full name is very > long... Oh. I finally understand you. Yes, this is a drag. You want to be able to do: (gdb) b bar(ipod) instead of (gdb) b bar(basic_pod) As you've noticed, this doesn't currently work. (x86-linux, mainline gcc, gdb (6.5-13.fc6rh)) (gdb) b bar(ipod) Function "bar(ipod)" not defined. As you stated, you have to: (gdb) b bar(basic_pod) Breakpoint 4 at 0x80489d7: file debug.cc, line 24. I suggest reporting this to the gdb list (gdb@sourceware.org). You might want to title that email something like "setting breakpoints with C++ typedef names" or something more descriptive. Here, I've done that for you. To me, it looks like enough information is present in the debuginfo to support this kind of usage. However, I am no expert in this area. -benjamin ps. Here's the test case template struct basic_pod { typedef T value_type; value_type _M_data; }; typedef basic_pod ipod; void bar(ipod p) { p._M_data = 0; } void bar(int i) { ++i; } int main() { ipod p; bar(p); // b bar(ipod) bar(5); // b bar(int) return 0; }