oxidecomputer / humility

Debugger for Hubris
Mozilla Public License 2.0
529 stars 51 forks source link

hiffy: differentiate dead codes from error codes #472

Closed hawkw closed 7 months ago

hawkw commented 7 months ago

When invoking an IPC using humility-hiffy, the result is represented as a u32. Calling code typically will then attempt to turn that u32 back into the IPC interface's error code. However, if the server task that Hiffy called into has died, the u32 will instead be a dead code, which cannot be translated into a named error code using the Idol interface (or similar). Therefore, this branch updates humility hiffy to return an IpcError enum instead, which is either an error code or a dead code. This forces callers to differentiate between these cases, and not print out random integers when the server task has died.