Log in

View Full Version : how to do this ?


mcensamuel
May 3rd, 2004, 16:12
Hi,

I am new to this field.Sorry..if anything wrong...

now i am testing one n/w application.When i am sending some types of packet,it is giving segfault.It is in Linux ELF fileformat.So i tried to attach that process to strace and gdb.

I have found that ,it is giving segfault becuase the previous function returning 0xFFFFFFFF.
Now the problem is,when try to replicate the same situation at two conditions.
ONE - Send packets at 1mbps ,it is giving segfault.
TWO - Send one packet at a time ,like manual entry.It is NOT giving segfault.
In simple,it is giving segfault ,when i sending packets at higher speed and not giving segfault when i sending packets at lower speed.

Now i want to trace this program.Is there any possibility ??

Thanks in advance for your help.

Thanks
McEnroe.

dELTA
May 5th, 2004, 14:12
Well, you already said you had attached a debugger and pin-pointed the function that returns a different result in the case of the crash. Analyze this function in a disassembler, investigating what might cause the return value to change, and then set breakpoints (possibly conditional that only break when the function result is the bad one) incrementally from the back of this function until you find the point that differs between a crashing and a non-crashing run.