From da452ce2bca637b25db43837d56213bf02c3fbfd Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 13 May 2019 17:54:08 -0400 Subject: [PATCH] strace: Print syscall names without the "_kern_". This makes the output much easier to read (e.g. "write(...)" vs. "_kern_write(...)") and similar to strace/dtrace/etc. output on other platforms. Change-Id: Iac8e32aae0dcf3731a348c6192203f8d5b54da7a Reviewed-on: https://review.haiku-os.org/c/1451 Reviewed-by: Bruno Albuquerque --- src/bin/debug/strace/strace.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/debug/strace/strace.cpp b/src/bin/debug/strace/strace.cpp index 25a436b55f..60034901d4 100644 --- a/src/bin/debug/strace/strace.cpp +++ b/src/bin/debug/strace/strace.cpp @@ -310,14 +310,14 @@ print_syscall(FILE *outputFile, Syscall* syscall, debug_post_syscall &message, Context ctx(syscall, (char *)message.args, memoryReader, contentsFlags, decimal); - // print syscall name + // print syscall name, without the "_kern_" if (colorize) { print_to_string(&string, &length, "[%6ld] %s%s%s(", - message.origin.thread, kTerminalTextBlue, syscall->Name().c_str(), - kTerminalTextNormal); + message.origin.thread, kTerminalTextBlue, + syscall->Name().c_str() + 6, kTerminalTextNormal); } else { print_to_string(&string, &length, "[%6ld] %s(", - message.origin.thread, syscall->Name().c_str()); + message.origin.thread, syscall->Name().c_str() + 6); } // print arguments