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

Jim Blandy
2008-01-14T22:25:25Z

Eli Zaretskii <eliz at gnu.org> writes:
>> Date: Sun, 13 Jan 2008 10:21:13 +0100 (CET)
>> From: Mark Kettenis <mark.kettenis@xs4all.nl>
>> CC: drow@false.org, mark.kettenis@xs4all.nl, gdb-patches@sourceware.org
>>
>> > 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.
>
> You seem to be saying that documenting things that might be obvious is
> a bad thing. If so, then I disagree: if it wasn't obvious for me,
> there will be others.

There are three possible approaches:

a) In Eli's original message, the list include "*EXPRESSION" and
"*FUNCTION" as separate cases. This suggested to me that Eli
thought we should document them as separate cases.

b) We could document the "*EXPRESSION" case, and then point out the
commonly used "*FUNCTION" usage of that case.

c) We could document "*EXPRESSION", and not mention "*FUNCTION" at
all.

I dislike a), because it suggests that "*FUNCTION" is recognized
specially --- it is not. In many languages this doesn't matter, but
as Joel points out, a) would be actively misleading for Ada users, as
"*FUNCTION" does not refer to the first instruction of FUNCTION in
Ada.

I dislike c), for the reasons Eli mentioned, and because I appreciate
having handy use cases pointed out.

So b) is my first choice.