From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 556 invoked by alias); 6 Jul 2006 17:33:26 -0000 Received: (qmail 546 invoked by uid 22791); 6 Jul 2006 17:33:25 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 06 Jul 2006 17:33:21 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FyXj1-0006xT-Cf; Thu, 06 Jul 2006 13:33:15 -0400 Date: Thu, 06 Jul 2006 17:33:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [PATCH] command trace / source verbose mode Message-ID: <20060706173315.GA26692@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , Eli Zaretskii , gdb-patches@sources.redhat.com References: <437B6228.8010103@st.com> <437C9C07.4020707@st.com> <20060706131559.GA18827@nevyn.them.org> <44AD46E2.6020207@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44AD46E2.6020207@st.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00041.txt.bz2 On Thu, Jul 06, 2006 at 06:22:42PM +0100, Andrew STUBBS wrote: > >On Thu, Nov 17, 2005 at 03:04:39PM +0000, Andrew STUBBS wrote: > >>+/* Command tracing state. */ > >>+ > >>+int source_verbose = 0; > >>+int commandtrace = 0; > > > >You've got two of these, but you always check them together. One > >variable and incrementing/decrementing the trace level around source > >would work too, right? > > Yeah, that might work too. But the downside is that if the 'set debug > commandtrace on' is issued multiple times then the user will have to > turn it off that many times also. Oh, good point. Your way it is. > >>+ /* Is there a '-v' in the string somewhere? */ > >>+ if (args && (minusv = strstr(args,"-v"))) > > > >Is there any benefit to supporting this at the end? We've already got > >some other commands that are strictly command [options] [args], I > >think, or at least we do in MI; I would recommend following the same > >model here. If it starts with -v it's an option. > > Does it do any harm beyond making the code a little more complex? I was > rather expecting you to say something about the fact that it changes the > argument to the --command option (I documented the change). I think that's pretty strange too; I'd rather it didn't. I don't know if it does any harm, but it does make the code more complex, and I don't think it's particularly useful. > I think keeping it under 'set debug' is a good idea, but maybe because > it is for debugging other than GDB itself it should be promoted to > somewhere more prominent. Hmmm, perhaps "set trace-commands" it the best > option. > > I'll have a think about it, work on the other points you raised, and get > back to you. Sounds good. I think you're right about keeping it out of set debug after all. Got to be careful here: we're debugging user commands during debugging of a user program, but not debugging the debugger. Say that three times fast, I dare you. -- Daniel Jacobowitz CodeSourcery