From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14762 invoked by alias); 29 Apr 2009 01:03:46 -0000 Received: (qmail 14604 invoked by uid 22791); 29 Apr 2009 01:03:45 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Apr 2009 01:03:39 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3T13ahL012771; Tue, 28 Apr 2009 21:03:36 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3T13ZcU007399; Tue, 28 Apr 2009 21:03:36 -0400 Received: from opsy.redhat.com (vpn-14-78.rdu.redhat.com [10.11.14.78]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3T13Zrv027500; Tue, 28 Apr 2009 21:03:35 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 0BE863785BC; Tue, 28 Apr 2009 19:03:33 -0600 (MDT) To: karen.osmond@gmail.com Cc: gdb-patches@sourceware.org Subject: Re: [patch] not able to set pending breakpoint at qualified C++ function names References: From: Tom Tromey Reply-To: tromey@redhat.com Date: Wed, 29 Apr 2009 01:03:00 -0000 In-Reply-To: (Karen Osmond's message of "Wed\, 11 Feb 2009 19\:07\:35 +0000 \(GMT\)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00774.txt.bz2 >>>>> "Karen" == Karen Osmond writes: Hi. I'm sorry nobody from GDB got back to you sooner. Karen> I noticed that it's not possible to set a pending breakpoint of Karen> the (C++) form "break X::Y::Z" (with breakpoint pending auto, Karen> gdb doesn't ask, and with it on, no breakpoint is added). Karen> Patch follows; I've only just met the gdb source so make of it Karen> what you will :) Karen> * Removed cplusplus_error helper function, as these were the only uses. Karen> (Though, it was adding an extra hint to the error, which perhaps should Karen> still happen. Erm, I must admit to not understanding the hint). I'd prefer not to remove this hint since it does help people, in my experience. What it means is that you can sometimes find valid completions by quoting the symbol. I think this could be done by just changing cplusplus_error to end with something like: message = ui_file_xstrdup (stream, &len); make_cleanup (xfree, message); throw_error (NOT_FOUND_ERROR, "%s", message); The rest of it seems ok to me. I assume you don't have a copyright assignment in place. I think you probably should; send me email off-list and I will get you started on that. A patch for gdb requires a ChangeLog entry. The GNU Coding Standards explain how to write one. Finally, I found a couple of formatting nits. GDB as a project is particular about this. The GNU standards also cover this pretty well. Karen> static struct symtabs_and_lines Karen> decode_compound (char **argptr, int funfirstline, char ***canonical, Karen> ! char *saved_arg, char *p, int* not_found_ptr) Use "int *", not "int* ". Karen> + if (not_found_ptr) Karen> + *not_found_ptr = 1; The indentation looks funny here; the second line should be 2 spaces in from the 'if'. Tom