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
Remove c keywords when parsing function signatures #6462
base: master
Are you sure you want to change the base?
Conversation
It is not a C Parser. How do you expect it to handle something like |
The same way it did before. All the changes here do is remove the C keywords Ghidra doesn't support. I don't know why I didn't specify this initially. Sorry about that. |
Sorry, I forgot that the parser handled some C cases like "unsigned int" based upon specific cases defined by the DataTypeUtilities.cPrimitiveMap. So it appears to already support some C-specific syntax.
|
It may be preferable to handle this within the DataTypeUtiliies.getCPrimitiveDataType method so it be handled as a leading modifier which can be ignored.
|
The "struct" and "union" keywords need to be handled special and should agree with any resulting datatype instead of simply being ignored. These cannot be handled in the same manner as the others which can be ignored.
|
The "inline" modifier should probably be handled separately so that it can toggle the function's inline flag and should not apply to all data type parsing
|
If you prefer, I can add this to my cue and address in a more appropriate fashion.
|
That's fine with me.
I'm not convinced it should. Mainly because if it is a separate function in the resulting program, then the compiler decided not to inline it and it actually is a function call in the original code. |
This makes life much easier since you can just copy/paste the signature from source.