2 * Copyright Johannes Sixt, Keith Isdale
3 * This file is licensed under the GNU General Public License Version 2.
4 * See the file COPYING in the toplevel directory of the source directory.
10 #include "dbgdriver.h"
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
);
25 virtual void terminate();
26 virtual void detachAndTerminate();
27 virtual void interruptInferior();
29 virtual void setPrintQStringDataCmd(const char* cmd
);
31 * Parses the output as an array of QChars.
33 virtual ExprValue
*parseQCharArray(const char *output
,
34 bool wantErrorValue
, bool qt3like
);
36 virtual void parseBackTrace(const char *output
,
37 std::list
< StackFrame
> &stack
);
38 virtual bool parseFrameChange(const char *output
, int &frameNo
,
39 QString
& file
, int &lineNo
,
41 virtual bool parseBreakList(const char *output
,
42 std::list
< Breakpoint
> &brks
);
43 virtual std::list
<ThreadInfo
> parseThreadList(const char *output
);
44 virtual bool parseBreakpoint(const char *output
, int &id
,
45 QString
& file
, int &lineNo
, QString
& address
);
46 virtual void parseLocals(const char *output
,
47 std::list
< ExprValue
* > &newVars
);
48 virtual ExprValue
* parsePrintExpr(const char *output
, bool wantErrorValue
);
49 virtual bool parseChangeWD(const char *output
, QString
& message
);
50 virtual bool parseChangeExecutable(const char *output
,
52 virtual bool parseCoreFile(const char *output
);
53 virtual uint
parseProgramStopped(const char *output
, bool haveCoreFile
,
55 virtual QStringList
parseSharedLibs(const char *output
);
56 virtual bool parseFindType(const char *output
, QString
& type
);
57 virtual std::list
<RegisterInfo
> parseRegisters(const char *output
);
58 virtual bool parseInfoLine(const char *output
, QString
& addrFrom
,
60 virtual std::list
<DisassembledCode
> parseDisassemble(const char *output
);
61 virtual QString
parseMemoryDump(const char *output
,
62 std::list
< MemoryDump
> &memdump
);
63 virtual QString
parseSetVariable(const char* output
);
66 QString m_programWD
; /* just an intermediate storage */
67 QString m_xslFile
; /* needed to display it initially */
68 bool m_haveDataFile
; /* have we set the XML data file to use? */
69 QString m_redirect
; /* redirection to /dev/null */
71 virtual QString
makeCmdString(DbgCommand cmd
);
72 virtual QString
makeCmdString(DbgCommand cmd
, QString strArg
);
73 virtual QString
makeCmdString(DbgCommand cmd
, int intArg
);
74 virtual QString
makeCmdString(DbgCommand cmd
, QString strArg
, int intArg
);
75 virtual QString
makeCmdString(DbgCommand cmd
, QString strArg1
, QString strArg2
);
76 virtual QString
makeCmdString(DbgCommand cmd
, int intArg1
, int intArg2
);
77 virtual QString
makeCmdString(DbgCommand cmd
, QString strArg
, int intArg1
, int intArg2
);
78 virtual int findPrompt(const QByteArray
& output
) const;
82 #endif // XSLDBGDRIVER_H