From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5260 invoked by alias); 5 Sep 2013 17:14:25 -0000 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 Received: (qmail 5250 invoked by uid 89); 5 Sep 2013 17:14:24 -0000 Received: from elasmtp-galgo.atl.sa.earthlink.net (HELO elasmtp-galgo.atl.sa.earthlink.net) (209.86.89.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Sep 2013 17:14:24 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_NONE autolearn=no version=3.3.2 X-HELO: elasmtp-galgo.atl.sa.earthlink.net Received: from [68.96.200.16] (helo=macbook2.local) by elasmtp-galgo.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1VHd8Q-0005Wm-QM for gdb-patches@sourceware.org; Thu, 05 Sep 2013 13:14:22 -0400 Message-ID: <5228BBEE.3030305@earthlink.net> Date: Thu, 05 Sep 2013 17:14:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] Give every interpreter a command_loop_proc. References: <5228B883.2010602@broadcom.com> In-Reply-To: <5228B883.2010602@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da9403a7f1a36d05942a1e1ae2aee043284d5350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00182.txt.bz2 On 9/5/13 9:59 AM, Andrew Burgess wrote: > This patch simplifies gdb/interps.c:current_interp_command_loop > by giving every interpreter a command_loop_proc. > > Of the 4 interpreters I'm aware of mi and gdbtk already install > a command loop proc, while cli and tui don't instead using > fall-through code in current_interp_command_loop. > > I've given cli and tui a command loop proc, and removed the > fall-through code. > > This change does rely on "current_interpreter" never being NULL, > I believe this is true, and no tests failed here (x86-64 linux), > but if anyone know different please let me know. > > OK to apply? I like it! This is OK with one caveat: > * gdb/cli/cli-interp.c (_initialize_cli_interp): Add a > command_loop_proc to interp_procs. No redundant "gdb/", please. Stan stan@codesourcery.com