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?


  I just tested &win32_close
and it does not work....
I get 
Function "" not defined.
Make breakpoint pending ...

  If you use pascal language,
the construct '*win32_close' still works, but this is
mainly because I left the
'*' prefix operator in the pascal parser, even though it is not
real pascal syntax.

The address prefix is '@' in pascal, but trying it out gives the 
same as '&' operator in C.

  Anyhow, win32_close is already a memory address, so
what should the address of an address mean?

Pierre Muller
gdb pascal language support maintainer.


> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Mark Kettenis
> Sent: Sunday, January 13, 2008 10:21 AM
> To: eliz@gnu.org
> Cc: drow@false.org; mark.kettenis@xs4all.nl; gdb-patches@sourceware.org
> Subject: 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]