|
From: Paul M. <pa...@sa...> - 2004-04-23 07:35:05
|
I have recently found some time to work on getting my PPC port of Valgrind adapted to the current CVS version. I have put my current patch at: http://ozlabs.org/~paulus/valgrind-cvs-040423.patch.gz for people to look at if they are interested to see what I have changed. It is basically functioning but there are still some bugs left to be found, and there are parts of the code that are just a quick hack to get it working rather than the way I would like to see things done in the long run. Also, I haven't implemented core dumps for PPC, and vg_libpthread.c is going to need a lot more work. Areas where I have needed to modify things (apart from things I modified in the older patch against 2.1.0) include: * Stack management in the UME stuff. In particular the code relating to finding and modifying the aux vector needed some changes. * Code that deals with memory ranges. I have changed this to cope with ranges that end at 0xffffffff, since I have been working on this under a ppc64 kernel. * I had to change VG_(map_file_segment) so that it doesn't try to read symbols twice if it finds two mappings of a library which both have offset 0. Because vg_inject.so is relatively small, and ELF mappings on PPC use a 64kB alignment, both the text and the data mapping end up having offset 0. * Similarly I had to change the code which clears the BSS so that it clears the correct amount when the alignment specified in the ELF file (64kB on PPC) is different from the kernel page size. I'd like to continue the discussion about how Valgrind should be structured so as to support multiple architectures cleanly. I could make up some patches that would abstract a few things that are different between architectures - things like defining FIRST_ARCH_REG, LAST_ARCH_REG, etc. and using them instead of R_EAX, R_EDI, etc. Paul. |