News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Set remote debug option with Wizard script [SOLVED]

Started by ZdenoQC, September 11, 2012, 05:24:35 PM

Previous topic - Next topic

ZdenoQC

Hi,

I'm creating a wizard template for my board base on a freescale imx processor (armv7). I have set all compiler and librairie function but I haven't found a way to set gdb remote debugging option like IP address and pre-command.

Is this possible?

Thanks

William Deshaies

MortenMacFly

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]

ZdenoQC

Nice!

And how I do that? Is it with the read/write function and I look in the project XML to find the name of the parameter I want to change?

Thanks

William Deshaies

MortenMacFly

Quote from: ZdenoQC on September 13, 2012, 02:26:36 PM
And how I do that?
I can't tell because it depends on you platform, version of C::;B and compiler/debugger version / framework you are using. Unfortunately you didn't provide any of these information.
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]

ZdenoQC

Sorry I totally forgot. I'm using Ubuntu 11.04 and codeblocks 10.05 from synaptic (not svn), gcc 4.4.4 (gcc-4.4.4-glibc-2.11.1-multilib-1.0).

I'm not sure about the framework you are talking because I haven't add any plugin or addon.

MortenMacFly

Quote from: ZdenoQC on September 13, 2012, 03:07:28 PM
codeblocks 10.05
I suppose you better use a nightly for this purpose. Then, within the debugger configuration you can setup the connectivity options using the GUI.
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]

ZdenoQC

I already know how to setup those setting in the project with Properties->Debugger->Remote debugging, but I want this to be made by the wizard script I'm writing. Just like the function project.AddLinkLib(_T(""));.

I thought it was a codeblocks project thing and not compiler/debugger specific thing.

ZdenoQC

Hi,

After some days I found something interesting. The function project.AddToExtensions() add elements in the project xml file.


project.AddToExtensions(_T("debugger/remote_debugging/options:conn_type=0"));
project.AddToExtensions(_T("debugger/remote_debugging/options:serial_baud=115200"));
project.AddToExtensions(_T("debugger/remote_debugging/options:ip_address=192.168.0.1"));
project.AddToExtensions(_T("debugger/remote_debugging/options:ip_port=2222"));
project.AddToExtensions(_T("debugger/remote_debugging:target=Debug"));


The problem is that it seems that the debugger option is ovewrite elsewhere. When I use de "+" in front of "debugger/.." , I see the the duplicate options, but the first is clear.

Do someone know what is the function that overwrite the debugger setting and how I can bypass that? Or is there an other way of writing theses settings?

Thanks

ZdenoQC

Hi,

I found a workaround for the previous method I found. I just find out that the debugger was a plugin in codeblocks. So I disable it first. I create the project with my wizard with the "AddToExtensions" lines and I close it. Finally, I enable the plugin and I open the project. Its the only way that my settings are not erase by the debugger plugin.

I guess the only way to avoid that is to modify the debugger plugin or disable and enable the plugin via the wizard.

oBFusCATed

Quote from: ZdenoQC on October 12, 2012, 04:12:23 PM
I guess the only way to avoid that is to modify the debugger plugin or disable and enable the plugin via the wizard.
Modify the plugin and provide a patch, but please use the latest SVN HEAD sources as reference.
(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!]

firew4lker

I have the same Issue.

@ZdenoQC. Did you fill a bug report?

tomjnx

Something like this?

You could then add something to "debugger/scriptadd/x", which would then be converted to "debugger/x" on first save (or load)

Yes it's a hack, but minimally intrusive, and the whole AddToExtension interface seems a bit q&d to me...

firew4lker


ZdenoQC

Wow I thought it would never work! Thanks a lot tomjnx for this patch!

Jungle

I apologize for reviving this topic, but I'm unable to set debugger options in the wizard.script. I've tried the following
project.AddToExtensions(_T("debugger/scriptadd/remote_debugging"));
project.AddToExtensions(_T("+debugger/scriptadd/remote_debugging:target=Debug"));
project.AddToExtensions(_T("+debugger/scriptadd/remote_debugging/options:conn_type=0"));
project.AddToExtensions(_T("+debugger/scriptadd/remote_debugging/options:serial_baud=115200"));
project.AddToExtensions(_T("+debugger/scriptadd/remote_debugging/options:ip_address=127.0.0.1"));
project.AddToExtensions(_T("+debugger/scriptadd/remote_debugging/options:ip_port=3333"));

and it doesn't work. I've also tried without "+" and without "scriptadd". No success.

C::B version is 16.01.