3

I have one executable (say a.out) and two sets of input data, say set1 and set2. I want to step through the runs simultaneously: i.e there will be two executables running, identical but different input. I want to able to debug the stage at which the result differs.

  1. Do you know of a free tool that will let me do this?

  2. Is there a way to step through the executables simultaneously in gdb or valgrind (without doing it manually?).

One option is to manually launch two sessions of gdb, dump a few variables (not exhaustive for a large code) and compare the datafiles. But this will be slow and hard. Looking through google, I found a way called comparative debugging although there may be other names I may not be aware of. Can I do Comparative debugging in recent versions of gdb or other tools? The only reference I found was from 1997. So help would be appreciated.

  • Not that I had seen something like that in 12 years of programming, but such a tool might be programming language and OS dependent. You might also want to tag this gratis and linux. – Thomas Weller Aug 9 '16 at 20:57
  • I know commercial debuggers such as Totalview and DDT have this feature. Unfortunately they are expensive. – wander95 Aug 12 '16 at 14:04
  • For others finding this question: "RogueWave TotalView Individual Edition license for Mac OS X is available for US$849", Allinea DDT Workstation Parallel is available for a similar price (£715.00 = 829 €). – Thomas Weller Aug 12 '16 at 15:21
  • another tool is lgdb but it is also commercial and as far as I know, only for cray. – wander95 Aug 12 '16 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.