[prog] gdb debug file input, Linux, C

Jimen Ching jching at flex.com
Thu Jun 17 18:34:55 EST 2004


On Thu, 17 Jun 2004, ed orphan wrote:
>Is there a way to observe the contents of
>a file as it is being created?
>   I get all kinds of stuff on the screen, none of
>which helps.

Is the content of the file regular text?  If so, you can try 'tail -f'.

>   Do I have to wait until after the file has been
> close(fp);  before I can see what's in it?
> Or is there a method using the gdb debug that
>allows me to see how the file is being filled?

gdb doesn't know anything about data on disk.  If you have access to the
source code, you could also rewind the file pointer and re-read the data
and display it.

--jc
-- 
Jimen Ching (WH6BRR)      jching at flex.com     wh6brr at uhm.ampr.org


More information about the Programming mailing list