Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: MortenMacFly on November 08, 2005, 07:57:45 am

Title: Debugger Plugin Script Extension (Patch)
Post by: MortenMacFly 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]
Title: Re: Debugger Plugin Script Extension (Patch)
Post by: mandrav 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...
Title: Re: Debugger Plugin Script Extension (Patch)
Post by: MortenMacFly 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.
Title: Re: Debugger Plugin Script Extension (Patch)
Post by: mandrav on November 08, 2005, 03:45:32 pm
OK, next thing on my list is the debugger plugin so be a little patient ;)
Title: Re: Debugger Plugin Script Extension (Patch)
Post by: MortenMacFly 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.