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: [MI] Segfault using 'interpreter-exec mi'


>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:

Marc> Thanks!
Marc> I was stuck trying to use catch_exception(), which was not working
Marc> because I needed the return value of mi_parse(), but I see that
Marc> using TRY_CATCH was the way to go.

Yeah.  For future reference, you can do that by having a trampoline
function that has different arguments.  I find TRY_CATCH a lot simpler
though.

>> +  if (exception.reason < 0)
>> +    {
>> +      mi_print_exception (token, exception);
>> +      xfree (token);

Marc> Here, do we need an call to
Marc> mi_out_rewind (uiout)?
Marc> I don't know what it does, but I noticed it was being
Marc> called below after mi_print_exception()

It is unclear to me what mi_out_rewind does.
There don't seem to be any comments describing this function.

So, I chose to implement this in a way that is compatible with the
earlier code, which did not call mi_out_rewind on this path.

Tom


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