This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]