User forums > Using Code::Blocks
Debugging QString
LordCB:
dear eranif,
now I understand nothing........
you say
--- Quote ---I add the following user function to the debugger on the startup:
--- End quote ---
where do you do this perhaps a screenshot may help a little bit
Where do you type
--- Quote ---printqstring <variable_name>
--- End quote ---
eranif:
--- Quote from: LordCB on September 14, 2009, 10:39:43 pm ---dear eranif,
now I understand nothing........
you say
--- Quote ---I add the following user function to the debugger on the startup:
--- End quote ---
where do you do this perhaps a screenshot may help a little bit
Where do you type
--- Quote ---printqstring <variable_name>
--- End quote ---
--- End quote ---
I am sorry, I thought you understand that I meant gdb from the command line (I should have mentioned that more clear)
You just need to wait for one of the C::B experts here, that will answer the question: How to automate the process I described above in C::B
Sorry,
Eran
LordCB:
Thanx a lot,
I really want to make this feature to me existant, cause this would save me a lot of time I think.
oBFusCATed:
LordCB,
Quick look at the script bindings reveals that there is no way to send commands to the debugger through scripting.
You have two variants for solving your issue:
1. Using the eranif gdb script:
a). Put the gdb script eranif posted in a file
b). then in the Settings -> Compiler & Debugger -> Debugger -> Initial commands put "source path_to_file"
c). Add
--- Code: ---function Evaluate_QString(type, a_str, start, count)
{
return _T("printqstring ") + a_str;
}
function Parse_QString(a_str, start)
{
return a_str;
}
--- End code ---
2. Try to implement the same the eranif script does in C::B's script (squirrel), the way I've explained you on my previous post.
I can't help you more, because I don't have QT, sorry.
Some things to consider:
a). Settings -> Compiler & Debugger -> Debugger -> check the debugger log (debug) (or something like that) - this one will add another log pane in the "Logs & Other" window, there you can see the communication between C::B and gdb...
b). You can execute gdb commands - if you use relatively new nightly there is a text entry in the debugger logs pane, if not "debug -> send command to debugger"
c). Read this http://wiki.codeblocks.org/index.php?title=Scripting_Code::Blocks so you'll understand how to script codeblocks (there is view -> script console window for errors and command execution).
Good luck...
LordCB:
Thanx a lot I will give it a try.
I give also a feedback....
thanks thanks thanks
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version