|
From: Jeremy F. <je...@go...> - 2004-01-09 17:38:18
|
On Fri, 2004-01-09 at 08:20, Nicholas Nethercote wrote: > I've swapped, giving: > > 1. VALGRIND_OPTS > 2. ~/.valgrindrc > 3. ./.valgrindrc Where does the command-line come into this? What happens with _VALGRIND_CLO? I think if the latter is set, then everything else should be ignored, since it should contain the complete union of all command line options anyway. > Diff is attached, feedback welcome. I hope the way I mmap'd in the .rc > files and didn't munmap them is reasonable. Why mmap? Why not just allocate a chunk of memory and read? > I think this also fixes bug 71126, thanks to Tom for his patch. I still think this could do with a more radical rearrangement. I don't think main() should be parsing the command line at all, or loading the tool. If it simply generates a unified vg_argv and passes it to VG_(main), VG_(main) can do the rest. This means that the address space should remain padded until VG_(main) is ready to unpad it (ie, after doing dlopen on the tool). J |