Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] How to see a child process' output?

Hi,

programming in Java on a Linux machine, I am trying to extend the
GDBCDIDebugger class (org.eclipse.cdt.debug.mi.core.GDBCDIDebugger).
For that purpose I am overwriting the createLaunchSession() method.
In my version of that method, I want to asynchronously start another
process and then wait for that child process to get into a certain
state before I continue.

I don't have access to the new process' source code.

In order to see how my child process is doing---it may request some
input that I am supposed to provide, it may get ready only after some
arbitrary delay, it may fail altogether---I need to monitor its output
stream. For this purpose I am using IProcess, IStreamsProxy, and
IStreamMonitor from org.eclipse.debug.core.model, to get a streams
proxy for my child process, and to get an output stream monitor from
that.

My problem is: When I am trying to start the child process on a Windows
machine (with a self-made dummy program for the child process) then
everything works fine---I can see the child's output. But when I try
the same under Linux with the real thing as the child then the output
stream monitor won't see any output (albeit it's there, as I can see
it in the debugger's console window). However I can send input to the
child process via the streams proxy's write() method.

The problem seems to be caused or affected by the fact that I am in the
middle of the createLaunchSession() method. Because when I am listening
to some other process' output then it's working fine ...

Is it possible there's a bug in IStreamsProxy and/or in IStreamMonitor?
... or am I missing something?

Regards,
Olaf
-- 
Olaf Ulrich, Germany


Back to the top