KDevelop API Documentation

dbgcontroller.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           dbgcontroller.h  -  description
00003                              -------------------
00004     begin                : Sun Aug 8 1999
00005     copyright            : (C) 1999 by John Birch
00006     email                : jbb@kdevelop.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef _DBGCONTROLLER_H_
00019 #define _DBGCONTROLLER_H_
00020 
00021 #include <qobject.h>
00022 
00023 class KProcess;
00024 class QString;
00025 class QStrList;
00026 
00027 namespace JAVADebugger
00028 {
00029 
00030 class Breakpoint;
00031 class DbgCommand;
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_appStarting       = 8192,
00056   s_parsingOutput     = 8192*2,
00057   s_parsingLocals     = 8192*4
00058 };
00059 
00060 // only one command should be active at a time
00061 enum DBGCommandFlags
00062 {
00063   c_Stackframe        = 1,
00064   c_Locals            = 2,
00065   c_BreakpointList    = 3
00066 };
00067 
00068 /***************************************************************************/
00069 /***************************************************************************/
00070 /***************************************************************************/
00071 class DbgController : public QObject
00072 {
00073     Q_OBJECT
00074 
00075 public:
00076 
00077     DbgController();
00078     virtual ~DbgController();
00079     virtual void reConfig()                                                 = 0;
00080 
00081 protected:
00082     virtual void queueCmd(DbgCommand *cmd, bool executeNext)                = 0;
00083     virtual char *parse(char *str)                                          = 0;
00084 
00085 public slots:
00086     virtual void slotStart(const QString &application, const QString &args,
00087                            const QString &sDbgShell=QString())              = 0;
00088     virtual void slotCoreFile(const QString &coreFile)                      = 0;
00089     virtual void slotAttachTo(int pid)                                      = 0;
00090 
00091     virtual void slotRun()                                                  = 0;
00092     virtual void slotRunUntil(const QString &fileName, int lineNum)         = 0;
00093     virtual void slotStepInto()                                             = 0;
00094     virtual void slotStepOver()                                             = 0;
00095     virtual void slotStepIntoIns()                                          = 0;
00096     virtual void slotStepOverIns()                                          = 0;
00097     virtual void slotStepOutOff()                                           = 0;
00098 
00099     virtual void slotBreakInto()                                            = 0;
00100     virtual void slotBPState(Breakpoint *BP)                                = 0;
00101 
00102     virtual void slotDisassemble(const QString &start, const QString &end)  = 0;
00103     virtual void slotMemoryDump(const QString &start, const QString &amount)= 0;
00104     virtual void slotRegisters()                                            = 0;
00105     virtual void slotLibraries()                                            = 0;
00106 
00107     virtual void slotExpandItem(VarItem *parent)                            = 0;
00108     virtual void slotExpandUserItem(VarItem *parent,
00109                                     const QCString &userRequest)            = 0;
00110     virtual void slotSelectFrame(int frame)                                 = 0;
00111     virtual void slotSetLocalViewState(bool onOff)                          = 0;
00112 
00113 protected slots:
00114     virtual void slotDbgStdout(KProcess *proc, char *buf, int buflen)       = 0;
00115     virtual void slotDbgStderr(KProcess*, char*, int) {} ;
00116     virtual void slotDbgWroteStdin(KProcess *proc)                          = 0;
00117     virtual void slotDbgProcessExited(KProcess *proc)                       = 0;
00118 
00119 signals:
00120     void rawData              (const QString &rawData);
00121     void gotoSourcePosition   (const QString &fileName, int lineNum);
00122     void rawJDBBreakpointList (char *buf);
00123     void rawJDBBreakpointSet  (char *buf, int key);
00124     void rawJDBDisassemble    (char *buf);
00125     void rawJDBMemoryDump     (char *buf);
00126     void rawJDBRegisters      (char *buf);
00127     void rawJDBLibraries      (char *buf);
00128     void ttyStdout            (const char *output);
00129     void ttyStderr            (const char *output);
00130 
00131 protected:
00132     KProcess *dbgProcess_;
00133 };
00134 
00135 }
00136 
00137 #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 Wed Mar 23 00:03:46 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003