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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #450 on: March 03, 2011, 03:52:44 pm »
I've tried gdb 6.8 on windows and it works, so I've removed it.
Older GDB's won't work and are unsupported anyway... (don't remember the reasons 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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #451 on: March 03, 2011, 04:01:13 pm »
not sure why you are setting them to empty strings...
Because I don't generate default debugger configurations to match all the compilers.
And for the default debugger in every compiler I reuse the old field for the debugger's executable.
I can add new field for the compiler's default config, so the old one won't be messed up. The messing up happens only when the default.conf is created, if you have something there and you don't change '--- invalid configuration---' to something valid, the value is preserved.
So if you have new C::B and old C::B, when you switch to old C::B the debugger executable will be correctly set.
(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 #452 on: March 04, 2011, 06:42:05 pm »
Patch for the unix test project

Code
Index: src/plugins/debuggergdb/debuggergdb_test-unix.cbp
===================================================================
--- src/plugins/debuggergdb/debuggergdb_test-unix.cbp (revision 7038)
+++ src/plugins/debuggergdb/debuggergdb_test-unix.cbp (working copy)
@@ -31,7 +31,8 @@
  <Add directory="$(#unittest_pp)/src" />
  <Add directory="." />
  <Add directory="../../include" />
- <Add directory="../../devel" />
+ <Add directory="../../include/scripting/include" />
+ <Add directory="../../include/scripting/sqplus" />
  </Compiler>
  <Linker>
  <Add option="`wx-config --libs`" />
@@ -46,6 +47,8 @@
  </ExtraCommands>
  <Unit filename="debugger_defs.cpp" />
  <Unit filename="debugger_defs.h" />
+ <Unit filename="debuggergdb_test_backtrace.cpp" />
+ <Unit filename="debuggergdb_test_common.h" />
  <Unit filename="debuggergdb_test_main.cpp" />
  <Unit filename="debuggergdb_test_parser.cpp" />
  <Unit filename="debuggeroptionsprjdlg.h" />

Edit: also a patch to disable the compilation of the resource file:
Code
Index: src/CodeBlocks-unix.cbp
===================================================================
--- src/CodeBlocks-unix.cbp (revision 7038)
+++ src/CodeBlocks-unix.cbp (working copy)
@@ -3286,6 +3304,8 @@
  </Unit>
  <Unit filename="src/resources/resources.rc">
  <Option compilerVar="WINDRES" />
+ <Option compile="0" />
+ <Option link="0" />
  <Option target="src" />
  </Unit>
  <Unit filename="src/resources/scripting_settings.xrc">
(There is a chance it won't apply)


Edit2: Here is the fixed 20.0.patch: http://smrt.is-a-geek.org/codeblocks/patches/dbg/dbg_refactor0020.1.patch
« Last Edit: March 04, 2011, 06:49:10 pm 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 xhpohanka

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #453 on: March 16, 2011, 11:51:05 am »
Hello,
thank you for the hard work on debugger in CB.
I have one question regarding the automatic dereferencing of the watches -> I mean will there be a feature, which allows to automatically expand watched pointer to a struct?
I use CB on windows with mingw32 gdb.

regards, Jan

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #454 on: March 16, 2011, 12:48:06 pm »
No (99% probability), with the current plugin.
If the gdb/mi plugin is finished in the future, it will do it automatically (already does).
(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 xhpohanka

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #455 on: March 16, 2011, 12:50:04 pm »
No (99% probability), with the current plugin.
If the gdb/mi plugin is finished in the future, it will do it automatically (already does).

Thanks for the answer. Where can I get gdb/mi plugin please (even the devel version)?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #456 on: March 16, 2011, 01:15:43 pm »
Search the topic, you'll find a link to my svn, but at the moment it is unlikely to work with the vanilla source of the 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 xhpohanka

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #457 on: March 17, 2011, 08:52:21 am »
Search the topic, you'll find a link to my svn, but at the moment it is unlikely to work with the vanilla source of the branch...

Thank you, I have found it.
Another small question: important features are still missing in debugger GUI, local vars, function params and maybe global vars. Is their implementation in the project roadmap, please?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #458 on: March 17, 2011, 09:23:28 am »
Another small question: important features are still missing in debugger GUI, local vars, function params and maybe global vars. Is their implementation in the project roadmap, please?
Yes, but they are missing because they are not so important :)
(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 m.29

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #459 on: April 08, 2011, 08:49:00 pm »
I noticed some weird behaviour. Output for GDB is not parsed correctly if there is "repeats X times" substring. As you can see on picture strarr is the array with 3 strings, but it is parsed as array with only 2 values. I tried some modifications in ParseGDBWatchValue function, but there is too many flags for me :-(

[attachment deleted by admin]
Windows XP SP3, wxWidgets 2.8.11, C::B DEBUGGER BRANCH nightly builds

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #460 on: April 08, 2011, 09:37:41 pm »
m.29: Confirmed, I've added a test probably will try to fix it later...

BTW:
Anyone against the changes to the settings I've made with the 0020.x.patches?
I was planning to commit the patch in the next couple of days.
There are some gui problems on windows, but I'll fix them when I commit the patch (I'm sure it is not big deal, but it is too complex to manage).
(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 #461 on: April 08, 2011, 09:46:37 pm »
Anyone against the changes to the settings I've made with the 0020.x.patches?
From my side: Go ahead. Seems to work here.

I tried some modifications in ParseGDBWatchValue function, but there is too many flags for me :-(
This screenshot of yours looks very promising. What a nice work! 8)
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 #462 on: April 08, 2011, 10:59:04 pm »
m.29: Confirmed, I've added a test probably will try to fix it later...
And fixed.
If there more such cases, post the output from gdb and I'll fix them(if possible.
(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 m.29

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #463 on: April 09, 2011, 12:05:45 am »
This screenshot of yours looks very promising. What a nice work! 8)
Thanks :)

tO oBFusCATed:
Only these two are still broken. If I find any others I post them here.
Code
{0x4080d8 "1st", 0x4080dc "2rd", '.' <repeats 48 times>, 0x408110 "3th"}
{0x4080d8 "1st", 0x4080dc '.' <repeats 14 times>, "#", '&' <repeats 16 times>, 0x4080fc "3th"}
Windows XP SP3, wxWidgets 2.8.11, C::B DEBUGGER BRANCH nightly builds

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #464 on: April 09, 2011, 11:55:09 am »
m.29: Fixed
(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!]