Stacktrace in cygwin gdb after uncaught exception

Ryan Boder boder@bitwiserlabs.com
Fri Sep 22 20:06:00 GMT 2006


> Yes, try the 'catch throw' command in gdb -- that should break on the  
> throw itself, and will give a useful stack trace (in my quick  
> testing) ;)

Thanks, but that's not exactly what I'm looking for. I only want gdb to break
when  the exception is not caught. Using the 'catch throw' command breaks 
any time an exception is thrown.

If you debug the following program, 'catch throw' will cause gdb to break on the
throw -1 line when I only want it to break on the throw -2 line.

int main() {

  try {
    throw -1;
  } catch (...) {}

  throw -2;

  return 0;
}

The default behavior of gdb on Fedora Linux Linux is to break on the throw -2
line. Is this impossible on cygwin or something?

--
Ryan Boder
http://bitwiserlabs.com



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list