oxidecomputer / humility

Debugger for Hubris
Mozilla Public License 2.0
526 stars 50 forks source link

humility-core: allow enums with signed variants #469

Closed cbiffle closed 5 months ago

cbiffle commented 5 months ago

Humility currently assumes that any enum discriminant can be represented as a u64. This isn't at all true, and in fact fails for common Rust types. See #468 for more details.

This fixes it to handle basic cases of signed enum variants. It's entirely possible that some places in Humility still won't handle them correctly, because logic for loading the enum discriminator isn't reliably centralized in one place, and I may have missed cases.

Fixes #468.

cbiffle commented 5 months ago

Good point, filed #471 as a follow-up listing those cases.