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

Jim Blandy jimb@codesourcery.com
Wed Jan 16 21:25:00 GMT 2008


"Ulrich Weigand" <uweigand at de.ibm.com> writes:
> Eli Zaretskii wrote:
>> > Date: Tue, 15 Jan 2008 04:38:32 -0800
>> > From: Joel Brobecker <brobecker@adacore.com>
>> > 
>> > > By the way, has anyone tried *FILENAME:FUNCTION?  I'm surprised that
>> > > works, since it would have to be part of the C parser.
>> > 
>> > Confirmed - it doesn't work.
>> 
>> Which is a bug, IMO: if FUNCTION works, so should FILENAME:FUNCTION,
>> otherwise GDB is inconsistent in its treatment of locations specs.
>
> Actually, I disagree that this is inconsistent.  The point is that
> the EXPRESSION part of a *EXPRESSION location spec is *not* itself
> a location spec, but an *expression*.

I'd like to record my strong agreement with Uli here.  The expectation
that *FILENAME:FUNCTION ought to work is just a confusion that results
from thinking of *FUNCTION as a separate case from *EXPRESSION.
They're not separate: the first is a common application of the second,
in some languages.



More information about the Gdb-patches mailing list