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 <kxmlguiwindow.h>
16 class KAnimatedButton
;
17 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
);
67 WinStack
* m_filesWindow
;
68 QListWidget
* m_btWindow
;
69 ExprWnd
* m_localVariables
;
70 WatchWindow
* m_watches
;
71 RegisterView
* m_registers
;
72 BreakpointTable
* m_bpTable
;
73 TTYWindow
* m_ttyWindow
;
74 ThreadList
* m_threads
;
75 MemoryWindow
* m_memoryWindow
;
79 // recent execs in File menu
80 QAction
* m_closeAction
;
81 QAction
* m_reloadAction
;
82 QAction
* m_fileExecAction
;
83 KRecentFilesAction
* m_recentExecAction
;
84 QAction
* m_coreDumpAction
;
85 QAction
* m_settingsAction
;
86 QAction
* m_findAction
;
87 QAction
* m_btWindowAction
;
88 QAction
* m_localVariablesAction
;
89 QAction
* m_watchesAction
;
90 QAction
* m_registersAction
;
91 QAction
* m_bpTableAction
;
92 QAction
* m_ttyWindowAction
;
93 QAction
* m_threadsAction
;
94 QAction
* m_memoryWindowAction
;
96 QAction
* m_stepIntoAction
;
97 QAction
* m_stepOverAction
;
98 QAction
* m_stepOutAction
;
99 QAction
* m_toCursorAction
;
100 QAction
* m_stepIntoIAction
;
101 QAction
* m_stepOverIAction
;
102 QAction
* m_execMovePCAction
;
103 QAction
* m_breakAction
;
104 QAction
* m_killAction
;
105 QAction
* m_restartAction
;
106 QAction
* m_attachAction
;
107 QAction
* m_argumentsAction
;
108 QAction
* m_bpSetAction
;
109 QAction
* m_bpSetTempAction
;
110 QAction
* m_bpEnableAction
;
111 QAction
* m_editValueAction
;
112 QString m_lastDirectory
; /* the dir of the most recently opened file */
115 virtual bool queryClose();
116 QAction
* createAction(const QString
& text
, const char* icon
,
117 int shortcut
, const QObject
* receiver
,
118 const char* slot
, const char* name
);
119 QAction
* createAction(const QString
& text
,
120 int shortcut
, const QObject
* receiver
,
121 const char* slot
, const char* name
);
123 // the debugger proper
124 QString m_debuggerCmdStr
;
125 KDebugger
* m_debugger
;
126 QString m_transcriptFile
; /* where gdb dialog is logged */
129 * Starts to debug the specified program using the specified language
132 bool startDriver(const QString
& executable
, QString lang
);
133 DebuggerDriver
* driverFromLang(QString lang
);
135 * Derives a driver name from the contents of the named file.
137 QString
driverNameFromFile(const QString
& exe
);
140 QString m_outputTermCmdStr
;
141 QString m_outputTermKeepScript
;
142 K3Process
* m_outputTermProc
;
145 QString
createOutputWindow();
146 void shutdownTermWindow();
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 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 slotTermEmuExited();
186 void slotProgramStopped();
187 void slotBackTimer();
188 void slotRecentExec(const KUrl
& url
);
189 void slotLocalsPopup(Q3ListViewItem
*, const QPoint
& pt
);
190 void slotLocalsToWatch();
191 void slotEditValue();
196 void slotFileGlobalSettings();
197 void slotFileProgSettings();
198 void slotViewStatusbar();
199 void slotExecUntil();
200 void slotExecAttach();
202 void intoBackground();
203 void slotConfigureKeys();
206 #endif // DBGMAINWND_H