-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Issue
Several error messages throughout the codebase lack sufficient context to help users understand what went wrong and how to fix it.
Current State
Examples of generic error messages:
"no valid entry block found"
- doesn't explain whyInvalidJumpTarget(usize)
- only shows PC without context- Generic parsing errors without position information
Proposed Solution
Enhance error messages with:
- More descriptive explanations
- Context about what was expected vs what was found
- Suggestions for resolution where applicable
- Position information for parsing errors
Examples:
"No valid entry block found: instruction sequence may be empty or contains only terminal instructions"
"Invalid jump target 0x{:x}: target must point to a JUMPDEST instruction within bounds [0x0, 0x{:x}]"
Benefits
- Better user experience
- Easier debugging
- More helpful error reporting
- Reduced support overhead
- Self-documenting error conditions
Files to Modify
crates/core/src/cfg_ir.rs
crates/transforms/src/util.rs
crates/core/src/decoder.rs
Priority
Medium - User experience improvement