Debug env for long time use

Hi,

I'm pritty new to C, but a recent bug in a program i've been using has forced me to debug it. But I am unable to find a debugger that can act as a layer between the OS and the program to see whats going on..

The problem is that this piece of software makes a connection through localhost to another program. That connection randomly times out for a reason that is unclear to me.. All other connections remain online.

Is there any softwarepackage availible that can run this program for multiple days till the error occures, while remaining to log all input and output of this program? (like memory usage, input through network,...)

EDIT: I'm using PCLinuxOS 2007 at the moment, but the software is due to run on CentOS 5.*.

Thanks!

Have you already tried to use a sniffer such as tcpdump or snoop to collect the information from the connection between both ends? It could be something valuable before any other kind of debug.

Hi pflynn,

The reason for this timeout is in my eyes that the program stops responding at some time. As all other connections remain online and no other systems report any connectivity problems, my first guess it that the program hangs on something internaly, then the connection times out. The process itself just keeps on going but loses memory values after some time left idle, and we have to manualy shut it down (to prevent dataloss) and start it again.

Greetings and thanks!