RE: [cdt-dev] Getting GDB error message in DSF-GDB
I think this is a very good idea. Specialized
exceptions to allow to report different GDB error types to the
I'll give it a shot for my situation and you can see if
it matches what you had in mind.
It would be nice if we could take it a step further--if the GDB
plugin could produce specialized exceptions based on the message, so that
handlers further up the call chain could check for specific errors without
having to do that parsing. Basically, the knowledge of what messages to expect
from a particular gdb would be maintained at the lower levels of the solution,
as that is where such backend-specific knowledge belongs. This would help us
address issues like https://bugs.eclipse.org/bugs/show_bug.cgi?id=288305 in a
At 03:14 PM 1/19/2010, Marc Khouzam wrote:
using DSF-GDB, does anyone know of a good way to
have access to the GDB error message when an MI command fails?
I see, we include the error message within a string that
Failed to execute MI command:
Error message from debugger back end:
Name of trace variable
should start with '$'
I just want the last line, so as to show
it to the user in an error line.
In AbstractMIControl, this
full string is passed back to the requestMonitor as a Status with
full string as the Status message.
Of course I could parse this
string, but that doesn't seem very elegant.
I don't want to change the
format of the string because I don't want to do all
the regression tests
that come with it.
My thought is to create an Exception and put
the backend message in there,
and then to pass that Exception in the
Status (since right now, no Exception is passed).
If anyone has
a better idea, let me