This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Use observers to report stop events.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 28 Apr 2008 20:14:11 -0700
- Subject: Re: [RFA] Use observers to report stop events.
- References: <firstname.lastname@example.org>
> * defs.h (make_cleanup_restore_integer): New declaration.
> * utils.c (restore_integer_closure, restore_integer)
> (make_cleanup_restore_integer): New.
> * breakpoint.c (restore_always_inserted_mode): Remove.
> (update_breakpoints_after_exec): Use make_cleanup_restore_integer.
> * inferior.h (suppress_normal_stop_observer): New.
> * infcall.c (call_function_by_hand): Disable stop events when
> doing function calls.
> * infmcd.c (suppress_normal_stop_observer): New.
> (finish_command_continuation): Call normal_stop observer
> (finish_command): Disable stop events inside proceed.
> * infrun.c (normal_stop): Don't call normal stop observer if
> suppressed of if multi-step is in progress.
> * interps.h (top_level_interpreter): New.
> * interps.c (top_level_interpreter): Rename to
> (top_level_interpreter): New.
> * mi/mi-interp.c (mi_on_normal_stop): New.
> (mi_interpreter_init): Register mi_on_normal_stop.
> (mi_interpreter_exec_continuation): Remove.
> (mi_cmd_interpreter_exec): Don't register the above.
> * mi/mi-main.c (captured_mi_execute_command): Don't care
> about sync_execution.
> (mi_execute_async_cli_command): Don't install continuation. Don't
> print *stopped.
> (mi_exec_async_cli_cmd_continuation): Remove.
I tried to have a look at your patch, but I couldn't get into it
within the short amount of time that I have today. What I did notice
is that it contains several changes that could be made independent.
For instance, the make_cleanup_restore_integer/restore_always_inserted_mode
part could be introduced separately (honestly, this part looks a little
scary as you will leak memory is someone cancels the cleanup - so far,
I think the usual practice is to have one make_cleanup_bla_bla_bla
that specially restores your variable).
I need to document myself about the "*stopped async output" because
I didn't quite get the idea of the patch. But if I had known that this
patch had some MI-logic to it, I'd probably have stayed away from it.
I seem to find more excitement in other parts of GDB... If no one else
gets to it, I'll see I can find some time later in the week or next week
to try again, but it would definitely help to see this patch broken down
into smaller pieces.