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:
committed by
waddlesplash
parent
9888752db1
commit
da452ce2bc
@@ -310,14 +310,14 @@ print_syscall(FILE *outputFile, Syscall* syscall, debug_post_syscall &message,
|
|||||||
Context ctx(syscall, (char *)message.args, memoryReader,
|
Context ctx(syscall, (char *)message.args, memoryReader,
|
||||||
contentsFlags, decimal);
|
contentsFlags, decimal);
|
||||||
|
|
||||||
// print syscall name
|
// print syscall name, without the "_kern_"
|
||||||
if (colorize) {
|
if (colorize) {
|
||||||
print_to_string(&string, &length, "[%6ld] %s%s%s(",
|
print_to_string(&string, &length, "[%6ld] %s%s%s(",
|
||||||
message.origin.thread, kTerminalTextBlue, syscall->Name().c_str(),
|
message.origin.thread, kTerminalTextBlue,
|
||||||
kTerminalTextNormal);
|
syscall->Name().c_str() + 6, kTerminalTextNormal);
|
||||||
} else {
|
} else {
|
||||||
print_to_string(&string, &length, "[%6ld] %s(",
|
print_to_string(&string, &length, "[%6ld] %s(",
|
||||||
message.origin.thread, syscall->Name().c_str());
|
message.origin.thread, syscall->Name().c_str() + 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
// print arguments
|
// print arguments
|
||||||
|
|||||||
Reference in New Issue
Block a user