From a6c25e1ca78108d83010ff03867b452d04602c7f Mon Sep 17 00:00:00 2001
From: Basile Desloges <basile.desloges@cea.fr>
Date: Wed, 22 Sep 2021 14:46:36 +0200
Subject: [PATCH] [eacsl] Update trace() to output on stderr

---
 src/plugins/e-acsl/share/e-acsl/internals/e_acsl_trace.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/e-acsl/share/e-acsl/internals/e_acsl_trace.c b/src/plugins/e-acsl/share/e-acsl/internals/e_acsl_trace.c
index 2d0bff075be..81f7901c8c6 100644
--- a/src/plugins/e-acsl/share/e-acsl/internals/e_acsl_trace.c
+++ b/src/plugins/e-acsl/share/e-acsl/internals/e_acsl_trace.c
@@ -85,7 +85,7 @@ void trace() {
   char executable[PATH_MAX];
   rtl_sprintf(executable, "/proc/%d/exe", getpid());
 
-  STDOUT("/** Backtrace **************************/\n");
+  STDERR("/** Backtrace **************************/\n");
   int counter = 0;
   while (*bb) {
     char *addr = (char *)private_malloc(21);
@@ -99,18 +99,18 @@ void trace() {
       if (outs) {
         outs[strlen(outs) - 1] = '\0';
         if (strlen(outs) && endswith(outs, "??:0") && endswith(outs, "??:?")) {
-          STDOUT("%s%s\n", prefix, outs);
+          STDERR("%s%s\n", prefix, outs);
         }
       } else {
         char *errs = (char *)ipr->stderrs;
         if (errs) {
-          STDOUT("%s\n", errs);
+          STDERR("%s\n", errs);
         }
       }
     }
     bb++;
     counter++;
   }
-  STDOUT("/***************************************/\n");
+  STDERR("/***************************************/\n");
 #endif /* E_ACSL_OS_IS_LINUX */
 }
-- 
GitLab