Jack Lloyd <[EMAIL PROTECTED]> writes: > On Wed, Aug 29, 2007 at 06:21:55AM -0400, Stephen Leake wrote: >> I'm not very familiar with C++ debugging. I'm using gdb from the >> AdaCore distribution (there isn't one in the MinGW distribution); it >> understands C++, but "break exception" isn't a recognized command (it >> is for Ada :). > > Try 'catch throw' and 'catch catch'. You may need the workaround > described in http://www.cygwin.com/ml/gdb/2004-11/msg00192.html (I did > for gdb 6.3).
Those commands are present. However, they don't help: (gdb) catch throw Catchpoint 1 (throw) (gdb) catch catch Catchpoint 2 (catch) (gdb) run -r c:/Gnu/monotone/tester-testsuite.lua c:/Gnu/monotone-build_mingw/tester_dir cleanup-1 Starting program: c:\Gnu\monotone-build_mingw/tester.exe -r c:/Gnu/monotone/tester-testsuite.lua c:/Gnu/monotone-build_mingw/tester_dir cleanup-1 Program exited with code 0174. (gdb) Hmm. The top-level exception handler in this case seems to be in tester.cc test_invoker::operator(). I can set a breakpoint in the catch clause, and it triggers. So apparently my version of gdb doesn't properly implement 'catch throw'. I have gdb 6.4 for mingw: GNU gdb 6.4 for GNAT Pro 6.0.2 (20070703) This GDB was configured as "i586-pc-mingw32"... So I added an error message in the exception handler: catch (std::exception & e) { E(false, F("error running test %s: %s") % testname % e.what()); retcode = 124; It reports: [EMAIL PROTECTED] ./tester.exe -r c:/Gnu/monotone/tester-testsuite.lua c:/Gnu/monotone-build_mingw/tester_dir cleanup-1 error: error running test cleanup-1: lua error: [string "testlib.lua"]:1054: bad argument #-1 to 'posix_umask' (number expected, got nil) That appears to be from testlib.lua, line 1054, which is in run_one_test: local oldmask = posix_umask(0) posix_umask(oldmask) it's the second call to posix_umask that's dying, so apparently the first call is returning nil. posix_umask is defined in tester.cc; it can return nil. I suspect it should return 0 instead; I've changed it to that locally; that lets tests run. Should I commit that change in tester.cc posix_umask, or is there a better solution? I think 'umask' isn't meaningful on Win32. -- -- Stephe _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel