On Fri, 13 Jul 2018 09:35:24 -0400
Michael Shell <[email protected]> wrote:

> what exactly did gdb say about systemd's crash?


And FWIW, command output can be logged to a file as well as displayed
on the screen at the same time via the use of tee:

gdb /bin/program | tee gdb_log.txt

Actually, from

https://www.linuxquestions.org/questions/linux-software-2/bash-how-to-redirect-output-to-file-and-still-have-it-on-screen-412611/

it is even better also redirect stderr and use a subshell to avoid
order problems due to buffering:

(gdb /bin/program 2>&1) | tee gdb_log.txt

Then you can interact with gdb as needed and a copy of the
"conversation" will be in gdb_log.txt.


 Cheers,

 Mike


-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to