Skip to content
Snippets Groups Projects
Commit a6c25e1c authored by Basile Desloges's avatar Basile Desloges
Browse files

[eacsl] Update trace() to output on stderr

parent 821d828e
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment