Debugger: Implement SPU mailbox content display

This commit is contained in:
Eladash 2022-05-25 15:14:23 +03:00 committed by Ivan
parent 56f95934f5
commit e7ced1aeab
1 changed files with 18 additions and 2 deletions

View File

@ -5029,8 +5029,24 @@ void fmt_class_string<spu_channel_4_t>::format(std::string& out, u64 arg)
{
const auto& ch = get_object(arg);
// TODO (use try_read)
fmt::append(out, "count = %d", ch.get_count());
u32 vals[4]{};
const uint count = ch.try_read(vals);
fmt::append(out, "count = %d, data:\n", count);
out += "{ ";
for (u32 i = 0; i < count;)
{
fmt::append(out, "0x%x", vals[i]);
if (++i != count)
{
out += ", ";
}
}
out += " }\n";
}
DECLARE(spu_thread::g_raw_spu_ctr){};