mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-10-31 12:27:53 +00:00
lm: Assert on unsupported multi-message.
This commit is contained in:
parent
0e978bdd50
commit
6f6d9af408
1 changed files with 9 additions and 0 deletions
|
@ -37,6 +37,11 @@ private:
|
||||||
BitField<24, 8, u32_le> verbosity;
|
BitField<24, 8, u32_le> verbosity;
|
||||||
};
|
};
|
||||||
u32_le payload_size;
|
u32_le payload_size;
|
||||||
|
|
||||||
|
/// Returns true if this is part of a single log message
|
||||||
|
bool IsSingleMessage() const {
|
||||||
|
return (flags & Flags::IsHead) && (flags & Flags::IsTail);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
static_assert(sizeof(MessageHeader) == 0x18, "MessageHeader is incorrect size");
|
static_assert(sizeof(MessageHeader) == 0x18, "MessageHeader is incorrect size");
|
||||||
|
|
||||||
|
@ -69,6 +74,10 @@ private:
|
||||||
Memory::ReadBlock(addr, &header, sizeof(MessageHeader));
|
Memory::ReadBlock(addr, &header, sizeof(MessageHeader));
|
||||||
addr += sizeof(MessageHeader);
|
addr += sizeof(MessageHeader);
|
||||||
|
|
||||||
|
if (!header.IsSingleMessage()) {
|
||||||
|
UNIMPLEMENTED_MSG("Multi message logs are unimplemeneted");
|
||||||
|
}
|
||||||
|
|
||||||
// Parse out log metadata
|
// Parse out log metadata
|
||||||
u32 line{};
|
u32 line{};
|
||||||
std::string message, filename, function;
|
std::string message, filename, function;
|
||||||
|
|
Loading…
Reference in a new issue