[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] debug output question
|
hmm ... the status now is, I have done the pseduo terminal stuff, and
keep the master in the parent, slave in the child, and am getting stdout
through MI (as shown by MI RECV). It is missing the @ I was expecting, I
am guessing it is filtered because I didn't set tty in raw mode, but
that is all right. I make the callback directly:
if (sess-> target_callback != NULL)
sess -> target_callback(str);
instead of DoOOBStreamOutput() since the data now is string type and I
don't need to construct the MIOutput record again (there might be other
implications by not doing that, but for now ...). Target callback is
done to stdout the string. However, However, it is not being picked up.
Now, I am looking at debug_app_job_state_callback() to see if I did the
right thing - two questions:
(1) in addition to registering IO forwarding, should I check for job
state, and invoke sendProcessStateChangeEvent() as needed? as did in
job_state_callback() for normal launch?
(2) job_state_callback do j = find_job(jobid, JOBID_ORTE); to locate job
id, I saw two other constants defined JOBID_PTP and JOBID_DEBUG - what
are the intended use?
Thanks
Feiyi
Greg Watson wrote:
As long as you've registered to receive callbacks in the proxy when you
launch the debugger (rather than a normal application), then you should
be getting any output the debugger generates. You could try putting a
printf at the start of server() in the SDM to see if it gets picked up.
Greg
On Oct 5, 2007, at 2:19 PM, Feiyi Wang wrote:
OK, in that case, should I be expecting that any stdout I throw in
this callback function (target callback), ORTE will pick it up and
send to front? I didn't see any expected processStdOutput event, say
with a dummy callback. I am thinking, the target callback output is
different from normal job output after all - is that right?
Feiyi
Greg Watson wrote:
You're right. I think you'll need to call
MISessionRegisterTargetCallback() to register a callback (in
GDBMIStartSession(), line 793 looks like a good place). This callback
function should get called from DoOOBStreamCallbacks(), so you
shouldn't need to do any of that AsyncCallback stuff.
Greg
On Oct 3, 2007, at 2:36 PM, Feiyi Wang wrote:
A few more questions on your previous email: he
DoOOBStreamCallbacks() eventually boils down to:
if (sess-> target_callback != NULL)
sess -> target_callback(str);