Hi,
I am not an experienced programmer but I recently have to check a C code translated from Matlab, in order to ensure that with the same data set, C and Matlab are giving the identical results.
Watches are what I am able to use until now but that requires me to sit in front of the screen and watch the values of a variable change at each loop. Is there a way to trace and log the values of a variable into a .txt file so that I can plot it later to compare with the results from Matlab?
I have already tried to write the values into some .txt file with 'fwrite' but there is not the ideal solution as I have to do that in the C code that I want to check.
I am currently reading about tracepoint of gdb and will try to use that but I am still unsure if that is what I need. If you have some tips about what else I try.
Thanks!