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]

MI error messages


Hello!

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.

So, could somebody tell:

1. Is it guaranteed that all MI error message start with function name and a
semicolon?
2. If not, is there any regexp that can be used to remove the function name,
that's guaranteed to work for all current and future MI error messages.
Removing anything before first semicolon is risky -- error message can
contain ':' for other reasons.
3. If not, can the function name be removed?

- Volodya






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