RedHat iTOps Tube

Monday, May 14, 2012

Debugging Issues

All,



I'm having some issues with my code. I'm getting SIGABRTs. I have two modes of operation, debug and no-debug. In debug mode I receive a SIGABRT. In no-debug mode it works perfectly fine for 250000+ testcases.



What are some issues to look for that would cause a SIGABRT that is relevant to turning off the debug code?



The SIGABRT occurs after the end of a "very" long if-statement.



Below is an example of the debugger function call.


Code:


void debugger( const string output )

{

  if(DEBUG)

  {

      cout << pout << endl;

  }

}





Code:


Program received signal SIGABRT, Aborted.

0x77a600ed in ntdll!RtlEnableEarlyCriticalSectionEventCreation ()

  from /cygdrive/c/windows/system32/ntdll.dll

(gdb) Quit

(gdb) up

#1  0x77a600ed in ntdll!RtlEnableEarlyCriticalSectionEventCreation ()

  from /cygdrive/c/windows/system32/ntdll.dll

(gdb) up

#2  0x76f00bdd in WaitForMultipleObjectsEx () from /cygdrive/c/windows/syswow64/KernelBase.dll

(gdb) up

#3  0x00000002 in ?? ()

(gdb) up

#4  0x00000001 in ?? ()

(gdb) up

#5  0x0028c818 in ?? ()

(gdb) up

Initial frame selected; you cannot go up.

(gdb)