3 // Copyright by Johannes Sixt, Keith Isdale
4 // This file is under GPL, the GNU General Public Licence
13 class XsldbgDriver
:public DebuggerDriver
{
18 virtual QString
driverName() const;
19 virtual QString
defaultInvocation() const;
20 virtual QStringList
boolOptionList() const;
21 static QString
defaultXsldbg();
22 virtual bool startup(QString cmdStr
);
23 virtual void commandFinished(CmdQueueItem
* cmd
);
24 void slotReceiveOutput(KProcess
* process
, char *buffer
, int buflen
);
26 virtual CmdQueueItem
*executeCmd(DbgCommand
, bool clearLow
= false);
27 virtual CmdQueueItem
*executeCmd(DbgCommand
, QString strArg
,
28 bool clearLow
= false);
29 virtual CmdQueueItem
*executeCmd(DbgCommand
, int intArg
,
30 bool clearLow
= false);
31 virtual CmdQueueItem
*executeCmd(DbgCommand
, QString strArg
,
32 int intArg
, bool clearLow
= false);
33 virtual CmdQueueItem
*executeCmd(DbgCommand
, QString strArg1
,
34 QString strArg2
, bool clearLow
=
36 virtual CmdQueueItem
*executeCmd(DbgCommand
, int intArg1
, int intArg2
,
37 bool clearLow
= false);
38 virtual CmdQueueItem
*queueCmd(DbgCommand
, QueueMode mode
);
39 virtual CmdQueueItem
*queueCmd(DbgCommand
, QString strArg
,
41 virtual CmdQueueItem
*queueCmd(DbgCommand
, int intArg
, QueueMode mode
);
42 virtual CmdQueueItem
*queueCmd(DbgCommand
, QString strArg
, int intArg
,
44 virtual CmdQueueItem
*queueCmd(DbgCommand
, QString strArg1
,
45 QString strArg2
, QueueMode mode
);
47 virtual void terminate();
48 virtual void detachAndTerminate();
49 virtual void interruptInferior();
52 * Parses the output as an array of QChars.
54 virtual VarTree
*parseQCharArray(const char *output
,
55 bool wantErrorValue
, bool qt3like
);
57 virtual void parseBackTrace(const char *output
,
58 QList
< StackFrame
> &stack
);
59 virtual bool parseFrameChange(const char *output
, int &frameNo
,
60 QString
& file
, int &lineNo
,
62 virtual bool parseBreakList(const char *output
,
63 QList
< Breakpoint
> &brks
);
64 virtual bool parseThreadList(const char *output
,
65 QList
< ThreadInfo
> &threads
);
66 virtual bool parseBreakpoint(const char *output
, int &id
,
67 QString
& file
, int &lineNo
, QString
& address
);
68 virtual void parseLocals(const char *output
,
69 QList
< VarTree
> &newVars
);
70 virtual bool parsePrintExpr(const char *output
, bool wantErrorValue
,
72 virtual bool parseChangeWD(const char *output
, QString
& message
);
73 virtual bool parseChangeExecutable(const char *output
,
75 virtual bool parseCoreFile(const char *output
);
76 virtual uint
parseProgramStopped(const char *output
,
78 virtual void parseSharedLibs(const char *output
, QStrList
& shlibs
);
79 virtual bool parseFindType(const char *output
, QString
& type
);
80 virtual void parseRegisters(const char *output
,
81 QList
< RegisterInfo
> ®s
);
82 virtual bool parseInfoLine(const char *output
, QString
& addrFrom
,
84 virtual void parseDisassemble(const char *output
,
85 QList
< DisassembledCode
> &code
);
86 virtual QString
parseMemoryDump(const char *output
,
87 QList
< MemoryDump
> &memdump
);
88 virtual QString
parseSetVariable(const char* output
);
91 int m_gdbMajor
, m_gdbMinor
;
92 QString m_programWD
; /* just an intermediate storage */
93 QString m_xslFile
; /* needed to display it initially */
94 bool m_haveDataFile
; /* have we set the XML data file to use? */
95 QString m_redirect
; /* redirection to /dev/null */
99 QString
makeCmdString(DbgCommand cmd
, QString strArg
);
100 QString
makeCmdString(DbgCommand cmd
, int intArg
);
101 QString
makeCmdString(DbgCommand cmd
, QString strArg
, int intArg
);
102 QString
makeCmdString(DbgCommand cmd
, QString strArg1
,
104 QString
makeCmdString(DbgCommand cmd
, int intArg1
, int intArg2
);
108 #endif // XSLDBGDRIVER_H