This is the mail archive of the gdb-patches@sources.redhat.com 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: [PATCH] MI error messages



On Jun 21, 2005, at 2:44 PM, Nick Roberts wrote:


I presumed mi_usage_error would call error. That way the error is caught and
any cleanups and rewinds are done. However, you are right, it would be nicer
just to get:


(gdb)
-stack-select-frame
Usage: FRAME_SPEC.
(gdb)

instead of

(gdb)
-stack-select-frame
&"Usage: -stack-select-frame FRAME_SPEC\n"
^error,msg="Usage: -stack-select-frame FRAME_SPEC"
(gdb)

as these errors aren't intended for the user when the frontend is being used.


Yeah, we came to the same decision at Apple. When you throw error() while in MI mode, you only get the ^error message, you don't get the console-style &"..." with the same message. Our GUI has a little status line at the bottom of the window where it shows the error message, and if you have the "gdb console" window open, it shows the error text in a different color to differentiate the error message. It makes sense to let the GUI show the error in whatever way is most appropriate for it, instead of blotting back plain old text.

J


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