Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Target stream output is not written to console on linux

Hello
  When I debug applications on emulation hardware the application's output  are missing  on the console in linux cdt.   But in the case of   windows this works perfectly  fine .  Has any body else faced this problem ?
 
 When I debugged  the cdt code what I found is that  these target output stream are processed as  out of band records and send to the  console  through  the PipedOutput stream. The following code in RxThread does this
---------------------------
if (stream instanceof MITargetStreamOutput) {
            OutputStream target = session.getMIInferior().getPipedOutputStream();
            if (target != null) {
                MITargetStreamOutput out = (MITargetStreamOutput) stream;
                String str = out.getString();
                if (str != null) {
                    try {
                        target.write(str.getBytes());
                        target.flush();
                    } catch (IOException e) {
                    }
                }
            }
            // Accumulate the Target Stream Output response for parsing.
            // Some commands, e.g. 'monitor' will put valuable info  in the Console Stream.
            // This fixes bug 119370.
            oobList.add(stream);
        }
----------------------------------------------------
 
In the case of linux I  found that
OutputStream target = session.getMIInferior().getPipedOutputStream();  comes null  since target is null it is never written .  In case of windows the target is valid and it writes and the output  is appearing .
 
I understand that there  is difference in the way in which MIInferior object created in Linux and windows.  
 
Any idea how to approach this  problem ?
 
Thanks
Shaiju.P
 

Back to the top