Re: [PATCH] PR mi/2086 -break-insert missing error diagnostic

Nick Roberts
2006-10-17T23:47:28Z

> > > I think removing catch_exceptions_with_msg isn't enough - if you look
> > > at the call site, it's not prepared for an error() to escape there.
> > > It would have to use a cleanup for deprecated_set_gdb_event_hooks.
> >
> > Heres my take:
> >
> > I think the problem arises from changes Andrew Cagney made on 2005-01-13.
> > It worked before then but was probably a bit of a hack. By removing
> > catch_exceptions_with_msg the error propagates back to catch_exception
> > with the function argument captured_mi_execute_command:
> >
> > #14 0x0812fdf8 in catch_exception (uiout=0x8823918, func=0x80ca1e7 <captured_mi_execute_command>, func_args=0xbfc229a4, mask=6) at exceptions.c:469
> > #15 0x080ca5de in mi_execute_command (cmd=0x8855220 "-break-insert *", from_tty=
> >
> > (mi_execute_command was also changed on 2005-01-13).
>
> But we've messed up whatever those saved/restored hooks were.

The name deprecated_set_gdb_event_hooks suggests that they're earmarked for
removal. These hooks only seem to get get in one place so presumably they
could be set up once at initialisation and left with that value.