Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] debug output question

If the SDM is running locally, you should see stdout on the Eclipse console. It's not really possible to launch the SDM manually.

Greg

On Oct 3, 2007, at 1:14 PM, Feiyi Wang wrote:

That explains it. thanks.

for the second point you made, how do you run SDM manually and observe its output?

Feiyi

Greg Watson wrote:
See section 24.4.2 in the gdb manual: http://sourceware.org/gdb/ current/onlinedocs/gdb_25.html#SEC243 The target output stream is only supported for remote targets. A remote target is when you use gdb to debug a remote system using gdbserver. For normal uses of gdb, the target output stream doesn't work, which is why we have to use pseudo terminals. It would certainly simplify things to be able use target output streams, but I don't think they have any plans to support it.
Greg
On Oct 2, 2007, at 2:25 PM, Feiyi Wang wrote:
Greg -

 ... well, I didn't think, I just jump onto it.

 thanks for the info, I will take a closer look at it.

A unrelated question on GDB/MI interface: suppose the target program has a output stream, denoted by @, but as the following interaction shows, "res = 6" stdio from sample program doesn't have @ prefix ... why?

(gdb)
-exec-continue
^running
(gdb)
res = 6
*stopped,reason="exited-normally"
(gdb)


I also tried MI API to see if I get anything through target callback, and again, nothing comes out of it ... am I missing something here?

void
target_callback(char *str)
{
    printf("target> %s\n", str);
}

int main()
   sess = MISessionNew();
   if (MISessionStartLocal(sess, "/home/fwang2/gdb/test") < 0) {
        fprintf(stderr, "%s", MIGetErrorStr());
        return 1;
   }

    MISessionRegisterTargetCallback(sess, target_callback);

cmd = MICommandNew("run", MIResultRecordDONE); MICommandRegisterCallback(cmd, cmd_callback, sess);
    sendcmd_wait(sess, cmd);
...




_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




Back to the top