Extend copyright to 2018.
[kdbg.git] / kdbg / xsldbgdriver.h
blobbdf9aa94c3527fd7c66d7b2ea9d43b3096bcc7a8
1 /*
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.
5 */
7 #ifndef XSLDBGDRIVER_H
8 #define XSLDBGDRIVER_H
10 #include "dbgdriver.h"
13 class XsldbgDriver:public DebuggerDriver {
14 Q_OBJECT public:
15 XsldbgDriver();
16 ~XsldbgDriver();
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);
30 /**
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,
40 DbgAddr & address);
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,
51 QString & message);
52 virtual bool parseCoreFile(const char *output);
53 virtual uint parseProgramStopped(const char *output, bool haveCoreFile,
54 QString & message);
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,
59 QString & addrTo);
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);
65 protected:
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;
79 void parseMarker();
82 #endif // XSLDBGDRIVER_H