This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] GDB session logging


On Wed, Sep 14, 2011 at 11:18 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> 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.
>
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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]