Author Topic: Debugger Plugin Script Extension (Patch)  (Read 9067 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Debugger Plugin Script Extension (Patch)
« on: November 08, 2005, 07:57:45 am »
In http://forums.codeblocks.org/index.php/topic,1303.0.html I've asked how to debug into an STL vector. It turned out that it could be a nice feature to allow debugging via "script" - thus, just a text file with GDB commands line-by-line. I've implemented this and have attached a patch accordingly. I would like to hear comments on that topic.

Still there is an open question:
Where does the output go to? I have enabled the "GDB Debugger (debug)" window as well but it's very strange: If I move the cursor e.g. over a variable I get the output directly into the "GDB Debugger (debug)" and the "Code::Blocks Debug" window. But neighter with "Send command to GDB" nor "Send script to GDB" I see any output... only the input.

Morten.


[attachment deleted by admin]
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 mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugger Plugin Script Extension (Patch)
« Reply #1 on: November 08, 2005, 08:33:32 am »
Quote
Where does the output go to?

Well, the output goes where you would expect it to go (the debugger's tabs). *BUT* output that follows certain format is caught and interpreted by C::B to get to the values it needs (like brekpoints, watches, etc).
So, if the output of your command matches any gdb filters in C::B, it is intercepted...
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugger Plugin Script Extension (Patch)
« Reply #2 on: November 08, 2005, 08:49:44 am »
Quote
Where does the output go to?
*BUT* [...] So, if the output of your command matches any gdb filters in C::B, it is intercepted...
I understand. But: What I mean is that allthough if it's intercepted the values are still shown in the Debugger's debug window if I move the cursor over a debugged variable but not if I sent the command to the debugger. To make it more clear: If I move the cursor over a debugged variable I see in the debug-window:
Code
> p a
post-prompt
value-history-begin 1 -
$1 =
value-history-value
4
value-history-end
pre-prompt
(gdb)
prompt
If I send the ssame command ("p a") directly to the debugger I see:
Code
> p a
post-prompt
value-history-begin 2 -
value-history-value
value-history-end
pre-prompt
prompt
It's the same command so shouldn't both be eighter intercepted or not? Why comes that the ouput differs? What am I missing?

Morten.
« Last Edit: November 08, 2005, 12:05:20 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 mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugger Plugin Script Extension (Patch)
« Reply #3 on: November 08, 2005, 03:45:32 pm »
OK, next thing on my list is the debugger plugin so be a little patient ;)
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugger Plugin Script Extension (Patch)
« Reply #4 on: November 08, 2005, 04:39:23 pm »
OK, next thing on my list is the debugger plugin so be a little patient ;)
Cool, thanks! :D
Just take your time. I am looking forward to it and consider this thread as closed.

Morten.
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