I think I could use something like this for when I have to debug interaction between various versions of Motif and the X server (and of course, our library on top of Motif). Also, thanks for pointing out xtruss, which I will install ASAP and use to try and figure out a couple of nasty bugs myself.
Brilliant idea.