From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2807 invoked by alias); 29 Jan 2008 17:35:59 -0000 Received: (qmail 2799 invoked by uid 22791); 29 Jan 2008 17:35:58 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jan 2008 17:35:39 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id EAB9D98151; Tue, 29 Jan 2008 17:35:37 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id D45CE9811F; Tue, 29 Jan 2008 17:35:37 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JJuMy-0001Cp-Uy; Tue, 29 Jan 2008 12:35:36 -0500 Date: Tue, 29 Jan 2008 17:40:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC/RFA] handle function homonyms in breakpoint expressions Message-ID: <20080129173536.GB3773@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20080101194709.GB3758@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080101194709.GB3758@adacore.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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: 2008-01/txt/msg00697.txt.bz2 On Tue, Jan 01, 2008 at 11:47:09AM -0800, Joel Brobecker wrote: > Hello, > > The problem I am trying to fix is the following. Imagine we have > the following two functions defined: > > procedure Next (I : in out Integer); > procedure Next (F : in out Float); > > If the user tries to break on "Next", then the expression is ambiguous > and GDB should present a multiple-choice menu and ask the user to choose: > > (gdb) b next > [0] cancel > [1] all > [2] pck.next at pck.adb:5 > [3] pck.next at pck.adb:10 AKA exactly the same as C++ overloaded functions, which are already handled by the generic code. I wish Ada didn't need its own copy of the menu printing code - this (practical, I admit) habit of fixing infrastructure issues in ada-lang.c make it already the largest source file in GDB and getting larger. It's got a good chunk of symtab.c reimplemented already. Again, this is the status quo, so I'm not going to rain on the parade. But in the long term this is a horrible maintenance mess. -- Daniel Jacobowitz CodeSourcery