Re: [RFC/RFA?] Should break FILE:LINENO skip prologue?

Mark Kettenis
2008-01-13T09:21:43Z

> Date: Sun, 13 Jan 2008 06:21:36 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > In Ada, as Joel said, this is not true. *FUNCTION won't work
>
> That's too bad: this is an important feature, so if we cannot make it
> work in all languages, we should at least document that.

This is exactly the reason why documenting *FUNCTION on its own is the
wrong thing to do. What we implement in GDB is *EXPRESSION, where
EXPRESSION is an expression in the current language yielding an
address. For C FUNCTION will do as an expression; &FUNCTION will do
as well. Function pointers are a pretty standard feature of the C
language, so I expect users to know about them.

For Ada the appropriate expression is FUNCTION'Address or &FUNCTION.
Other languages might also need a different syntax; I doubt &FUNCTION
will work in Pascal or FORTRAN.