views:

25

answers:

1

What would be the best way to debug multi-process code (i.e. processes where parent process spawns multiple child daemon processes). So far I have been doing -

  1. Make sure the program runs fine in single process mode.
  2. After that turn on logging mechanism & try to figure out what might be going on in the logs etc...

Are there any better tools (for C/C++) or generic techniques that I can use to better (& faster) diagnosis of a problem?

e.g.: For memory leaks Valgrind is an excellent tool. Any such tools out there for this purpose?

A: 

For develop environments with gdb I attach to processes and debug just as I would for a single process. http://www1.jct.ac.il/cc-res/online-doc/gdb/gdb_23.html

tauran