casaroli commented on code in PR #3962:
URL: https://github.com/apache/nuttx-apps/pull/3962#discussion_r4455255136


##########
system/gdbstub/gdbstub.c:
##########


Review Comment:
   With CONFIG_NET, `gdbstub -d /dev/ttyS0` still uses this function, and 
send() on a tty fd fails with ENOTSOCK. So the call must depend on the 
transport of the session (`port`), not on CONFIG_NET.



##########
system/gdbstub/gdbstub.c:
##########
@@ -92,6 +92,28 @@ static ssize_t gdb_send(FAR void *priv, FAR const char *buf, 
size_t len)
   return len;
 }
 
+#ifdef CONFIG_NET

Review Comment:
   The two differ in the transport, not in the configuration: with CONFIG_NET 
the same binary serves a tty (`-d`, needs write()) or TCP (`-p`, needs send() 
with MSG_NOSIGNAL), and send() on a tty fd fails with ENOTSOCK.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to