Assign 'targerr' instead of 'targ' to gdb_stdtargerr.
Commit Message
Hi,
I noticed this what-seems-to-be-typo when browsing the code.
I'm not sure if the target can have two distinct streams or not
but the code seems to think so. I figure might as well fix it.
The original suspicious code was introduced at the same time as when
saved_output.targerr was added, so it really does look like a typo.
It was in commit 8d4d924b.
Is this ok?
Thanks
2014-07-02 Marc Khouzam <marc.khouzam@ericsson.com>
* cli/cli-logging.c (pop_output_files): Assign targerr to
gdb_stdtargerr.
Comments
>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
Marc> 2014-07-02 Marc Khouzam <marc.khouzam@ericsson.com>
Marc> * cli/cli-logging.c (pop_output_files): Assign targerr to
Marc> gdb_stdtargerr.
Ok. Thanks for finding this.
Tom
> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com]
> Sent: Thursday, July 03, 2014 2:17 PM
> To: Marc Khouzam
> Cc: gdb-patches@sourceware.org
> Subject: Re: [PATCH] Assign 'targerr' instead of 'targ' to gdb_stdtargerr.
>
> >>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
>
> Marc> 2014-07-02 Marc Khouzam <marc.khouzam@ericsson.com>
>
> Marc> * cli/cli-logging.c (pop_output_files): Assign targerr to
> Marc> gdb_stdtargerr.
>
> Ok. Thanks for finding this.
Thanks. I committed it to master.
>
> Tom
@@ -171,7 +171,7 @@ pop_output_files (void)
gdb_stderr = saved_output.err;
gdb_stdlog = saved_output.log;
gdb_stdtarg = saved_output.targ;
- gdb_stdtargerr = saved_output.targ;
+ gdb_stdtargerr = saved_output.targerr;
}
saved_output.out = NULL;