[prog] gdb debug file input, Linux, C
ed orphan
millward at Ms.UManitoba.CA
Thu Jun 17 08:48:42 EST 2004
This is a Linux C question.
Is there a way to observe the contents of
a file as it is being created? For example,
in gdb, I have tried to see weather the information
is being entered into a file correctly during
file creation by indexing the file pointer,
FILE * fp;
....... other code, etc ....
fwrite( nodepointer->structure_name.data_object,
sizeof(char), no_of_data_items, fp );
After this statement I tried to see what was written
into the file
gdb> fp[0]@10
I get all kinds of stuff on the screen, none of
which helps.
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?
More information about the Programming
mailing list