Convert parseSharedLibs() from QStrList to QStringList.
[kdbg.git] / kdbg / gdbdriver.h
blobc92248a43350cf0009bb3185657a329dd299170b
1 /*
2 * Copyright Johannes Sixt
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 GDBDRIVER_H
8 #define GDBDRIVER_H
10 #include "dbgdriver.h"
13 class GdbDriver : public DebuggerDriver
15 Q_OBJECT
16 public:
17 GdbDriver();
18 ~GdbDriver();
20 virtual QString driverName() const;
21 virtual QString defaultInvocation() const;
22 virtual QStringList boolOptionList() const;
23 void setDefaultInvocation(QString cmd) { m_defaultCmd = cmd; }
24 static QString defaultGdb();
25 virtual bool startup(QString cmdStr);
26 virtual void commandFinished(CmdQueueItem* cmd);
27 virtual CmdQueueItem* executeCmd(DbgCommand,
28 bool clearLow = false);
29 virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg,
30 bool clearLow = false);
31 virtual CmdQueueItem* executeCmd(DbgCommand, int intArg,
32 bool clearLow = false);
33 virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg, int intArg,
34 bool clearLow = false);
35 virtual CmdQueueItem* executeCmd(DbgCommand, QString strArg1, QString strArg2,
36 bool clearLow = false);
37 virtual CmdQueueItem* executeCmd(DbgCommand, int intArg1, int intArg2,
38 bool clearLow = false);
39 virtual CmdQueueItem* queueCmd(DbgCommand,
40 QueueMode mode);
41 virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg,
42 QueueMode mode);
43 virtual CmdQueueItem* queueCmd(DbgCommand, int intArg,
44 QueueMode mode);
45 virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg, int intArg,
46 QueueMode mode);
47 virtual CmdQueueItem* queueCmd(DbgCommand, QString strArg1, QString strArg2,
48 QueueMode mode);
50 virtual void terminate();
51 virtual void detachAndTerminate();
52 virtual void interruptInferior();
53 virtual void setPrintQStringDataCmd(const char* cmd);
54 virtual ExprValue* parseQCharArray(const char* output, bool wantErrorValue, bool qt3like);
55 virtual void parseBackTrace(const char* output, std::list<StackFrame>& stack);
56 virtual bool parseFrameChange(const char* output, int& frameNo,
57 QString& file, int& lineNo, DbgAddr& address);
58 virtual bool parseBreakList(const char* output, std::list<Breakpoint>& brks);
59 virtual std::list<ThreadInfo> parseThreadList(const char* output);
60 virtual bool parseBreakpoint(const char* output, int& id,
61 QString& file, int& lineNo, QString& address);
62 virtual void parseLocals(const char* output, std::list<ExprValue*>& newVars);
63 virtual ExprValue* parsePrintExpr(const char* output, bool wantErrorValue);
64 virtual bool parseChangeWD(const char* output, QString& message);
65 virtual bool parseChangeExecutable(const char* output, QString& message);
66 virtual bool parseCoreFile(const char* output);
67 virtual uint parseProgramStopped(const char* output, QString& message);
68 virtual QStringList parseSharedLibs(const char* output);
69 virtual bool parseFindType(const char* output, QString& type);
70 virtual std::list<RegisterInfo> parseRegisters(const char* output);
71 virtual bool parseInfoLine(const char* output,
72 QString& addrFrom, QString& addrTo);
73 virtual std::list<DisassembledCode> parseDisassemble(const char* output);
74 virtual QString parseMemoryDump(const char* output, std::list<MemoryDump>& memdump);
75 virtual QString parseSetVariable(const char* output);
76 virtual QString editableValue(VarTree* value);
77 protected:
78 int m_gdbMajor, m_gdbMinor;
79 QString m_programWD; /* just an intermediate storage */
80 QString m_redirect; /* redirection to /dev/null */
81 bool m_haveCoreFile;
82 QString m_defaultCmd; /* how to invoke gdb */
84 QString makeCmdString(DbgCommand cmd, QString strArg);
85 QString makeCmdString(DbgCommand cmd, int intArg);
86 QString makeCmdString(DbgCommand cmd, QString strArg, int intArg);
87 QString makeCmdString(DbgCommand cmd, QString strArg1, QString strArg2);
88 QString makeCmdString(DbgCommand cmd, int intArg1, int intArg2);
89 void parseMarker();
92 #endif // GDBDRIVER_H