News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Debugger Plugin Script Extension (Patch)

Started by MortenMacFly, November 08, 2005, 07:57:45 AM

Previous topic - Next topic

MortenMacFly

In http://forums.next.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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

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

MortenMacFly

#2
Quote from: mandrav on November 08, 2005, 08:33:32 AM
QuoteWhere 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:

> 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:

> 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

OK, next thing on my list is the debugger plugin so be a little patient ;)
Be patient!
This bug will be fixed soon...

MortenMacFly

Quote from: mandrav on November 08, 2005, 03:45:32 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]