This is the mail archive of the gdb-patches@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: [RFC] -thread-info new command


 > but I could only come up with:
 > 
 > http://sourceware.org/ml/gdb-patches/2006-11/msg00208.html
 > 
 > which didn't seem that simple and is probably not correct

I've gone through the archives to try to understand the changes.   The above
message says:

   Well we need to propagate the error message back to
   captured_mi_execute_command.

Actually there are currently two ways to catch an error in MI:

1) Using error () and catch_exception.

2) Using MI_CMD_ERROR and mi_error_message.

The first gets caught in mi_execute_command and the error message is stored
in result.message.  The second goes back to captured_mi_execute_command and
the error message is manually stored in mi_error_message.

I think that only one method should be used and this should be the first one.

It appears that catch_exceptions_with_msg was used to avoid using
error_last_message () but this was no longer needed when mi_execute_command was
changed to use catch_exception instead of catch_exceptions (the comment "Can
this use of catch_exceptions..." is an anachronism).  The error message should
be available in result.message for these functions (gdb_thread_select,
gdb_breakpoint,..)  anyway.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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