From b1e7bb00fec7a890c8157e90aca2fb23cf6c8c88 Mon Sep 17 00:00:00 2001 From: micio Date: Mon, 16 Jul 2012 18:58:26 +0000 Subject: [PATCH] Ide/Debuggers/Gdb_MI2 : small patch to avoid debugger crash when ungrabbing mouse git-svn-id: svn://ultimatepp.org/upp/trunk@5200 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Debuggers/Gdb_MI2.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/uppsrc/ide/Debuggers/Gdb_MI2.cpp b/uppsrc/ide/Debuggers/Gdb_MI2.cpp index 2b2359f18..67c69f6de 100644 --- a/uppsrc/ide/Debuggers/Gdb_MI2.cpp +++ b/uppsrc/ide/Debuggers/Gdb_MI2.cpp @@ -383,6 +383,8 @@ void Gdb_MI2::Unlock() // so reliable as it can happen (strangely) in middle of nothing MIValue Gdb_MI2::ParseGdb(String const &output, bool wait) { +RLOG("\n-----------------------GDB OUTPUT--------------------"); +RLOG(output); MIValue res; // parse result data @@ -577,6 +579,8 @@ MIValue Gdb_MI2::ReadGdb(bool wait) // debugger run/stop status -- all remaining asynchrnonous output is discarded MIValue Gdb_MI2::MICmd(const char *cmdLine) { +RLOG("\n-----------------------MICMD--------------------"); +RLOG(cmdLine); // sends command to debugger and get result data // should handle dbg unexpected termination ? @@ -1743,6 +1747,10 @@ bool Gdb_MI2::Create(One _host, const String& exefile, const String& cmdli MICmd("gdb-set width 0"); MICmd("gdb-set confirm off"); MICmd("gdb-set print asm-demangle"); + + // avoids debugger crash if caught inside ungrabbing function + // (don't solves all cases, but helps...) + MICmd("gdb-set unwindonsignal on"); if(!IsNull(cmdline)) MICmd("gdb-set args " + cmdline);