Skip to content

Fix slothy-cli parser to accept "flags" as register name#311

Draft
mkannwischer wants to merge 1 commit into
mainfrom
slothy-cli-flags
Draft

Fix slothy-cli parser to accept "flags" as register name#311
mkannwischer wants to merge 1 commit into
mainfrom
slothy-cli-flags

Conversation

@mkannwischer
Copy link
Copy Markdown
Collaborator

Remove RegisterType.from_string() conversion that was converting register names like "flags" to enums, causing AttributeError when the rest of the codebase expects strings. Also allow list-to-set type conversion.

Fixes #208

Remove RegisterType.from_string() conversion that was converting register
names like "flags" to enums, causing AttributeError when the rest of the
codebase expects strings. Also allow list-to-set type conversion.

Fixes #208
@mkannwischer
Copy link
Copy Markdown
Collaborator Author

@hanno-becker - I am unsure if this is the right fix.
The

       # Try to parse as RegisterType
        ty = arch.RegisterType.from_string(val)
        if ty is not None:
            logger.debug("Value %s parsed as RegisterType", val)
            return ty

never seemed to have worked as intended - at least for the outputs.
But I am unsure if this does break anything for any other case and we have very little CI for the slothy-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix slothy-cli command line parser to accept "flags" as a register name

1 participant