KDevelop API Documentation

dbgcontroller.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     begin                : Sun Aug 8 1999
00003     copyright            : (C) 1999 by John Birch
00004     email                : jbb@kdevelop.org
00005  ***************************************************************************/
00006 
00007 /***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 
00016 #ifndef _DBGCONTROLLER_H_
00017 #define _DBGCONTROLLER_H_
00018 
00019 #include <qobject.h>
00020 #include <domutil.h>
00021 
00022 class KProcess;
00023 class QString;
00024 class QStrList;
00025 
00026 namespace GDBDebugger
00027 {
00028 
00029 class Breakpoint;
00030 class DbgCommand;
00031 class TrimmableItem;
00032 class VarItem;
00033 
00034 /***************************************************************************/
00038 /***************************************************************************/
00039 // sigh - namespace's don't work on some of the older compilers
00040 enum DBGStateFlags
00041 {
00042   s_dbgNotStarted     = 1,
00043   s_appNotStarted     = 2,
00044   s_appBusy           = 4,
00045   s_waitForWrite      = 8,
00046   s_programExited     = 16,
00047   s_silent            = 32,
00048   s_viewLocals        = 64,
00049   s_viewBT            = 128,
00050   s_viewBP            = 256,
00051   s_attached          = 512,
00052   s_core              = 1024,
00053   s_waitTimer         = 2048,
00054   s_shuttingDown      = 4096,
00055   s_viewThreads       = 8192
00056 };
00057 /***************************************************************************/
00058 /***************************************************************************/
00059 /***************************************************************************/
00060 class DbgController : public QObject
00061 {
00062     Q_OBJECT
00063 
00064 public:
00065 
00066     DbgController();
00067     virtual ~DbgController();
00068 
00069     virtual bool stateIsOn( int state )                                     = 0;
00070 
00071 protected:
00072     virtual void queueCmd(DbgCommand *cmd, bool executeNext)                = 0;
00073     virtual char *parse(char *str)                                          = 0;
00074 
00075 public slots:
00076     virtual void configure()                                                = 0;
00077 
00086     virtual void slotStart(const QString& shell,
00087                            const DomUtil::PairList& run_envvars,
00088                            const QString& run_directory,
00089                            const QString &application,
00090                            const QString& run_arguments)                    = 0;
00091     //virtual void slotStart(const QString& shell, const QString &application)= 0;
00092     virtual void slotCoreFile(const QString &coreFile)                      = 0;
00093     virtual void slotAttachTo(int pid)                                      = 0;
00094 
00095     virtual void slotStopDebugger()                                         = 0;
00096 
00097     virtual void slotRun()                                                  = 0;
00098     virtual void slotRunUntil(const QString &fileName, int lineNum)         = 0;
00099     virtual void slotStepInto()                                             = 0;
00100     virtual void slotStepOver()                                             = 0;
00101     virtual void slotStepIntoIns()                                          = 0;
00102     virtual void slotStepOverIns()                                          = 0;
00103     virtual void slotStepOutOff()                                           = 0;
00104 
00105     virtual void slotBreakInto()                                            = 0;
00106     virtual void slotBPState(const Breakpoint&)                             = 0;
00107 
00108     virtual void slotDisassemble(const QString &start, const QString &end)  = 0;
00109     virtual void slotMemoryDump(const QString &start, const QString &amount)= 0;
00110     virtual void slotRegisters()                                            = 0;
00111     virtual void slotLibraries()                                            = 0;
00112 
00113     virtual void slotExpandItem(TrimmableItem *parent)                     = 0;
00114     virtual void slotExpandUserItem(VarItem *parent,
00115                                     const QCString &userRequest)            = 0;
00116     virtual void slotSelectFrame(int frame, int thread, bool needFrames)    = 0;
00117     virtual void slotSetLocalViewState(bool onOff)                          = 0;
00118 
00119     // jw - for optional additional commands and initialization
00120     virtual void slotVarItemConstructed(VarItem */*item*/) {}
00121 
00122 protected slots:
00123     virtual void slotDbgStdout(KProcess *proc, char *buf, int buflen)       = 0;
00124     virtual void slotDbgStderr(KProcess*, char*, int) {} ;
00125     virtual void slotDbgWroteStdin(KProcess *proc)                          = 0;
00126     virtual void slotDbgProcessExited(KProcess *proc)                       = 0;
00127 
00128 signals:
00129     void gotoSourcePosition   (const QString &fileName, int lineNum);
00130     void rawGDBBreakpointList (char *buf);
00131     void rawGDBBreakpointSet  (char *buf, int key);
00132     void rawGDBDisassemble    (char *buf);
00133     void rawGDBMemoryDump     (char *buf);
00134     void rawGDBRegisters      (char *buf);
00135     void rawGDBLibraries      (char *buf);
00136     void ttyStdout            (const char *output);
00137     void ttyStderr            (const char *output);
00138     void gdbStdout            (const char *output);
00139     void gdbStderr            (const char *output);
00140     void showStepInSource     (const QString &fileName, int lineNum, const QString &address);
00141     void dbgStatus            (const QString &status, int statusFlag);
00142 
00143 protected:
00144     KProcess *dbgProcess_;
00145 };
00146 
00147 }
00148 
00149 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:29 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003