On Mon, 2018-08-20 at 17:44 +0800, shuai xi wrote: > Hi@all, > > I add some hooks in the vgpreload*.so and get some information from it. The > vgpreload*.so is a dynamically library loaded in the guest code. > > I want to get this information to do some analysis. But i don't know how to > get this information from guest code memory to valgrind memory space. > > I attempt to use a global variable to store this information, but valgrind > show me a error that it can not find this global variable's symbol. Because > this global variable is in guest code memory space. > > I attempt to write this information in file, because i hook the function > malloc. > > Is there some solution like 'share memory' to deal this problem? You have to switch from guest to host. I suggest you read in depth how a (non toy) tool works (for example, how helgrind wraps pthread functions and "calls" some host code from the guest code).
Philippe ------------------------------------------------------------------------------ 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 Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users