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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #195 on: March 15, 2010, 11:02:43 am »
Morten: Can you update wxPropGrid?
(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 #196 on: March 15, 2010, 08:34:15 pm »
Morten: Can you update wxPropGrid?
I can't atm... I am not on a PC with C::B for some time (not too long... no worries...). but I keep it in mind.
BTW: The icon looks very good! :-)
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 sbezgodov

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #197 on: March 18, 2010, 02:05:17 pm »
p.s. the icons look very bad with a darker theme.

This arises from lacking alpha channel in png icons. I don't know if it possible to convert all images automatically with gimp or any other software.

If you want to add additional button to pause debugger, it will be better if Start, Continue and Pause commands can be executed by identical keyboard combination and toolbar button. It is very useful, i think. There is wxToolbar::SetToolNormalBitmap method to change button icon, but i'm not clear about disabled icon.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #198 on: March 18, 2010, 02:14:03 pm »
This arises from lacking alpha channel in png icons. I don't know if it possible to convert all images automatically with gimp or any other software.
There is no automatic way to fix them and they have alpha channel, but aren't cropped carefully.

If you want to add additional button to pause debugger, it will be better if Start, Continue and Pause commands can be executed by identical keyboard combination and toolbar button. It is very useful, i think. There is wxToolbar::SetToolNormalBitmap method to change button icon, but i'm not clear about disabled icon.
No sure what you're talking about, can you explain better?
(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 #199 on: March 18, 2010, 04:32:23 pm »
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 #200 on: March 18, 2010, 05:58:49 pm »
Thanks, I'll test as I get home.
(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 sbezgodov

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #201 on: March 18, 2010, 07:48:16 pm »
No sure what you're talking about, can you explain better?

Debugger has commands. Would be great if Start and Continue commands has same keyboard key, e.g. F5 and menu entry.
Example: I start debugging by pressing F5 (now F8). My program reaches breakpoint. Then again press F5 (now Ctrl-F7) and my program continues.
Keybinder plugin doesn't allow to bind two commands to one key.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #202 on: March 26, 2010, 12:31:12 pm »
Morten: Can you do another wxPropGrid update?  :lol: 8)
(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 #203 on: March 26, 2010, 08:46:38 pm »
Morten: Can you do another wxPropGrid update?  :lol: 8)
What about setting up an automatic email that reminds me every week or so?! :lol:

Seriously: It'll need some time, I am without an up-to-date C::B at the moment... so it'll have to wait until Monday, most likely.

Let me take the answer to tell you that the new framework still works just fine for me. I was debugging quite a lot recently (including th new "pause" button ;-)). No issues so far.... anything I should try explicitly next time?
« Last Edit: March 26, 2010, 08:48:13 pm by MortenMacFly »
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 #204 on: April 06, 2010, 09:17:26 am »
uf, I've missed this last post :(

There were some linux specific bugs in wxPropGrid.

What you should look for:
1. Rendering/refreshing bugs in the watches window when:
* opening/closing a watch
* deleting watch with the context menu and keyboard (delete key)
* renaming a watch with the context menu and keyboard (insert key)
2. Does highlighting the changes when stepping through the code works correctly.

