Community
Participate
Working Groups
From the CDT dev list -----Original Message----- From: cdt-dev-bounces@eclipse.org [mailto:cdt-dev-bounces@eclipse.org] On Behalf Of John Cortell Sent: January-19-10 4:40 PM To: CDT General developers list.; CDT DEV (cdt-dev@eclipse.org) Subject: Re: [cdt-dev] Getting GDB error message in DSF-GDB 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 cleaner way. At 03:14 PM 1/19/2010, Marc Khouzam wrote: Hi, using DSF-GDB, does anyone know of a good way to have access to the GDB error message when an MI command fails? From what I see, we include the error message within a string that says: Failed to execute MI command: -trace-define-variable marc 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 the 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 know. Thanks Marc