Valgrind file operation apis

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Valgrind file operation apis

Yang Liu
Hi, all!

I'm working on cachegrind source code and would like to read a file when an option is specified. I've found the file writing apt VG_(open)(...) and VG_(write) by examing some source code. But I have no clue which function to use to read a file at valgrind source code level. Is there any documentation available?

In other words, I'm trying to find the following equivalent C code using valgrind library functions.
FILE* file = fopen(fileName, "r"); /* should check the result */
    char line[256];

    while (fgets(line, sizeof(line), file)) {
              ...
    }

    fclose(file);

Thanks in advance for any suggestion!

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Loading...