paawan oza wrote: > Hi, > Thank you very much for your elaborated reply. > I will integrate the test example with test suite by next week-end. > And, also take of all yours and Hui's formatting comments. > I will come up with the final up to date patch with integrated test-suite. > Thank you again for your response. : ) > I start working towards it. > Regards, > Oza. Excellent. Now let's talk about what the test should test. I don't think it is necessary to test each individual instruction (unless you really want to). We don't usually go to that extreme. What we want to establish is "does the patch do what it's intended to do", so let's make a statement about what it's intended to do. You correct me if I'm wrong, but in my impression, it can be summed up as: preserve and restore the state of the standard Intel floating point unit during record and replay". So you just need to test that the FP machine state is preserved, and that when we go backwards, the state is restored to what it was before. I think that means mainly the '387' registers, or the state that is displayed when we say "info float". To help you get started, I've attached a simple gdb test that checks to see if we can save and restore one register ('st0'). This will show you in general how it is done, and if you want to, you can use it as a starting point, and add tests for the rest of the registers. The subroutines that we use, such as "gdb_test", are mostly defined in gdb/testsuite/lib/gdb.exp, if you need to look at them. There's some documentation in the comments, and also in gdb/doc/gdbint.texinfo.