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.
12 #include <kxmlguiwindow.h>
17 class KAnimatedButton
;
18 class KRecentFilesAction
;
23 class BreakpointTable
;
32 class DebuggerMainWnd
: public KXmlGuiWindow
39 bool debugProgram(const QString
& exe
, const QString
& lang
);
42 * Specifies the file where to write the transcript.
44 void setTranscript(const QString
& name
);
46 * Specifies the process to attach to after the program is loaded.
48 void setAttachPid(const QString
& pid
);
50 // the following are needed to handle program arguments
51 void setCoreFile(const QString
& corefile
);
52 void setRemoteDevice(const QString
&remoteDevice
);
53 void overrideProgramArguments(const QString
& args
);
57 virtual void saveProperties(KConfigGroup
& cg
);
58 virtual void readProperties(const KConfigGroup
& cg
);
60 void saveSettings(KSharedConfigPtr
);
61 void restoreSettings(KSharedConfigPtr
);
68 WinStack
* m_filesWindow
;
69 QListWidget
* m_btWindow
;
70 ExprWnd
* m_localVariables
;
71 WatchWindow
* m_watches
;
72 RegisterView
* m_registers
;
73 BreakpointTable
* m_bpTable
;
74 TTYWindow
* m_ttyWindow
;
75 ThreadList
* m_threads
;
76 MemoryWindow
* m_memoryWindow
;
80 // recent execs in File menu
81 QAction
* m_closeAction
;
82 QAction
* m_reloadAction
;
83 QAction
* m_fileExecAction
;
84 KRecentFilesAction
* m_recentExecAction
;
85 QAction
* m_coreDumpAction
;
86 QAction
* m_settingsAction
;
87 QAction
* m_findAction
;
88 QAction
* m_btWindowAction
;
89 QAction
* m_localVariablesAction
;
90 QAction
* m_watchesAction
;
91 QAction
* m_registersAction
;
92 QAction
* m_bpTableAction
;
93 QAction
* m_ttyWindowAction
;
94 QAction
* m_threadsAction
;
95 QAction
* m_memoryWindowAction
;
97 QAction
* m_stepIntoAction
;
98 QAction
* m_stepOverAction
;
99 QAction
* m_stepOutAction
;
100 QAction
* m_toCursorAction
;
101 QAction
* m_stepIntoIAction
;
102 QAction
* m_stepOverIAction
;
103 QAction
* m_execMovePCAction
;
104 QAction
* m_breakAction
;
105 QAction
* m_killAction
;
106 QAction
* m_restartAction
;
107 QAction
* m_attachAction
;
108 QAction
* m_argumentsAction
;
109 QAction
* m_bpSetAction
;
110 QAction
* m_bpSetTempAction
;
111 QAction
* m_bpEnableAction
;
112 QAction
* m_editValueAction
;
113 QString m_lastDirectory
; /* the dir of the most recently opened file */
116 virtual bool queryClose();
117 QAction
* createAction(const QString
& text
, const char* icon
,
118 int shortcut
, const QObject
* receiver
,
119 const char* slot
, const char* name
);
120 QAction
* createAction(const QString
& text
,
121 int shortcut
, const QObject
* receiver
,
122 const char* slot
, const char* name
);
124 // the debugger proper
125 QString m_debuggerCmdStr
;
126 KDebugger
* m_debugger
;
127 QString m_transcriptFile
; /* where gdb dialog is logged */
130 * Starts to debug the specified program using the specified language
133 bool startDriver(const QString
& executable
, QString lang
);
134 DebuggerDriver
* driverFromLang(QString lang
);
136 * Derives a driver name from the contents of the named file.
138 QString
driverNameFromFile(const QString
& exe
);
141 QString m_outputTermCmdStr
;
142 QString m_outputTermKeepScript
;
143 QProcess
* m_outputTermProc
;
146 QString
createOutputWindow();
148 bool m_popForeground
; /* whether main wnd raises when prog stops */
149 int m_backTimeout
; /* when wnd goes back */
150 int m_tabWidth
; /* tab width in characters (can be 0) */
151 QString m_sourceFilter
;
152 QString m_headerFilter
;
153 void setTerminalCmd(const QString
& cmd
);
154 void setDebuggerCmdStr(const QString
& cmd
);
156 QDockWidget
* createDockWidget(const char* name
, const QString
& title
);
157 QDockWidget
* dockParent(QWidget
* w
);
158 bool isDockVisible(QWidget
* w
);
159 void makeDefaultLayout();
161 QString
makeSourceFilter();
163 // to avoid flicker when the status bar is updated,
164 // we store the last string that we put there
165 QPointer
<KAnimatedButton
> m_animation
;
166 QString m_lastActiveStatusText
;
170 QString m_statusActive
;
173 void setTabWidth(int tabWidth
);
176 virtual void updateUI();
177 virtual void updateLineItems();
179 void slotAddWatch(const QString
& text
);
180 void slotNewFileLoaded();
181 void slotNewStatusMsg();
182 void slotDebuggerStarting();
183 void slotToggleBreak(const QString
&, int, const DbgAddr
&, bool);
184 void slotEnaDisBreak(const QString
&, int, const DbgAddr
&);
185 void slotProgramStopped();
186 void slotBackTimer();
187 void slotRecentExec(const KUrl
& url
);
188 void slotLocalsPopup(const QPoint
& pt
);
189 void slotLocalsToWatch();
190 void slotEditValue();
195 void slotFileGlobalSettings();
196 void slotFileProgSettings();
197 void slotViewStatusbar();
198 void slotExecUntil();
199 void slotExecAttach();
201 void intoBackground();
202 void slotConfigureKeys();
205 #endif // DBGMAINWND_H