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?


On Sun, 2008-01-13 at 10:21 +0100, Mark Kettenis wrote:
> > 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. 

Mark, I don't think that is true -- at least it used to be not
(damn English language...)

When you say "break *<something>", the asterisk is NOT 
interpreted by the expression parser -- it is interpreted
by the break command, or more precisely, by the LINESPEC
parser.

It is (or used to be) a part of the LINESPEC syntax, 
not a part of the expression syntax.  It simply happens
to be ambiguous with the expression operator "unary *".

As a LINESPEC operator, it means "evaluate what follows
and treat it as a literal address, without doing
skip-prologue processing on it.





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