debuggerpart.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 1999-2001 by John Birch * 00003 * jbb@kdevelop.org * 00004 * Copyright (C) 2001 by Bernd Gehrmann * 00005 * bernd@kdevelop.org * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 ***************************************************************************/ 00013 00014 #ifndef _DEBUGGERPART_H_ 00015 #define _DEBUGGERPART_H_ 00016 00017 #include <qguardedptr.h> 00018 #include "kdevplugin.h" 00019 #include "kdevcore.h" 00020 00021 #include "debuggerdcopinterface.h" 00022 00023 namespace KParts { class Part; } 00024 00025 class QLabel; 00026 class QPopupMenu; 00027 class KDialogBase; 00028 class ProcessWidget; 00029 class ProcessLineMaker; 00030 00031 namespace GDBDebugger 00032 { 00033 00034 class GDBBreakpointWidget; 00035 class FramestackWidget; 00036 class DisassembleWidget; 00037 class Breakpoint; 00038 class DbgController; 00039 class DbgToolBar; 00040 class VariableWidget; 00041 class GDBOutputWidget; 00042 00043 class DebuggerPart : public KDevPlugin, virtual public DebuggerDCOPInterface 00044 { 00045 Q_OBJECT 00046 00047 public: 00048 DebuggerPart( QObject *parent, const char *name, const QStringList & ); 00049 ~DebuggerPart(); 00050 virtual void restorePartialProjectSession(const QDomElement* el); 00051 virtual void savePartialProjectSession(QDomElement* el); 00052 00053 k_dcop: 00054 virtual ASYNC slotDebugExternalProcess(); 00055 00056 private slots: 00057 void guiClientAdded(KXMLGUIClient*); 00058 void contextMenu(QPopupMenu *popup, const Context *context); 00059 void toggleBreakpoint(); 00060 void contextWatch(); 00061 // void projectOpened(); 00062 void projectClosed(); 00063 void projectConfigWidget(KDialogBase *dlg); 00064 void slotActivePartChanged(KParts::Part*); 00065 00066 void slotRun(); 00067 void slotExamineCore(); 00068 void slotAttachProcess(); 00069 void slotStopDebugger(); 00070 void slotStop(KDevPlugin* which = 0); 00071 void slotPause(); 00072 void slotRunToCursor(); 00073 void slotStepOver(); 00074 void slotStepOverInstruction(); 00075 void slotStepIntoInstruction(); 00076 void slotStepInto(); 00077 void slotStepOut(); 00078 void slotMemoryView(); 00079 00080 void slotRefreshBPState(const Breakpoint&); 00081 void slotStatus(const QString &msg, int state); 00082 void slotShowStep(const QString &fileName, int lineNum); 00083 void slotGotoSource(const QString &fileName, int lineNum); 00084 00085 void slotDCOPApplicationRegistered(const QCString &appId); 00086 void slotCloseDrKonqi(); 00087 00088 private: 00089 bool attachProcess(int pid); 00090 bool startDebugger(); 00091 void setupController(); 00092 00093 QGuardedPtr<VariableWidget> variableWidget; 00094 QGuardedPtr<GDBBreakpointWidget> gdbBreakpointWidget; 00095 QGuardedPtr<FramestackWidget> framestackWidget; 00096 QGuardedPtr<DisassembleWidget> disassembleWidget; 00097 QGuardedPtr<GDBOutputWidget> gdbOutputWidget; 00098 DbgController *controller; 00099 QGuardedPtr<QLabel> statusBarIndicator; 00100 QGuardedPtr<DbgToolBar> floatingToolBar; 00101 ProcessLineMaker* procLineMaker; 00102 ProcessLineMaker* gdbLineMaker; 00103 00104 QString m_contextIdent; 00105 QCString m_drkonqi; 00106 }; 00107 00108 } 00109 00110 #endif