From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2977 invoked by alias); 15 Sep 2011 09:09:33 -0000 Received: (qmail 2965 invoked by uid 22791); 15 Sep 2011 09:09:31 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Sep 2011 09:09:17 +0000 Received: by wyi11 with SMTP id 11so2660475wyi.0 for ; Thu, 15 Sep 2011 02:09:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.169.133 with SMTP id n5mr877822wel.59.1316077756228; Thu, 15 Sep 2011 02:09:16 -0700 (PDT) Received: by 10.216.93.81 with HTTP; Thu, 15 Sep 2011 02:09:16 -0700 (PDT) In-Reply-To: <201109141848.03651.pedro@codesourcery.com> References: <201109141848.03651.pedro@codesourcery.com> Date: Thu, 15 Sep 2011 11:55:00 -0000 Message-ID: Subject: Re: [PATCH] GDB session logging From: Abhijit Halder To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2011-09/txt/msg00264.txt.bz2 On Wed, Sep 14, 2011 at 11:18 PM, Pedro Alves wrot= e: > On Wednesday 14 September 2011 17:48:15, Abhijit Halder wrote: >> +/* Unlike standerd GDB logger stream, dump data only to the log-file. = =A0*/ >> +extern struct ui_file *gdb_logfile; > > Typo standard. =A0I don't understand the comment. > >> @@ -166,6 +166,7 @@ pop_output_files (void) >> =A0 =A0saved_output.log =3D NULL; >> =A0 =A0saved_output.targ =3D NULL; >> =A0 =A0saved_output.targerr =3D NULL; >> + =A0gdb_logfile =3D logging_no_redirect_file; > > This is always NULL here. > > Please make sure the output log makes sense with trace-commands > enabled. > > I don't think printing the prompt and the command as you're > doing works correctly. =A0E.g., you'll print the prompt and > the command even for commands in a breakpoint's command list. > You want to print whatever the _user_ typed in, right? > That is, from a level higher up, in event-top.c:command_handler, > and event-top.c:display_gdb_prompt. > > But then that does leave out from the log commands that were > run from "(gdb) define"d commands, and breakpoint command > lists, etc. =A0But that's what "set trace-commands" does. > > So, should we really change what we log backwards incompatibly? > I'd say if you want the log of the whole complete session as > you saw it the first time, you just do logging elsewhere, say, > in your terminal, instead of within gdb. > Yes I also was not sure about the acceptability of this feature when I started working on this. Okay, I am NOT resubmitting the patch with suggested corrections as we will not achieve much with this feature and further there is backward compatibility issue. By the way, thanks for reviewing this patch. Regards, Abhijit Halder > -- > Pedro Alves >