Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alllow to specify the "default" type for each size in SDB #4618

Open
XVilka opened this issue Sep 6, 2024 · 3 comments
Open

Alllow to specify the "default" type for each size in SDB #4618

XVilka opened this issue Sep 6, 2024 · 3 comments

Comments

@XVilka
Copy link
Member

XVilka commented Sep 6, 2024

Currently, if Rizin needs to flip the sign of the type during the analysis using the rz_type_integral_set_sign() function, it calls internally rz_type_typeclass_get_default_sized() which internally just chooses first type of the selected typeclass and size without any preference, thus it largely depends on the loading order. We should find a way to specify the "defaultness" property of the type somehow. Maybe by introducing a new typeclass Default?

If we introduce new Defaullt typeclass, then the parser and code in librz/type/typeclass.c should be changed to allow the sum of typeclasses, e.g. Signed Integral + Default where it belongs to exactly two typeclasses: Signed Integral and Default.

@wargio
Copy link
Member

wargio commented Sep 6, 2024

yes it should. ghidra has those unknown8/16/32/64

@wargio
Copy link
Member

wargio commented Sep 6, 2024

check what the clangd language server does for this.

@XVilka
Copy link
Member Author

XVilka commented Sep 6, 2024

yes it should. ghidra has those unknown8/16/32/64

We already have unknown_t, it's not a problem. Problem that the default should be either intXX_t or uintXX_t or float depending on the sign and typeclass.

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

No branches or pull requests

2 participants