You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/04/03 10:04:36 UTC

[incubator-nuttx-apps] 03/07: system/trace: correct preamble header pid

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 7612d2aea8170a4af5de3ed52a49208178cfb741
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Mar 30 22:08:55 2022 +0800

    system/trace: correct preamble header pid
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 system/trace/trace_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/trace/trace_dump.c b/system/trace/trace_dump.c
index 637561e..9ffd788 100644
--- a/system/trace/trace_dump.c
+++ b/system/trace/trace_dump.c
@@ -317,7 +317,7 @@ static void trace_dump_header(FAR FILE *out,
   int cpu = 0;
 #endif
 
-  pid = ctx->cpu[cpu].current_pid;
+  trace_dump_unflatten(&pid, note->nc_pid, sizeof(pid));
 
   fprintf(out, "%8s-%-3u [%d] %3" PRIu32 ".%09" PRIu32 ": ",
           get_task_name(pid, ctx), get_pid(pid), cpu,