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 <[email protected]>
This commit is contained in:
Augustin Cavalier
2019-05-13 22:11:33 +00:00
committed by waddlesplash
parent 9888752db1
commit da452ce2bc
+4 -4
View File
@@ -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