I'll post a patch that has some small fixes in the watches window...
(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 #205 on: April 06, 2010, 09:39:08 pm »
Here is the next patch: http://smrt.is-a-geek.org/codeblocks/dbg_refactor0013.patch

1. Run host it terminal
2. Disable the debugger tooltip, when the users starts a drag in the editor (change wxScintilla)
3. Fixed the style in the watchesdlg.cpp, fixed a bug when deleting a watch (can't remember exactly what)
4. Close the console when the user unloads the project/closes C::B, while the debugger is running

Please give me some feadback on 1., because I've changed parts of C::B that I'm not very familiar with...
(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 cbexaminr

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #206 on: April 14, 2010, 06:21:37 pm »
Have:
windows xp sp2
codeblocks 8.02
codeblocks trunk svn R6203 (built with codeblocks 8.02)
wxwidgets from wxpack distribution

svn branch wxpropgrid_debugger  (fetched today 2010/04/14)

attempted to build branch with local trunk built version (figured a good test), and the files reported
as missing  [edit: for contribplugins.workspace] do seem to absent from the sub-directory locations referenced, although a number of them seem to appear in the wxsmith/wxwidgets sub-directories... [edit: somehow I mis-looked - the files _do_ seem to be present, so...]

***Have I done something wrong or is the branch currently incorrect/incomplete? [Are switches for include specs somehow missing

(I just tried to skim through all pages of thread, but didn't spot anything else I thought was needed.)

last part of build messages output:
||=== wxSmith - Aui, Windows ===|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|22|error: properties/wxsproperties.h: No such file or directory|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|24|error: wxwidgets/wxsparent.h: No such file or directory|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|25|error: wxwidgets/wxsflags.h: No such file or directory|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|22|error: wxwidgets/wxscontainer.h: No such file or directory|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManagerParentQP.h|35|error: wxsadvqppchild.h: No such file or directory|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.cpp|22|error: wxwidgets/wxsitemresdata.h: No such file or directory|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|31|error: expected class-name before '{' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|58|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|58|error: 'wxPropertyGridManager' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|58|error: 'wxPGId' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|59|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|59|error: 'wxPropertyGridManager' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|59|error: 'wxPGId' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|60|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|60|error: 'wxPropertyGridManager' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|60|error: 'wxPGId' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|61|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|61|error: 'TiXmlElement' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|62|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|62|error: 'TiXmlElement' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|63|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|63|error: 'wxsPropertyStream' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|64|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|64|error: 'wxsPropertyStream' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|89|error: expected class-name before '{' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|105|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|105|error: 'TiXmlElement' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|106|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|106|error: 'TiXmlElement' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|107|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|107|error: 'wxsPropertyStream' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|108|error: 'wxsPropertyContainer' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiPaneInfoProperty.h|108|error: 'wxsPropertyStream' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|26|error: expected class-name before '{' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|30|error: expected ')' before '*' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|36|error: 'wxsItem' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|37|error: 'wxsParent' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|38|error: ISO C++ forbids declaration of 'wxsPropertyContainer' with no type|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|38|error: 'wxsPropertyContainer' declared as a 'virtual' field|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|38|error: expected ';' before '*' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|43|error: 'wxsItem' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|44|error: 'wxsItem' has not been declared|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|48|error: ISO C++ forbids declaration of 'wxsItem' with no type|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\..\wxAuiToolBar\wxsAuiToolBar.h|48|error: expected ';' before '*' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|29|error: 'wxsFlags' is not a namespace-name|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|29|error: expected namespace-name before ';' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|33|error: expected class-name before '{' token|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|58|error: 'wxsPositionData' does not name a type|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|59|error: 'wxsSizeData' does not name a type|
E:\dev\codeblock_svn\wxpropgrid_debugger\src\plugins\contrib\wxSmithAui\wxAuiManager\wxsAuiManager.h|98|error: 'wxsCoderContext' has not been declared|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 118 warnings ===|

« Last Edit: April 14, 2010, 06:26:21 pm by cbexaminr »

Offline cbexaminr

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #207 on: April 26, 2010, 09:50:32 pm »
FWIW, I got around the issue of previous post by copying some portion of the contrib items to/from the trunk path.  It appears that I renamed the *wxsmith* items from the wspropgrid branch out of the way, and copied their replacements from the current trunk release candidate.  After that I seemed to get a complete plugins contrib build without errors.  (I waited too long to come back and add this note, but I currently think that's what I did.)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #208 on: May 06, 2010, 05:21:35 pm »
I've just found a problem in the shutdown procedure of C::B

Code
void MainFrame::OnApplicationClose(wxCloseEvent& event)
{
.......
    if (!Manager::IsBatchBuild())
    {
        m_pInfoPane->Destroy();
        m_pInfoPane = 0L;
    }

    Manager::Shutdown(); // Shutdown() is not Free(), Manager is automatically destroyed at exit


And the problem is: the log & info notebook is destroyed (all child logger controls too) before all plugins are destroyed/unloaded.
The result is that the logger system has pointers to destroyed objects => we get a crash every time such a pointer is used (for example in TextCtrlLogger::Append).

How should this problem be fixed?
1. Move the notebook's destruction below the Manager::Shutdown(); call
2. Add a method to the LogManager -> MarkAsDestroyed, which does  "control = NULL"
3. Something else
(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 #209 on: May 28, 2010, 01:19:07 am »
Next patch is ready:
http://smrt.is-a-geek.org/codeblocks/dbg_refactor0014.2.patch

1. Fix watch parsing (GtkStyle, wxAuiTabArt)
1.1. Now prints an error message in the watches window if the parsing fails. If you see this string please report it as a bug
1.2. I've made an unittest project for the parser (it uses unittest++) if anyone is interested I can provide it
2. Made the "add watch" menu option to use the selection if there is such
3. SyncEditor now shows better error messages (code is refactored)
3.1. Clicking on a frame that points to a missing file now shows an info window with the error message
4. Made cbDebuggerPlugin::ShowLog to check if the Debugger's debug log is visible, if it is the method doesn't switch to the "Debugger" log tab (added some code in the log manager)
5. Attach/Detach from process was reimplemented
5.1. Added a menu on the stop toolbar button with two options: "detach from process" and "kill debuggee"
6. If a project fails to build a message is shown asking the user if he/she wants to debug the program (useful when a unittest project fails in the tests)
7. Don't show the editor tooltip if the mouse is outside the current active editor
7.1. Don't show the debug value tooltip if the user has moved the mouse
8. Improvements for the watches window
8.1. Made the popup window for value of a watch to be some kind of a singleton
8.2. Made the popup window to refresh when stepping through the code
8.3. Made the button that shows the window to have a tooltip. This tooltip should explain the advanced features of the button
9. Fixed a bug  - "closing C::B while debugging a project produces wrong message"

Please test...
(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!]