Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [cdt-dev] Run support for cross GNU based toolchain compiledexecutable

Hi Aparna,
 
if you would just want to _run_ your program from eclipse, have you considered launching it as an external tool? In that way you can specify any commandline you want, like
 
myruntool <path-to-executable>/my.out
 
Not very elegant, but should work.
 
If you want to debug _and_ run I think there is good and bad news. First the bad:
 
- Yes, I think you'll have to create your own launch as you described below.
 
The good:
 
- Don't do it from scratch. For the launch configuration tabgroup use the org.eclipse.cdt.launch.ui.*.Tab classes in your own TabGroup. Don't fear the implementation, take a look at org.eclipse.cdt.launch.internal.ui.LocalRunLaunchConfigurationTabGroup.
- For the launch delegate, inherit from org.eclipse.cdt.launch.internal.LocalRunLaunchDelegate. Override the method
-- getProgramName() and getProgramPath() so that they will start your runtool instead of the compiled executable
-- getProgramArguments() so that the arguments will make the runtool start your executable
 
Worth a try? I did not do it before and it is not tested but that's the way I would go.
 
Cheers,
 
 
Norbert


Von: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] Im Auftrag von Aparna Argade
Gesendet: Mittwoch, 18. Januar 2006 13:17
An: cdt-dev@xxxxxxxxxxx
Betreff: [cdt-dev] Run support for cross GNU based toolchain compiledexecutable

Hi,

I have integrated my cross GNU based toolchain and gdb to eclipse. I can seamlessly debug my .out file through Debug menu. Now I want to Run my.out file through Run menu. This should be a simulated run through $target-run tool. It means actual download on hardware is not required.

If I try Run option, then I get error through exec function. This is because my .out file is not windows executable, it is supposed to run on target.

 

LocalRunLaunchDelegate-> launch method just takes executable path and program arguments into commandArray and sends it for exec. The debugger tab seems to play no role in Run configuration. I do not understand how I can mention my target specific run ($target-run) tool.

First I have a basic question:  Does eclipse support Run for target specific executable? (may be through provision of some extension..)

If not, then how should I go ahead? Do I need to write from scratch launch configuration, command factory, create session/process routines and rest other things?

Please guide.

Thanks,

Aparna


Back to the top