[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdewebdev/quanta/components/debugger/dbgp
From: Linus McCabe <Linus () mccabe ! nu>
Date: 2005-08-18 19:48:35
Message-ID: 1124394515.447874.29701.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 450682 by linusmc:
error handling
M +43 -2 quantadebuggerdbgp.cpp
M +3 -1 quantadebuggerdbgp.h
--- branches/KDE/3.5/kdewebdev/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp #450681:450682
@@ -264,7 +264,7 @@
// Status command
if(command == "status")
setExecutionState(attribute(response, "status"));
-
+
// Callback stack
else if(command == "stack_get")
stackShow(response);
@@ -278,6 +278,7 @@
// If this is the acknoledge of a step command, request the call stack
m_network.sendCommand("stack_get");
setExecutionState(attribute(response, "status"));
+ handleError(response);
m_network.sendCommand("feature_get", "-n profiler_filename");
sendWatches();
}
@@ -286,6 +287,7 @@
else if(command == "run" )
{
setExecutionState(attribute(response, "status"));
+ handleError(response);
m_network.sendCommand("stack_get");
}
@@ -392,6 +394,7 @@
attribute(child, "lineno").toLong() - 1, // Quanta lines are 0-based, DBGp is 1 based
attribute(child, "where"));
}
+
}
void QuantaDebuggerDBGp::checkSupport( const QDomNode & node )
@@ -618,7 +621,7 @@
valuenode = node.namedItem("startsession");
m_startsession = valuenode.firstChild().nodeValue();
if(m_startsession.isEmpty())
- m_startsession = "http://localhost/DBGp/StartSession.php?gbdScript=/%rfpp";
+ m_startsession = "http://localhost/%rfpp?XDEBUG_SESSION_START=1&XDEBUG_PROFILE";
valuenode = node.namedItem("defaultexecutionstate");
if(valuenode.firstChild().nodeValue().isEmpty())
@@ -970,4 +973,42 @@
return debuggerInterface()->newDebuggerVariable(name, "", DebuggerVariableTypes::Error);;
}
+void QuantaDebuggerDBGp::handleError(const QDomNode & statusnode )
+{
+
+ if(attribute(statusnode, "reason") == "error" || attribute(statusnode, "reason") == "aborted")
+ {
+ QDomNode errornode = statusnode.firstChild();
+ while(!errornode.isNull())
+ {
+ if(errornode.nodeName() == "error")
+ {
+ if(attribute(statusnode, "reason") == "error")
+ {
+ // Managable error
+ long error = attribute(errornode, "code").toLong();
+ if(!(error & m_errormask))
+ {
+ setExecutionState(Running);
+ }
+ else
+ {
+ emit updateStatus(DebuggerUI::HaltedOnError);
+ debuggerInterface()->showStatus(errornode.firstChild().nodeValue(), true);
+ }
+ break;
+ }
+ else
+ {
+ // Fatal error
+ emit updateStatus(DebuggerUI::HaltedOnError);
+ debuggerInterface()->showStatus(errornode.firstChild().nodeValue(), true);
+ }
+ }
+ errornode = errornode.nextSibling();
+ }
+ }
+
+}
+
#include "quantadebuggerdbgp.moc"
--- branches/KDE/3.5/kdewebdev/quanta/components/debugger/dbgp/quantadebuggerdbgp.h #450681:450682
@@ -123,7 +123,7 @@
long m_errormask;
long m_displaydelay;
bool m_supportsasync;
-
+
// Variable type mapping
StringMap m_variabletypes;
@@ -134,6 +134,8 @@
void debuggingState(bool enable);
void connected();
+ void handleError(const QDomNode & statusnode );
+
QString mapServerPathToLocal(const QString& serverpath);
QString mapLocalPathToServer(const QString& localpath);
QString bpToDBGp(DebuggerBreakpoint* breakpoint);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic