Convert parseSharedLibs() from QStrList to QStringList.
[kdbg.git] / kdbg / xsldbgdriver.h
blobf27b09d9233e9a9a8d00963a96d523916670f683
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"
11 #include "qregexp.h"
14 class XsldbgDriver:public DebuggerDriver {
15 Q_OBJECT public:
16 XsldbgDriver();
17 ~XsldbgDriver();
19 virtual QString driverName() const;
20 virtual QString defaultInvocation() const;
21 virtual QStringList boolOptionList() const;
22 static QString defaultXsldbg();
23 virtual bool startup(QString cmdStr);
24 virtual void commandFinished(CmdQueueItem * cmd);
25 void slotReceiveOutput(KProcess * process, char *buffer, int buflen);
27 virtual CmdQueueItem *executeCmd(DbgCommand, bool clearLow = false);
28 virtual CmdQueueItem *executeCmd(DbgCommand, QString strArg,
29 bool clearLow = false);
30 virtual CmdQueueItem *executeCmd(DbgCommand, int intArg,
31 bool clearLow = false);
32 virtual CmdQueueItem *executeCmd(DbgCommand, QString strArg,
33 int intArg, bool clearLow = false);
34 virtual CmdQueueItem *executeCmd(DbgCommand, QString strArg1,
35 QString strArg2, bool clearLow =
36 false);
37 virtual CmdQueueItem *executeCmd(DbgCommand, int intArg1, int intArg2,
38 bool clearLow = false);
39 virtual CmdQueueItem *queueCmd(DbgCommand, QueueMode mode);
40 virtual CmdQueueItem *queueCmd(DbgCommand, QString strArg,
41 QueueMode mode);
42 virtual CmdQueueItem *queueCmd(DbgCommand, int intArg, QueueMode mode);
43 virtual CmdQueueItem *queueCmd(DbgCommand, QString strArg, int intArg,
44 QueueMode mode);
45 virtual CmdQueueItem *queueCmd(DbgCommand, QString strArg1,
46 QString strArg2, QueueMode mode);
48 virtual void terminate();
49 virtual void detachAndTerminate();
50 virtual void interruptInferior();
52 virtual void setPrintQStringDataCmd(const char* cmd);
53 /**
54 * Parses the output as an array of QChars.
56 virtual ExprValue *parseQCharArray(const char *output,
57 bool wantErrorValue, bool qt3like);
59 virtual void parseBackTrace(const char *output,
60 std::list < StackFrame > &stack);
61 virtual bool parseFrameChange(const char *output, int &frameNo,
62 QString & file, int &lineNo,
63 DbgAddr & address);
64 virtual bool parseBreakList(const char *output,
65 std::list < Breakpoint > &brks);
66 virtual std::list<ThreadInfo> parseThreadList(const char *output);
67 virtual bool parseBreakpoint(const char *output, int &id,
68 QString & file, int &lineNo, QString& address);
69 virtual void parseLocals(const char *output,
70 std::list < ExprValue* > &newVars);
71 virtual ExprValue * parsePrintExpr(const char *output, bool wantErrorValue);
72 virtual bool parseChangeWD(const char *output, QString & message);
73 virtual bool parseChangeExecutable(const char *output,
74 QString & message);
75 virtual bool parseCoreFile(const char *output);
76 virtual uint parseProgramStopped(const char *output,
77 QString & message);
78 virtual QStringList parseSharedLibs(const char *output);
79 virtual bool parseFindType(const char *output, QString & type);
80 virtual std::list<RegisterInfo> parseRegisters(const char *output);
81 virtual bool parseInfoLine(const char *output, QString & addrFrom,
82 QString & addrTo);
83 virtual std::list<DisassembledCode> parseDisassemble(const char *output);
84 virtual QString parseMemoryDump(const char *output,
85 std::list < MemoryDump > &memdump);
86 virtual QString parseSetVariable(const char* output);
88 protected:
89 int m_gdbMajor, m_gdbMinor;
90 QString m_programWD; /* just an intermediate storage */
91 QString m_xslFile; /* needed to display it initially */
92 bool m_haveDataFile; /* have we set the XML data file to use? */
93 QString m_redirect; /* redirection to /dev/null */
94 bool m_haveCoreFile;
95 QRegExp m_markerRE;
97 QString makeCmdString(DbgCommand cmd, QString strArg);
98 QString makeCmdString(DbgCommand cmd, int intArg);
99 QString makeCmdString(DbgCommand cmd, QString strArg, int intArg);
100 QString makeCmdString(DbgCommand cmd, QString strArg1,
101 QString strArg2);
102 QString makeCmdString(DbgCommand cmd, int intArg1, int intArg2);
103 void parseMarker();
106 #endif // XSLDBGDRIVER_H