Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Splitting debugger in two - specific debugger and common GUI
stahta01:
Patch needed on branch wxpropgrid_debugger under windows without Precompiled Headers enabled.
Tim S.
SDK folder only patch
--- Code: ---Index: src/sdk/examinememorydlg.cpp
===================================================================
--- src/sdk/examinememorydlg.cpp (revision 5882)
+++ src/sdk/examinememorydlg.cpp (working copy)
@@ -7,7 +7,11 @@
* $HeadURL$
*/
-#include <sdk.h>
+#include "sdk_precomp.h"
+#ifndef CB_PRECOMP
+ #include "cbplugin.h"
+#endif
+
#include "examinememorydlg.h"
#include <wx/intl.h>
#include <wx/xrc/xmlres.h>
Index: src/sdk/debuggermanager.cpp
===================================================================
--- src/sdk/debuggermanager.cpp (revision 5882)
+++ src/sdk/debuggermanager.cpp (working copy)
@@ -8,7 +8,26 @@
*/
#include "sdk_precomp.h"
+#ifndef CB_PRECOMP
+ #include <wx/artprov.h>
+ #include <wx/bmpbuttn.h>
+ #include <wx/combobox.h>
+ #include <wx/filedlg.h>
+ #include <wx/frame.h>
+ #include <wx/menu.h>
+ #include <wx/sizer.h>
+ #include <wx/stattext.h>
+ #include "cbeditor.h"
+ #include "cbexception.h"
+ #include "cbplugin.h"
+ #include "cbproject.h"
+ #include "configmanager.h"
+ #include "editormanager.h"
+ #include "logmanager.h"
+ #include "projectmanager.h"
+#endif
+
#include <algorithm>
#include <wx/toolbar.h>
Index: src/sdk/cbplugin.cpp
===================================================================
--- src/sdk/cbplugin.cpp (revision 5882)
+++ src/sdk/cbplugin.cpp (working copy)
@@ -19,6 +19,9 @@
#include "projectbuildtarget.h"
#include "cbproject.h"
#include "logmanager.h"
+ #include "editormanager.h"
+ #include "cbeditor.h"
+ #include "projectmanager.h"
#endif
#include <wx/toolbar.h>
Index: src/sdk/backtracedlg.cpp
===================================================================
--- src/sdk/backtracedlg.cpp (revision 5882)
+++ src/sdk/backtracedlg.cpp (working copy)
@@ -7,13 +7,23 @@
* $HeadURL$
*/
#include "sdk_precomp.h"
+#ifndef CB_PRECOMP
+ #include <wx/filedlg.h>
+ #include <wx/listctrl.h>
+ #include <wx/menu.h>
+ #include <wx/sizer.h>
+ #include <wx/txtstrm.h>
+ #include <wx/wfstream.h>
-#include "backtracedlg.h"
+ #include "cbplugin.h"
+ #include "configmanager.h"
+#endif
#include <wx/clipbrd.h>
-#include <wx/listctrl.h>
#include "filefilters.h"
+#include "backtracedlg.h"
+
namespace
{
const int idList = wxNewId();
Index: src/sdk/editbreakpointdlg.cpp
===================================================================
--- src/sdk/editbreakpointdlg.cpp (revision 5882)
+++ src/sdk/editbreakpointdlg.cpp (working copy)
@@ -8,7 +8,12 @@
*/
#include "sdk_precomp.h"
+#ifndef CB_PRECOMP
+ #include <wx/xrc/xmlres.h>
+ #include "debuggermanager.h"
+#endif
+
#include "editbreakpointdlg.h"
#include <wx/intl.h>
#include <wx/xrc/xmlres.h>
Index: src/sdk/breakpointsdlg.cpp
===================================================================
--- src/sdk/breakpointsdlg.cpp (revision 5882)
+++ src/sdk/breakpointsdlg.cpp (working copy)
@@ -7,15 +7,18 @@
* $HeadURL$
*/
+#include <set>
+
#include "sdk_precomp.h"
-#include "breakpointsdlg.h"
-
#ifndef CB_PRECOMP
# include "globals.h"
# include "manager.h"
# include "editormanager.h"
# include "cbeditor.h"
+# include "cbplugin.h"
+# include "debuggermanager.h"
+
# include <wx/button.h>
# include <wx/checkbox.h>
# include <wx/intl.h>
@@ -24,10 +27,13 @@
# include <wx/menu.h>
# include <wx/textctrl.h>
# include <wx/spinctrl.h>
+# include <wx/sizer.h>
#endif
#include "editbreakpointdlg.h"
+#include "breakpointsdlg.h"
+
namespace
{
const int idList = wxNewId();
Index: src/sdk/debuggermenu.cpp
===================================================================
--- src/sdk/debuggermenu.cpp (revision 5882)
+++ src/sdk/debuggermenu.cpp (working copy)
@@ -7,7 +7,15 @@
* $HeadURL$
*/
#include "sdk_precomp.h"
+#ifndef CB_PRECOMP
+ #include <wx/xrc/xmlres.h>
+ #include "cbeditor.h"
+ #include "cbproject.h"
+ #include "editormanager.h"
+ #include "projectmanager.h"
+#endif
+
#include "debuggermenu.h"
#include <algorithm>
Index: src/sdk/threadsdlg.cpp
===================================================================
--- src/sdk/threadsdlg.cpp (revision 5882)
+++ src/sdk/threadsdlg.cpp (working copy)
@@ -7,16 +7,17 @@
* $HeadURL$
*/
-#include "threadsdlg.h"
+#include "sdk_precomp.h"
+#ifndef CB_PRECOMP
+ #include <wx/listctrl.h>
+ #include <wx/menu.h>
+ #include <wx/sizer.h>
-#include "sdk.h"
+ #include "cbplugin.h"
+#endif
-#include <wx/listctrl.h>
-#include <wx/menu.h>
-#include <wx/sizer.h>
+#include "threadsdlg.h"
-
-
namespace
{
const int idList = wxNewId();
Index: src/sdk/watchesdlg.cpp
===================================================================
--- src/sdk/watchesdlg.cpp (revision 5882)
+++ src/sdk/watchesdlg.cpp (working copy)
@@ -7,11 +7,20 @@
* $HeadURL$
*/
-#include <sdk.h>
-#include "watchesdlg.h"
+#include "sdk_precomp.h"
+#ifndef CB_PRECOMP
+ #include <wx/menu.h>
+ #include <wx/sizer.h>
+ #include "cbplugin.h"
+ #include "logmanager.h"
+ #include "scrollingdialog.h"
+#endif
+
#include <wx/propgrid/propgrid.h>
+#include "watchesdlg.h"
+
namespace
{
const int idGrid = wxNewId();
Index: src/include/debuggermenu.h
===================================================================
--- src/include/debuggermenu.h (revision 5882)
+++ src/include/debuggermenu.h (working copy)
@@ -6,7 +6,10 @@
#ifndef X_DEBUGGER_MENU_H
#define X_DEBUGGER_MENU_H
+#include <wx/event.h>
+
class cbDebuggerPlugin;
+class wxToolBar;
class DebuggerMenuHandler : public wxEvtHandler
{
Index: src/include/breakpointsdlg.h
===================================================================
--- src/include/breakpointsdlg.h (revision 5882)
+++ src/include/breakpointsdlg.h (working copy)
@@ -6,8 +6,13 @@
#ifndef BREAKPOINTSDLG_H
#define BREAKPOINTSDLG_H
+#include <vector>
+
#include <wx/panel.h>
+class cbBreakpoint;
+class CodeBlocksEvent;
+class cbDebuggerPlugin;
class wxCommandEvent;
class wxListCtrl;
class wxListEvent;
--- End code ---
stahta01:
Patch for src and debug plugin headers needed for NON precompiled under Windows XP.
Note: I redid the headers alot in debuggergdb.cpp in order to precompilied header sdk.h better.
Tim S.
--- Code: ---Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp (revision 5883)
+++ src/plugins/debuggergdb/debuggergdb.cpp (working copy)
@@ -7,57 +7,59 @@
* $HeadURL$
*/
+
#include <sdk.h>
-#include <wx/txtstrm.h>
-#include <wx/regex.h>
-#include "scrollingdialog.h"
-#include <wx/msgdlg.h>
-#include <wx/tokenzr.h>
+#include <algorithm> // std::remove_if
+#ifndef CB_PRECOMP
+ #include <wx/frame.h> // GetMenuBar
+ #include <wx/msgdlg.h>
+ #include <wx/regex.h>
+ #include <wx/txtstrm.h>
-#include <manager.h>
-#include <configmanager.h>
-#include <logmanager.h>
-#include <projectmanager.h>
-#include <pluginmanager.h>
-#include <editormanager.h>
-#include <macrosmanager.h>
-#include <cbeditor.h>
-#include <projectbuildtarget.h>
-#include <sdk_events.h>
-#include <editarraystringdlg.h>
-#include <compilerfactory.h>
-#include <projectloader_hooks.h>
-#include <xtra_res.h>
+ #include <cbeditor.h>
+ #include <cbproject.h>
+ #include <compilerfactory.h>
+ #include <configmanager.h>
+ #include <editormanager.h>
+ #include <globals.h>
+ #include <logmanager.h>
+ #include <macrosmanager.h>
+ #include <manager.h>
+ #include <pluginmanager.h>
+ #include <projectbuildtarget.h>
+ #include <projectmanager.h>
+ #include <scrollingdialog.h>
+ #include <sdk_events.h>
+ #include <xtra_res.h>
+#endif
+#ifdef __WXMSW__
+ #include <winbase.h>
+#else
+ int GetShortPathName(const void*, void*, int){/* bogus */ return 0; };
+#endif
+
#include <annoyingdialog.h>
#include <backtracedlg.h>
#include <breakpointsdlg.h>
+#include <cbstyledtextctrl.h>
#include <disassemblydlg.h>
+#include <editarraystringdlg.h>
#include <editbreakpointdlg.h>
#include <examinememorydlg.h>
+#include <projectloader_hooks.h>
#include <threadsdlg.h>
#include <watchesdlg.h>
-#include "cbstyledtextctrl.h"
#include "databreakpointdlg.h"
#include "debuggerdriver.h"
-#include "debuggergdb.h"
#include "debuggeroptionsdlg.h"
#include "debuggeroptionsprjdlg.h"
#include "editwatchesdlg.h"
#include "editwatchdlg.h"
-#include "globals.h"
-#ifdef __WXMSW__
- #include <winbase.h>
-#else
- int GetShortPathName(const void*, void*, int){/* bogus */ return 0; };
-#endif
+#include "debuggergdb.h"
-#ifndef CB_PRECOMP
- #include <wx/frame.h> // GetMenuBar
- #include "cbproject.h"
-#endif
#if defined(__APPLE__) && defined(__MACH__)
#define LIBRARY_ENVVAR _T("DYLD_LIBRARY_PATH")
Index: src/plugins/debuggergdb/gdb_commands.h
===================================================================
--- src/plugins/debuggergdb/gdb_commands.h (revision 5883)
+++ src/plugins/debuggergdb/gdb_commands.h (working copy)
@@ -25,6 +25,7 @@
#include <scriptingmanager.h>
#include <sqplus.h>
#include <infowindow.h>
+#include "logmanager.h"
// FIXME (obfuscated#): remove this include
#include "debuggertree.h"
Index: src/plugins/debuggergdb/debugger_defs.h
===================================================================
--- src/plugins/debuggergdb/debugger_defs.h (revision 5883)
+++ src/plugins/debuggergdb/debugger_defs.h (working copy)
@@ -11,6 +11,8 @@
#include <vector>
#include <tr1/memory>
+#include "debuggermanager.h"
+
class DebuggerDriver;
class DebuggerTree;
Index: src/src/main.h
===================================================================
--- src/src/main.h (revision 5883)
+++ src/src/main.h (working copy)
@@ -19,6 +19,7 @@
#include "cbplugin.h"
#include "sdk_events.h"
#include "scripting/bindings/sc_base_types.h"
+#include "scrollingdialog.h"
WX_DECLARE_HASH_MAP(int, wxString, wxIntegerHash, wxIntegerEqual, PluginIDsMap);
WX_DECLARE_HASH_MAP(cbPlugin*, wxToolBar*, wxPointerHash, wxPointerEqual, PluginToolbarsMap);
--- End code ---
oBFusCATed:
I want to split the break-stop button in two different buttons - break and stop.
It is very annoying that when the user wants to stop the debugging he/she have to click the button twice.
This is not a problem. The real problem is that on the first click the cursor is move at the location the program was at the click.
This location can be totally different than the location the user is looking at.
For example while debugging codeblocks 99% of the time on the first click the app.cpp file is opened and I have to close it, which is very annoying.
Anyone against that change? I can make it configurable, of course?
And what icon should I use? Can I find the full icon set the CB is using?
ollydbg:
--- Quote from: oBFusCATed on October 28, 2009, 09:19:12 pm ---For example while debugging codeblocks 99% of the time on the first click the app.cpp file is opened and I have to close it, which is very annoying.
--- End quote ---
Yes, it is annoying. But I have the difference experience, not the app.cpp opened. A file named "new_allocator" (as far I can remember, now, I have no C::B at hand) always opened. At this case, I still don't know where exactly my program halt. :(
Pecan:
--- Quote from: ollydbg on October 29, 2009, 01:57:13 am ---
--- Quote from: oBFusCATed on October 28, 2009, 09:19:12 pm ---For example while debugging codeblocks 99% of the time on the first click the app.cpp file is opened and I have to close it, which is very annoying.
--- End quote ---
Yes, it is annoying. But I have the difference experience, not the app.cpp opened. A file named "new_allocator" (as far I can remember, now, I have no C::B at hand) always opened. At this case, I still don't know where exactly my program halt. :(
--- End quote ---
Untick "Catch C++ exceptions" in debugger settings to avoid this problem.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version