[Zion] Move to StrFormat for debug line.

This commit is contained in:
Drew Galbraith 2023-11-05 09:24:09 -08:00
parent 4af19d010f
commit 69aced2220
23 changed files with 142 additions and 89 deletions

View file

@ -5,6 +5,6 @@
#include "debug/debug.h"
z_err_t Debug(ZDebugReq* req) {
dbgln("[Debug] %s", req->message);
dbgln("[Debug] {}", req->message);
return glcr::OK;
}

View file

@ -17,7 +17,7 @@ glcr::ArrayView<uint8_t> Buffer(const void* bytes, uint64_t num_bytes) {
template <typename T>
glcr::ErrorOr<IpcMessage> TranslateRequestToIpcMessage(const T& req) {
if (req.num_bytes > 0x1000) {
dbgln("Large message size unimplemented: %x", req.num_bytes);
dbgln("Large message size unimplemented: {x}", req.num_bytes);
return glcr::UNIMPLEMENTED;
}

View file

@ -7,7 +7,7 @@
z_err_t ProcessExit(ZProcessExitReq* req) {
auto curr_thread = gScheduler->CurrentThread();
dbgln("Exit code: %x", req->code);
dbgln("Exit code: {x}", req->code);
// FIXME: kill process here.
curr_thread->Exit();
panic("Returned from thread exit");

View file

@ -88,7 +88,7 @@ extern "C" z_err_t SyscallHandler(uint64_t call_id, void* req) {
// syscall/debug.h
CASE(Debug);
default:
dbgln("Unhandled syscall number: %x", call_id);
dbgln("Unhandled syscall number: {x}", call_id);
return glcr::UNIMPLEMENTED;
}
UNREACHABLE