Author Topic: Splitting debugger in two - specific debugger and common GUI  (Read 431534 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #150 on: January 04, 2010, 11:43:47 pm »
Done... and here is the next patch:

http://smrt.is-a-geek.org/codeblocks/dbg_refactor0008.patch

What is done:
1. Moved more methods to the base class - related to the project compilation and running the console on *nix
2. From now on there will be only one debugger toolbar.
3. Split Break and Stop buttons on the toolbar - need an icon for the break button
4. Watch improvements:
4.1. Added a Type column.
4.2. Now the user add watches by dragging string onto the watch window
5. Ensure the active thread is visible in the thread dialog
6. When the last debugger plugin is unloaded close all the debugger windows
7. Reimplemented the feature that allows the user to add breakpoints while the debuggee is running
8. Remember the last active debugger

I've introduce some bug related to the attaching to processes, which I've marked with FIXMEs and I hope I'll fix them soon.

PLEASE TEST, because I'm sure no one is running the debugger branch actively (or is shy to report problems). The branch before this was crashing annoyingly and badly when adding and removing breakpoints while the debuggee was running.

Also any feedback on the gdb/mi plugin is quite welcome.

Best regards....
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #152 on: January 05, 2010, 07:09:52 am »
The branch before this was crashing annoyingly and badly when adding and removing breakpoints while the debuggee was running.
I knew but as it was easy to fix I though you had handled that already...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #153 on: January 05, 2010, 08:45:01 am »
http://smrt.is-a-geek.org/codeblocks/dbg_refactor0008.patch
Hmmm... with this patch applied I cannot debug C::B anymore.
I am placing a BP in "MainFrame* CodeBlocksApp::InitFrame()" (src/app.cpp) and hit "debug".
this is what I see in the debug log:
> break "C:/Devel/CodeBlocks/src/src/app.cpp:401"
Breakpoint 1 at 0x4026ab: file C:\Devel\CodeBlocks\src\src\app.cpp, line 401.
>>>>>>cb_gdb:
> run
pid=3060 tid=5908 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\WINDOWS\system32\ws2help.dll" at 0x71a00000.
ContinueDebugEvent (cpid=3060, ctid=5908, DBG_CONTINUE);
gdb: kernel event for pid=3060 tid=5908 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\Devel\CodeBlocks\src\devel\codeblocks.dll" at 0xb10000.
ContinueDebugEvent (cpid=3060, ctid=5908, DBG_CONTINUE);
gdb: kernel event for pid=3060 tid=5908 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\Devel\CodeBlocks\src\devel\wxpropgrid.dll" at 0x6e440000.
ContinueDebugEvent (cpid=3060, ctid=5908, DBG_CONTINUE);
gdb: kernel event for pid=3060 tid=5908 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\Devel\CodeBlocks\src\devel\wxscintilla.dll" at 0x6c980000.
ContinueDebugEvent (cpid=3060, ctid=5908, DBG_CONTINUE);
gdb: kernel event for pid=3060 tid=5908 code=EXCEPTION_DEBUG_EVENT)

Then nothing happens and I can only stop the debugger (only "break" and "stop" is available, but "break" does nothing).

when I hit "stop" this is in the debug log:
Exception condition detected on fd 0
error detected on stdin
ContinueDebugEvent (cpid=3060, ctid=5908, DBG_CONTINUE);
ContinueDebugEvent (cpid=3060, ctid=4612, DBG_CONTINUE);
ContinueDebugEvent (cpid=3060, ctid=5908, DBG_CONTINUE);
ContinueDebugEvent (cpid=3060, ctid=4612, DBG_CONTINUE);
gdb: windows_close, inferior_ptid=3060

Any hints???
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #154 on: January 05, 2010, 09:44:03 am »
Nargh... just forget about this. I still had the patch of yours applied concerning PipedProcess. This has bitten me literally the first time now. I've removed this for now and forever and suddenly all works again (including debugging wx apps). It shows that this patch is not working reliable and we'd better not apply it.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #155 on: January 19, 2010, 10:37:20 am »
Can someone sync the debugger branch with trunk?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #156 on: January 19, 2010, 02:04:03 pm »
Can someone sync the debugger branch with trunk?
Should be me then... right? Be a little patient...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #157 on: January 19, 2010, 08:07:21 pm »
Seems the auto-fu is broken...
Code
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.in: installing `./install-sh'
configure.in: installing `./missing'
src/base/tinyxml/Makefile.am: installing `./depcomp'
configure.in:7: installing `./config.guess'
configure.in:7: installing `./config.sub'
configure.in:209: required file `src/plugins/scriptedwizard/resources/sharedlib/files/Makefile.in' not found


