mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:47:35 +00:00
strace: Stop using Core::IODevice::printf()
There are no other clients of this weird API, so let's get rid of it. Now that we call IODevice::write() instead, we can also handle errors.
This commit is contained in:
parent
05dbf3891a
commit
c7e5ef3057
1 changed files with 7 additions and 3 deletions
|
@ -148,13 +148,17 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
u32 res = regs.eax;
|
u32 res = regs.eax;
|
||||||
|
|
||||||
trace_file->printf("%s(0x%x, 0x%x, 0x%x)\t=%d\n",
|
auto string = String::formatted("{}({:#08x}, {:#08x}, {:#08x})\t={}\n",
|
||||||
Syscall::to_string(
|
Syscall::to_string((Syscall::Function)syscall_index),
|
||||||
(Syscall::Function)syscall_index),
|
|
||||||
arg1,
|
arg1,
|
||||||
arg2,
|
arg2,
|
||||||
arg3,
|
arg3,
|
||||||
res);
|
res);
|
||||||
|
|
||||||
|
if (!trace_file->write(string)) {
|
||||||
|
warnln("write: {}", trace_file->error_string());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue