This is the mail archive of the gdb@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: MI error messages


On Friday 10 February 2006 23:16, Nick Roberts wrote:
>  > Below is a short MI session:
>  >
>  >        (gdb) -var-assign KDEVTMP br
>  >        &"mi_cmd_var_assign: Could not assign expression to varible
>  > object\n" ^error,msg="mi_cmd_var_assign: Could not assign expression to
>  > varible
>  >
>  > The good thing about this is that I can easily detect that's an error,
>  > and show a message to the user. The bad thing is that the message
>  > includes 'mi_cmd_var_assign:' part. For end user of KDevelop, or even
>  > end user of gdb, this makes no sense -- it's the name of internal
>  > function. It can only confuse.
>
> In June of last year there was a thread ([PATCH] MI error messages) about
> this subject (see archives).  I think it was similarly suggested that the
> procedure name was unnecessary.  Some error messages are for the user, and
> some should only occur if there is a bug in the front end and should never
> really be seen by the user.  The example you give above is the latter. 

I believe you're wrong. The example I given actually results from situation 
where user specifies a wrong new value for a variable. The specific testcase 
I've tried in KDevelop is assigning value of "br" to "int" variable. That's 
clearly a user error.

>  > 3. If not, can the function name be removed?
>
> I think error reporting needs to be overhauled.  Many changes could be
> made, removing function names is one of them.

Ok. I'll try to find time to remove some of function names.

- Volodya


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