Also you have not fully applied the previous patch... here is what's left: http://smrt.is-a-geek.org/codeblocks/dbg_refactor0010.patch
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #158 on: January 19, 2010, 08:27:34 pm »
Seems the auto-fu is broken...
Nope... I know why. :-/

Seems I have to finally change my branches checkouts and scripts... :-(
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #159 on: January 19, 2010, 09:10:42 pm »
Seems I have to finally change my branches checkouts and scripts... :-(
...try again...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #160 on: January 19, 2010, 10:27:24 pm »
Both are fixed, thanks
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #161 on: January 21, 2010, 09:57:11 am »
Morten: Does the new break button work for you on windows?
Here it is broken with wx apps :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #162 on: February 14, 2010, 09:33:26 pm »
Morten can you update the wxPropGrid, to latest svn revision, if you have no time you can give me the steps to update it in my local copy?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #163 on: February 16, 2010, 12:10:50 am »
Thank you Morten....

But the build using the autofu system seems to be broken:
Code
.libs/cbexception.o: In function `cbException':
/usr/include/wx-2.8/wx/thread.h:554: multiple definition of `cbException::cbException(wxString const&, wxString const&, int)'
.libs/cbexception.o:/usr/include/wx-2.8/wx/thread.h:554: first defined here
.libs/cbexception.o: In function `cbException':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:24: multiple definition of `cbException::cbException(wxString const&, wxString const&, int)'
.libs/cbexception.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:24: first defined here
.libs/cbexception.o: In function `cbException::ShowErrorMessage(bool)':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:32: multiple definition of `cbException::ShowErrorMessage(bool)'
.libs/cbexception.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:32: first defined here
.libs/cbexception.o: In function `~cbException':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:27: multiple definition of `cbException::~cbException()'
.libs/cbexception.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:27: first defined here
.libs/cbexception.o: In function `~cbException':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:27: multiple definition of `cbException::~cbException()'
.libs/cbexception.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:27: first defined here
.libs/cbexception.o: In function `~cbException':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:27: multiple definition of `cbException::~cbException()'
.libs/cbexception.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/cbexception.cpp:27: first defined here
.libs/editor_hooks.o: In function `EditorHooks::HasRegisteredHooks()':
/usr/include/wx-2.8/wx/thread.h:554: multiple definition of `EditorHooks::HasRegisteredHooks()'
.libs/editor_hooks.o:/usr/include/wx-2.8/wx/thread.h:554: first defined here
.libs/editor_hooks.o: In function `EditorHooks::CallHooks(cbEditor*, wxScintillaEvent&)':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/editor_hooks.cpp:55: multiple definition of `EditorHooks::CallHooks(cbEditor*, wxScintillaEvent&)'
.libs/editor_hooks.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/editor_hooks.cpp:55: first defined here
.libs/editor_hooks.o: In function `EditorHooks::UnregisterHook(int, bool)':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/editor_hooks.cpp:33: multiple definition of `EditorHooks::UnregisterHook(int, bool)'
.libs/editor_hooks.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/editor_hooks.cpp:33: first defined here
.libs/editor_hooks.o: In function `EditorHooks::RegisterHook(EditorHooks::HookFunctorBase*)':
/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/editor_hooks.cpp:22: multiple definition of `EditorHooks::RegisterHook(EditorHooks::HookFunctorBase*)'
.libs/editor_hooks.o:/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk/editor_hooks.cpp:22: first defined here
.libs/nullptr.o:(.bss+0x0): multiple definition of `nullptr'
.libs/nullptr.o:(.bss+0x0): first defined here
collect2: ld returned 1 exit status
make[3]: *** [libcodeblocks.la] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r20/work/codeblocks-9999/src'

Building from C::B seems to work

HEHE: post 555, go go subaru rally team from the 90's
« Last Edit: February 16, 2010, 12:12:23 am by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #164 on: February 16, 2010, 06:29:12 am »
But the build using the autofu system seems to be broken:
Weired. But I would need to see the full log to clarify. I can try myself but in a VM it takes ages for the automake to complete, so I usually don't and leave that to somebody using Linux natively.

BTW (just saw that I mssed that somehow... :oops:):
Morten: Does the new break button work for you on windows?
Not sure what you mean with "new" (I see the buttons as they have always been), but yes, "break" works, even in wx apps.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