[PATCH] Use debug_msg macro where possible
Paul Chaignon
paul.chaignon at gmail.com
Fri Jun 14 17:34:57 UTC 2019
Signed-off-by: Paul Chaignon <paul.chaignon at gmail.com>
---
linux/alpha/get_scno.c | 3 +--
linux/mips/get_scno.c | 4 +---
linux/sh/get_scno.c | 7 +++----
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/linux/alpha/get_scno.c b/linux/alpha/get_scno.c
index 2d5c6d6a..2b5e54f6 100644
--- a/linux/alpha/get_scno.c
+++ b/linux/alpha/get_scno.c
@@ -22,8 +22,7 @@ arch_get_scno(struct tcb *tcp)
*/
if (!scno_in_range(scno)) {
if (alpha_a3 == 0 || alpha_a3 == -1UL) {
- if (debug_flag)
- error_msg("stray syscall exit: r0 = %lu", scno);
+ debug_msg("stray syscall exit: r0 = %lu", scno);
return 0;
}
}
diff --git a/linux/mips/get_scno.c b/linux/mips/get_scno.c
index f06fae46..8c9de92f 100644
--- a/linux/mips/get_scno.c
+++ b/linux/mips/get_scno.c
@@ -13,9 +13,7 @@ arch_get_scno(struct tcb *tcp)
if (!scno_in_range(tcp->scno)) {
if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) {
- if (debug_flag)
- error_msg("stray syscall exit: v0 = %ld",
- tcp->scno);
+ debug_msg("stray syscall exit: v0 = %ld", tcp->scno);
return 0;
}
}
diff --git a/linux/sh/get_scno.c b/linux/sh/get_scno.c
index b23824d5..2f979ae5 100644
--- a/linux/sh/get_scno.c
+++ b/linux/sh/get_scno.c
@@ -22,10 +22,9 @@ arch_get_scno(struct tcb *tcp)
glibc to issue bogus negative syscall numbers. So for
our purposes, make strace print what it *should* have been */
kernel_ulong_t correct_scno = (scno & 0xff);
- if (debug_flag)
- error_msg("Detected glibc bug: bogus system call"
- " number = %ld, correcting to %ld",
- scno, correct_scno);
+ debug_msg("Detected glibc bug: bogus system call number = %ld,"
+ " correcting to %ld",
+ scno, correct_scno);
scno = correct_scno;
}
--
2.17.1
More information about the Strace-devel
mailing list