From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29887 invoked by alias); 27 Apr 2010 14:22:20 -0000 Received: (qmail 29861 invoked by uid 22791); 27 Apr 2010 14:22:18 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Apr 2010 14:22:13 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 024AA2BAB63; Tue, 27 Apr 2010 10:22:12 -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 btNb3ZYEmSuz; Tue, 27 Apr 2010 10:22:11 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BE8242BAB44; Tue, 27 Apr 2010 10:22:11 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 00BB6F5896; Tue, 27 Apr 2010 07:22:08 -0700 (PDT) Date: Tue, 27 Apr 2010 14:22:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [vxworks 02/14] New command_post observer. Message-ID: <20100427142208.GC2951@adacore.com> References: <1272210447-13895-1-git-send-email-brobecker@adacore.com> <1272210447-13895-3-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-04/txt/msg00907.txt.bz2 > There are a lot of calls to execute_command that occur in batch-like > places. For example, this is called from Python, I think it is called > from "commands" scripts and "define" scripts, etc. > > So if your goal is to have it just emit info at some stopping point, it > seems to me that it would be better to have an observer just before a > prompt is emitted. > > I didn't read every patch in detail, so I didn't see where this is used. > Maybe the above doesn't matter. Either way would work, as far as I am concerned. The purpose is to inform the user that the context (partition) has changed. I have a tiny preference towards having consistent output, if we can, with commands executed from the prompt and commands executed from elsewhere such as user-defined commands for instance. But that preference really has no additional technical merit that I can think of, so I'm happy to change the observer to use something triggered just before printing the command prompt (btw: it does not matter in this case, but I believe that the prompt also gets printed as "> " while entering a canned sequence of command). -- Joel