Cast to int for enums that are not formattable

This commit is contained in:
Pokechu22
2022-01-12 16:47:26 -08:00
parent 5465775d11
commit 1a92699455
19 changed files with 60 additions and 42 deletions

View File

@ -848,7 +848,8 @@ static bool AddBreakpoint(BreakpointType type, u32 addr, u32 len)
if (type == BreakpointType::ExecuteHard || type == BreakpointType::ExecuteSoft)
{
PowerPC::breakpoints.Add(addr);
INFO_LOG_FMT(GDB_STUB, "gdb: added {} breakpoint: {:08x} bytes at {:08x}", type, len, addr);
INFO_LOG_FMT(GDB_STUB, "gdb: added {} breakpoint: {:08x} bytes at {:08x}",
static_cast<int>(type), len, addr);
}
else
{
@ -864,7 +865,8 @@ static bool AddBreakpoint(BreakpointType type, u32 addr, u32 len)
new_memcheck.log_on_hit = false;
new_memcheck.is_enabled = true;
PowerPC::memchecks.Add(new_memcheck);
INFO_LOG_FMT(GDB_STUB, "gdb: added {} memcheck: {:08x} bytes at {:08x}", type, len, addr);
INFO_LOG_FMT(GDB_STUB, "gdb: added {} memcheck: {:08x} bytes at {:08x}", static_cast<int>(type),
len, addr);
}
return true;
}
@ -1111,7 +1113,8 @@ bool JustConnected()
void SendSignal(Signal signal)
{
char bfr[128] = {};
fmt::format_to(bfr, "T{:02x}{:02x}:{:08x};{:02x}:{:08x};", signal, 64, PC, 1, GPR(1));
fmt::format_to(bfr, "T{:02x}{:02x}:{:08x};{:02x}:{:08x};", static_cast<u8>(signal), 64, PC, 1,
GPR(1));
SendReply(bfr);
}
} // namespace GDBStub