Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

output gdb steps to a file 1

Status
Not open for further replies.

bbarr

Programmer
Sep 15, 2003
51
US
Hi,

I'm debugging a program using gdb and I want to write the output of the steps to a text file to help analyze what my program is doing.

I've looked at various tutorials and forum results that I got from searching on google but not finding what I need.

Thanks.

- Bruce
 


( gdb ..... ) |& tee > file

this will take all the GDB output and direct it to file for later perusing. the |& is CSH for Piping both STDOUT and STDERR to STDIN of the next task.

I don't know if that works for KSH.

the reason I run it through TEE is so that the output also comes to the screen so you can see what you are doing.

----
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top