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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #240 on: September 12, 2010, 12:38:14 pm »
BTW: In fact I was always curious about that change and never applied it in my local copy. But I forgot to discuss this with you. Glad it's solved now. :-)
It seems I've made this change, because without it CB can't find the core plugins when starting it from inside C::B...
And I don't know why...
(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 #241 on: September 13, 2010, 09:24:23 pm »
It seems I've made this change, because without it CB can't find the core plugins when starting it from inside C::B...
And I don't know why...
Guess what: it's the same for me on Linux now. :-( but only Linux. Did you talk about Windows?
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #242 on: September 13, 2010, 11:04:52 pm »
It seems I've made this change, because without it CB can't find the core plugins when starting it from inside C::B...
And I don't know why...
Guess what: it's the same for me on Linux now. :-( but only Linux. Did you talk about Windows?
Works fine here if compiled from inside, does not work (and can not work) if compiled with automake-system, because the directory layout is different.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #243 on: September 13, 2010, 11:18:31 pm »
Jen: trunk or debuggers branch?
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #244 on: September 14, 2010, 12:19:51 am »
Jen: trunk or debuggers branch?
Both (tested with actual trunk and actual dbg-branch on debian 64-bit) !

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #245 on: September 14, 2010, 01:07:00 am »
The problem seems to happen only when you have a plugin in the ~/.codeblocks directory.
When I've removed the plugin, CB could find the core plugins.
Probably a chdir is executed somewhere and the relative path to the global plugins is not correct any more.
(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 #246 on: September 14, 2010, 01:29:18 am »
Next patch: http://smrt.is-a-geek.org/codeblocks/patches/dbg/dbg_refactor0016.6.patch

1. Fixed bug http://developer.berlios.de/bugs/?func=detailbug&bug_id=15209&group_id=5358
2. SyncEditor should work for files without extension (files from STL)
3. Made warnings in the loggers blue, it was needed for the debugger's debug log in the gdb_mi plugin
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #247 on: September 14, 2010, 08:33:24 am »
The problem seems to happen only when you have a plugin in the ~/.codeblocks directory.
When I've removed the plugin, CB could find the core plugins.
Probably a chdir is executed somewhere and the relative path to the global plugins is not correct any more.
Works also, even if I have a plugin in ~/.codeblocks:

Code
[...]
Scanning for plugins in /home/jens/.codeblocks/share/codeblocks/plugins
Loaded 1 plugins
Scanning for plugins in /home/jens/codeblocks-build/codeblocks.dbg/src/output/share/codeblocks/plugins
Loaded 11 plugins
[...]

debugger-branch without contrib-plugins.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #248 on: September 14, 2010, 09:21:53 am »
Jens: What plugin have you installed? Mine was freshly created by the project wizard...
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #249 on: September 14, 2010, 09:41:45 am »
Jens: What plugin have you installed? Mine was freshly created by the project wizard...
The attached one.

Offline cbexaminr

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #250 on: September 14, 2010, 07:12:33 pm »
c::b/gdb file/path issues

Please see:
http://forums.codeblocks.org/index.php/topic,13306.new.html#new

(separate thread chosen, since may be outstanding trunk/gdb issue, rather than branch specific.)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #251 on: September 14, 2010, 11:02:16 pm »
Next patch: http://smrt.is-a-geek.org/codeblocks/patches/dbg/dbg_refactor0017.3.patch

This patch is pretty experimental, so please review it carefully before application!!!

1. Added GetIsRunning method to ProjectManager, it is used to query the plugin that is running the project (running the application, debugging the application, etc)
2. Added SetIsRunning method to ProjectManager, it is used to set the plugin that is running/executing the project, it is set only if the GetIsRunning returns NULL
3. Modified the Compiler plugin to use the new methods (set and reset correctly the running flag, modified the toolbar/menu updateui functions)
4. Modified the Debugger plugin to use the new methods (set and reset correctly the running flag, modified the toolbar/menu updateui functions)
5. Changed a bit the accelerators for debugging (safe to apply this part of the patch)
6. Some formatting changes in cbDebuggerPlugin::RunNixConsole

I'm running C::B with this patch and I've fixed most of the problems, but I'm sure there are more...
Please test and provide feedback.

p.s. if this patch is accepted, some of the plugins should be modified to use the new methods (valgrind, cppcheck, cccc....)
(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 #252 on: September 15, 2010, 07:31:31 am »
Next patch: http://smrt.is-a-geek.org/codeblocks/patches/dbg/dbg_refactor0017.3.patch
[...]
This patch is pretty experimental, so please review it carefully before application!!!
[...]
p.s. if this patch is accepted, some of the plugins should be modified to use the new methods (valgrind, cppcheck, cccc....)
Ok, so I won't commit for now and test myself. Others (volunteers), please do the same

The question is: Who does the required changes for the other plugins? Do you already have a patch for this?
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 #253 on: September 15, 2010, 08:37:33 am »
No, I don't have a patch, but I could do it later...
(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 #254 on: September 15, 2010, 11:09:30 pm »
Next stable patch: http://smrt.is-a-geek.org/codeblocks/patches/dbg/dbg_refactor0016.7.patch

1. Fix the Native problem from here: http://forums.codeblocks.org/index.php/topic,13272.new.html
2. Added log message if the debuggee can't be found
3. Improved the accelerators for the debug menu

(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!]