Re: [PATCH] -stack-info-frames

Daniel Jacobowitz
2005-06-20T13:51:26Z

On Mon, Jun 20, 2005 at 05:03:05PM +1200, Nick Roberts wrote:
> The other thing I find inappropriate about these messages is that they
> print out the name of the procedure which is not of immediate interest.

I agree. I don't think the function or command name in all these error
messages is valuable.

> How about changing the format (for all MI commands) to
>
> -stack-info-frame 4
> &"Usage: -stack-info-frame\n"
> ^error,msg="Usage: -stack-info-frame"
> (gdb)
>
> (gdb)
> -stack-select-frame
> &"Usage: -stack-select-frame FRAME_SPEC\n"
> ^error,msg="Usage: -stack-select-frame FRAME_SPEC"
> (gdb)
>
> etc.
>
> They should only occur when a developer is writing a frontend, not when it is
> being used. The procedure name is only of interest to someone writing MI code
> For that person it should be quite easy to find the relevant code and, even if
> it was not, it should only be printed if a debug flag is set.

I like this idea; in fact, this is the style I was going to recommend
to you (until I went through and noticed that it is only used for
functions with arguments, not without, at the moment).

--
Daniel Jacobowitz
CodeSourcery, LLC