You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/06 08:15:38 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6367: dump_task: also dump thread param when dump thread name

xiaoxiang781216 commented on code in PR #6367:
URL: https://github.com/apache/incubator-nuttx/pull/6367#discussion_r889923049


##########
arch/arm/src/common/arm_assert.c:
##########
@@ -172,44 +175,66 @@ static void arm_dump_task(struct tcb_s *tcb, void *arg)
     }
 #endif
 
+#ifndef CONFIG_DISABLE_PTHREAD
+  if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD)
+    {
+      FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb;
+
+      snprintf(args, sizeof(args), "%p ", ptcb->arg);
+    }
+  else
+#endif
+    {
+      FAR char **argv;
+      size_t npos = 0;
+
+      for (argv = tcb->group->tg_info->argv + 1; *argv; argv++)
+        {
+          npos += strlcpy(args + npos, *argv, sizeof(args) - npos);
+          npos += strlcpy(args + npos, " ", sizeof(args) - npos);

Review Comment:
   Done.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org