|[cdt-dev] Debug support in C/C++ Unit Testing Plugin|
I am working on debug support in C/C++ Unit Testing Plugin. It means that user should be able to easily start debug session for the "C/C++ Unit" configuration.
To make "C/C++ Unit" view work properly I need to be able to do 2 things:
For CDI I decided to derive LocalCDILaunchDelegate. To handle program arguments I have just override getProgramArgumentsArray(). To obtain output/error streams I have wrapped the process creation in launchLocalDebugSession() with a custom method wrapProcess() that by default just return the process passed to its arguments. However in my implementation of delegate it stores the necessary stream and returns a wrapper (that returns null on getInputStream()/getErrorStream() if necessary).
Is this an acceptable solution? And if yes, could I move LocalCDILaunchDelegate from org.eclipse.cdt.launch.internal to org.eclipse.cdt.launch to be able to place my delegate in org.eclipse.cdt.testsrunner? Or will it be better to configure package visibility in "Runtime" tab of plugins.xml and to add org.eclipse.cdt.testsrunner there?
For DSF I have no solution how to do the similar things. I have found that program arguments are provided by GDBBackend service and the inferior process is created in GDBProcesses & GDBProcesses_7_0, but I don't know how I can override the default behaviour. Can somebody advise me something or is there another way to do the things described above?