summaryrefslogtreecommitdiffstats
path: root/quanta/components/debugger/dbgp/quantadebuggerdbgp.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/components/debugger/dbgp/quantadebuggerdbgp.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/debugger/dbgp/quantadebuggerdbgp.h')
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.h166
1 files changed, 166 insertions, 0 deletions
diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.h b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h
new file mode 100644
index 00000000..fd8eda22
--- /dev/null
+++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h
@@ -0,0 +1,166 @@
+/***************************************************************************
+ phpdebugdbgp.cpp
+ -------------------
+ begin : 2004-03-12
+ copyright : (C) 2004 Linus McCabe <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef QUANTADEBUGGERGUBED_H
+#define QUANTADEBUGGERGUBED_H
+
+#include <kserversocket.h>
+#include <kstreamsocket.h>
+#include <qptrlist.h>
+#include <kurl.h>
+#include <qdom.h>
+
+#include "debuggerclient.h"
+#include "dbgpnetwork.h"
+
+typedef QValueList<QString> WatchList;
+typedef QMap<QString, QString> StringMap;
+
+class QuantaDebuggerDBGp : public DebuggerClient
+{
+ Q_OBJECT
+
+ public:
+ QuantaDebuggerDBGp(QObject *parent, const char* name, const QStringList&);
+ ~QuantaDebuggerDBGp();
+
+ // Execution states
+ enum State
+ {
+ Starting = 0,
+ Stopping,
+ Stopped,
+ Running,
+ Break
+ };
+ // Error codes
+ enum Errors
+ {
+ Warning = 2,
+ Notice = 8,
+ User_Error = 256,
+ User_Warning = 512,
+ User_Notice = 1024
+ };
+
+ // Protocol version
+ static const char protocolversion[];
+
+ // Manager interaction
+ const uint supports(DebuggerClientCapabilities::Capabilities);
+
+ // Execution control
+ void request();
+ void run();
+ void stepInto();
+ void stepOver();
+ void stepOut();
+ void pause();
+ void kill();
+ void setExecutionState(const QString &state);
+ void setExecutionState(const State &state, bool forcesend = false);
+
+ // Connection
+ void startSession();
+ void endSession();
+
+ // Return name of debugger
+ QString getName();
+
+ // Initiation
+ void checkSupport(const QDomNode&node);
+
+ // New file opened in quanta
+ void fileOpened(const QString& file);
+
+ // Settings
+ void readConfig(QDomNode node);
+ void showConfig(QDomNode node);
+
+ // Breakpoints
+ void addBreakpoint(DebuggerBreakpoint* breakpoint);
+ void removeBreakpoint(DebuggerBreakpoint* breakpoint);
+ void showCondition(const StringMap &args);
+
+ // Variables
+ void addWatch(const QString &variable);
+ void removeWatch(DebuggerVariable *var);
+ void variableSetValue(const DebuggerVariable &variable);
+ void propertySetResponse( const QDomNode & setnode);
+
+ // Call stack
+ void stackShow(const QDomNode&node);
+
+ private:
+ DBGpNetwork m_network;
+
+ QString m_serverBasedir;
+ QString m_localBasedir;
+ QString m_serverPort;
+ QString m_serverHost;
+ QString m_startsession;
+ QString m_listenPort;
+ QString m_profilerFilename;
+ QString m_appid;
+ QString m_initialscript;
+
+ bool m_useproxy;
+ bool m_profilerAutoOpen;
+ bool m_profilerMapFilename;
+ State m_executionState, m_defaultExecutionState;
+ long m_errormask;
+ long m_displaydelay;
+ bool m_supportsasync;
+
+ // Variable type mapping
+ StringMap m_variabletypes;
+
+ // Internal watchlist
+ WatchList m_watchlist;
+
+ void sendWatches();
+ 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);
+ void setBreakpointKey(const QDomNode& response);
+
+ QString attribute(const QDomNode&node, const QString &attribute);
+ void initiateSession(const QDomNode& initpacket);
+
+ void typemapSetup(const QDomNode& typemapnode);
+ void showWatch(const QDomNode& typemapnode);
+ DebuggerVariable* buildVariable(const QDomNode& typemapnode);
+
+ // Profiler
+ void profilerOpen(bool forceopen);
+ void profilerOpen();
+
+ public slots:
+ void slotNetworkActive(bool active);
+ void slotNetworkConnected(bool connected);
+ void slotNetworkError(const QString &errormsg, bool log);
+ void processCommand(const QString&);
+
+ signals:
+ void updateStatus(DebuggerUI::DebuggerStatus);
+};
+
+#endif