Dear team,
I would like to know how to set (by default) a new debugger (custom cross gdb).
Context: I would like to use all the features already present in C/C++ Remote application Launch config but i need to set the debugger with mine.
Can i modify the LaunchUtils.java (org.eclipse.cdt.dsf.gdb) to set the default debugger path with the relevant one (mine of course :) ) or should i create a new launch config (new plugin....)????
PS: I i don't want to set it each time i need to debug a new project
Thank you in advance
Re: Set another gdb by default (programatically)
[
message #1764782
is a reply to
message #1764597
]
Fri, 02 June 2017 09:11
Are you shipping your own plug-ins already? If so, I believe you will want your own config or at least launch delegate.
If you are a user, you can set the default GDB in Window -> Preferences -> C/C++ -> Debug -> GDB. Note that setting will only apply to newly created files.
If you are a little bit in the middle of the above options (e.g. you are shipping your own CDT based product, but don't want to write new code just for this) use plugin_customization.ini to set the default value for the preference above.
Re: Set another gdb by default (programatically)
[
message #1765341
is a reply to
message #1764782
]
Thu, 08 June 2017 14:44
Thanks for your response.
Here are the modification i made in org.eclipse.cdt.debug.application plugin_customization.ini file
org.eclipse.cdt.dsf.gdb/defaultGdbCommand= "
pathToMyGDBCommand
\zynq-linux-gdb"
Should i set something else? Or maybe somewhere else??!!??
Caus' i still got the same old gdb default command.....
Thank you ;)
Re: Set another gdb by default (programatically)
[
message #1765344
is a reply to
message #1765341
]
Thu, 08 June 2017 15:03
Hi, Not sure about this one. I would have to debug it to see what is going wrong. Just to confirm, you have to have a new workspace I think.
Re: Set another gdb by default (programatically)
[
message #1765531
is a reply to
message #1765452
]
Mon, 12 June 2017 07:30
FYI, i need to get my own CDT with these preferences (own debugger path) set as defaults. I don't think that creating a plugin is necessary for me because setting up my own debugger path is enough. What do you think?
To sum up, i just need to set some existing .ini file to get this default gdb command set with my own path. No need to create a new plugin to do so???
If this is the case, Could you please tell me which one of the plugin_customization.ini file should i implement? Caus' i got 4 different .ini files belonging to the below plugins:
=>org.eclipse.cdt.debug.application
=>org.eclipse.platform
=>org.eclipse.epp.package.cpp
=>org.eclipse.sdk
Thank you
On last thing, Could you please tell me if we can proceed that way to set cross GCC settings path or prefix????
I don't know on this one. The cross gcc default settings are saved after user enters them once in: .metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml
The code that manages the file is:
core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java
and the wizard page that reads the saved settings is:
cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/SetCrossCommandWizardPage.java
One drawback to the way crossgcc handles prefix/path is that it is saved per project, which makes the projects hard to transport to other machines. You may want to consider
http://gnuarmeclipse.github.io/
which adds some stuff on top of CDT for managing embedded toolchains. Note that it is currently called GNU ARM Eclipse, but is being rebranded because it already supports non-ARM and will continue to expand in that way.
Re: Set another gdb by default (programatically)
[
message #1765682
is a reply to
message #1765661
]
Tue, 13 June 2017 09:55
No problem Jonah.
In my case, i just need to "tell" eclipse to use my own gdb tool (which has been created by my team). For that i need to poupuler the debugger command field (debugger page) with the path to my gdb bin directory. In order to set it as default, i used plugin_customization.ini file (org.eclipse.epp.package.cpp folder) and i set the below line :
org.eclipse.cdt.dsf.gdb/defaultGdbCommand=path\\to\\my\\gdb\\mygdb.exe
I also have to add the below lines to eclipse.ini:
-pluginCustomization
plugins/org.eclipse.epp.package.cpp_4.6.3.20170314-1500
Dear Jonah,
Please tell me if you want me to explain a bit more.
Thanks for your assistance