|
From: Philippe W. <phi...@sk...> - 2008-03-15 00:22:46
|
----- Original Message ----- From: "Doug Evans" <dj...@go...> To: <val...@li...> Sent: Saturday, March 15, 2008 12:35 AM Subject: [Valgrind-developers] gdb stub support > Hi. I've found a couple of references to work on adding a gdb stub to > valgrind but I don't see anything in the repository. What's the state > of this work and is there any source I can play with. [I've hacked on > gdb and written gdb stubs in the past and am interested in helping > out.] Hello Doug, I started working on this in February, and obtained a "basic" working gdb stub. For more details about the current state, see my post of 17 Feb 2008. All this work was done based on valgrind 3.3.0, using gdbserver code from gdb 6.7.. I have been (privately) contacted by someone telling that a contribution of a port (and a stub more complete than what I did) should be contributed soon. Since then, I have put this work on hold, waiting for the above to be integrated, and continue based on that (e.g. to implement breakpoints which are done neither in what I did, nor in what should be contributed soon). That was more than one month ago but it has not yet materialised (all the legal paper takes time, I guess). If the port and stub is not contributed (for whatever reason), then I can provide the state I have reached as a starting point. However, for this: * I suppose some papers have to be signed (?) * I suppose some patch files have to be then prepared * and someone with write access has to put it in the repository (in a branch I guess) Note that the changes I did in the valgrind code are relatively small (something like 150 lines added/changed to add a few basic "lib" services needed for gdbserver stub). The gdbserver code itself is bigger (a few thousands lines from the gdbserver directory "converted" to run under valgrind). I am not sure that the approach I have taken (which is to convert the gdbserver code to valgrind) is more appropriate than just starting from scratch : the gdbserver code is very general, and so, contains code which is not necessarily useful in a valgrind context. I have not done anything about breakpoints implementation, but I am now thinking that the correct implementation is to add a special "trap" instruction in the vex IR (but I had no time to dig more). Not clear to me if this would work for single step. Any feedback about the above points is welcome (and of course, some news about the "to be contributed" would be very useful) Philippe |