Can I remotely monitor printf results of a C program?

2

I have a long running C program in which I've started from the Terminal.app using:

gdb program_name
gdb run

I'm using many printf statements to monitor the progress of the program. Unfortunately, the screen of the computer has been frozen since yesterday, but the process is still running. My question is, can I watch the progress of the program (i.e. the results of the printf statements) remotely?

I'm not that familiar with the terminal, but I know how to ssh and do some simple terminal tasks. The OS of the machine with the frozen screen is Mac OS 10.6.

Motasim

Posted 2012-11-01T13:03:11.533

Reputation: 121

Answers

0

Enable logging in gdb and use something like tail -f gdb.txt to watch the in a terminal.

Ярослав Рахматуллин

Posted 2012-11-01T13:03:11.533

Reputation: 9 076