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.
11 #include "watchwindow.h"
13 // forward declarations
19 class DebuggerMainWndBase
22 DebuggerMainWndBase();
23 virtual ~DebuggerMainWndBase();
26 * Sets the command to invoke the terminal that displays the program
27 * output. If cmd is the empty string, the default is substituted.
29 void setTerminalCmd(const QString
& cmd
);
31 * Sets the command to invoke the debugger.
33 void setDebuggerCmdStr(const QString
& cmd
);
35 * Specifies the file where to write the transcript.
37 void setTranscript(const QString
& name
);
39 * Starts to debug the specified program using the specified language
42 bool debugProgram(const QString
& executable
, QString lang
, QWidget
* parent
);
44 * Specifies the process to attach to after the program is loaded.
46 void setAttachPid(const QString
& pid
);
48 // the following are needed to handle program arguments
49 void setCoreFile(const QString
& corefile
);
50 void setRemoteDevice(const QString
&remoteDevice
);
51 void overrideProgramArguments(const QString
& args
);
52 /** invokes the global options dialog */
53 virtual void doGlobalOptions(QWidget
* parent
);
57 virtual void saveSettings(KConfig
*);
58 virtual void restoreSettings(KConfig
*);
61 QString m_outputTermCmdStr
;
62 QString m_outputTermKeepScript
;
63 KProcess
* m_outputTermProc
;
65 virtual QString
createOutputWindow(); /* returns terminal name */
66 void shutdownTermWindow();
68 QString m_transcriptFile
; /* where gdb dialog is logged */
70 bool m_popForeground
; /* whether main wnd raises when prog stops */
71 int m_backTimeout
; /* when wnd goes back */
72 int m_tabWidth
; /* tab width in characters (can be 0) */
73 QString m_sourceFilter
;
74 QString m_headerFilter
;
76 // the debugger proper
77 QString m_debuggerCmdStr
;
78 KDebugger
* m_debugger
;
79 void setupDebugger(QWidget
* parent
,
83 DebuggerDriver
* driverFromLang(QString lang
);
85 * This function derives a driver name from the contents of the named
88 QString
driverNameFromFile(const QString
& exe
);
91 #endif // MAINWNDBASE_H