[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] How to see a child process' output?
|
Olaf,
I am not sure that I understand what exactly you are trying to do. But there
is a bug in the ProcessConsole class (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=121454) that may be related.
And I would suggest to use GDBCDIDebugger2 instead of GDBCDIDebugger. The
latter is kept in CDT 3.1 only for compatibility purposes.
Mikhail Khodjaiants
QNX Software Systems
----- Original Message -----
From: "Ulrich, Olaf" <olaf.ulrich@xxxxxxxxxxx>
To: <cdt-dev@xxxxxxxxxxx>
Sent: Thursday, March 09, 2006 11:45 AM
Subject: [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
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev