Bug 593521 - set logging redirect doesn't work
Summary: set logging redirect doesn't work
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-19 03:27 UTC by Casey Dahlin
Modified: 2014-06-18 08:47 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-08-06 18:30:07 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.