Bug 593521

Summary: set logging redirect doesn't work
Product: [Fedora] Fedora Reporter: Casey Dahlin <cdahlin>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: jan.kratochvil, pmuldoon, swagiaal, tromey, vanhoof
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-06 18:30:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Casey Dahlin 2010-05-19 03:27:28 UTC
How reproducible:
Always
  
Actual results:
[sadmac@foucault ~]$ gdb
GNU gdb (GDB) Fedora (7.0.1-45.fc12)
(gdb) set logging on
Copying output to gdb.txt.
(gdb) set logging redirect on
(gdb) print 1
$1 = 1
(gdb) print 2
$2 = 2
(gdb) quit
[sadmac@foucault ~]$ cat gdb.txt 
$1 = 1
$2 = 2
[sadmac@foucault ~]$ 

Expected results:
[sadmac@foucault ~]$ gdb
GNU gdb (GDB) Fedora (7.0.1-45.fc12)
(gdb) set logging on
Copying output to gdb.txt.
(gdb) set logging redirect on
(gdb) print 1
(gdb) print 2
(gdb) quit
[sadmac@foucault ~]$ cat gdb.txt 
$1 = 1
$2 = 2
[sadmac@foucault ~]$

Comment 1 Tom Tromey 2010-05-19 14:47:54 UTC
It only works if you "set logging redirect on"
before enabling logging:

(gdb) set logging redirect on
(gdb) set logging on
Redirecting output to gdb.txt.
(gdb) print 1
(gdb) print 2
(gdb) set logging off
Done logging to gdb.txt.

Comment 2 Jan Kratochvil 2010-08-06 18:30:07 UTC
A warning patch has been posted upstream:
[patch] set logging {redirect|overwrite} warning
http://sourceware.org/ml/gdb-patches/2010-08/msg00083.html

I do not find it essential for a Fedora backport.