This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA] handle function homonyms in breakpoint expressions
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Jan 2008 12:35:36 -0500
- Subject: Re: [RFC/RFA] handle function homonyms in breakpoint expressions
- References: <20080101194709.GB3758@adacore.com>
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