From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17637 invoked by alias); 29 Apr 2008 03:14:46 -0000 Received: (qmail 17619 invoked by uid 22791); 29 Apr 2008 03:14:45 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Apr 2008 03:14:16 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AFCB82A97DC; Mon, 28 Apr 2008 23:14:14 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id n5wxVdINctZ5; Mon, 28 Apr 2008 23:14:14 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 43EEE2A979F; Mon, 28 Apr 2008 23:14:14 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 905B6E7ACD; Mon, 28 Apr 2008 20:14:11 -0700 (PDT) Date: Tue, 29 Apr 2008 08:03:00 -0000 From: Joel Brobecker To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Use observers to report stop events. Message-ID: <20080429031411.GB28505@adacore.com> References: <200804112145.58456.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200804112145.58456.vladimir@codesourcery.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00649.txt.bz2 Volodya, > * 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 > explicitly. > (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_ptr. > (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. -- Joel