Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Abhijit Halder <abhijit.k.halder@gmail.com>
Subject: Re: [PATCH] GDB session logging
Date: Thu, 15 Sep 2011 06:30:00 -0000	[thread overview]
Message-ID: <201109141848.03651.pedro@codesourcery.com> (raw)
In-Reply-To: <CAOhZP9ygX6RRSC_L3RDJtHzZ1Cv7CmXp3p_iSx-w-z8Q3Ldogg@mail.gmail.com>

On Wednesday 14 September 2011 17:48:15, Abhijit Halder wrote:
> +/* Unlike standerd GDB logger stream, dump data only to the log-file.  */
> +extern struct ui_file *gdb_logfile;

Typo standard.  I don't understand the comment.

> @@ -166,6 +166,7 @@ pop_output_files (void)
>    saved_output.log = NULL;
>    saved_output.targ = NULL;
>    saved_output.targerr = NULL;
> +  gdb_logfile = 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.  E.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.  But 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.

-- 
Pedro Alves


  reply	other threads:[~2011-09-14 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 14:37 Abhijit Halder
2011-09-14 17:48 ` [PATCH] " Abhijit Halder
2011-09-15  6:30   ` Pedro Alves [this message]
2011-09-15 11:55     ` Abhijit Halder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201109141848.03651.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=abhijit.k.halder@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox