Ghidra: Request: have function Prototypes update with function definition

Created on 6 Oct 2020  路  2Comments  路  Source: NationalSecurityAgency/ghidra

I don't know if this is just a question on usage and expected results or if this is a bug / feature request.

If I have created a new function definition, something like: int (*MY_FUNC)(int)

Now I drag-n-drop onto a function in the listing window onto a function like: undefined FUN_XXYYZZWW(undefined4 param_1) and it commits the types to the listing/decompiler and it becomes int MY_FUNC(int param_1)

If into further analysis I decide that doesn't return an int but rather a 4-byte enum MY_STATUS.

Is it expected that when I change function definition MY_FUNC into MY_STATUS (*MY_FUNC)(int) that the function prototype at XXYYZZWW be changed (and committed) to return MY_STATUS? Is that function actually tied (I haven't looked into API usages yet) to the function definition, or is it a one-time use on assignment?

Most helpful comment

Unfortunately it is just a one-time use assignment. Having the option to pair the definition type with a function would be great though.

All 2 comments

Unfortunately it is just a one-time use assignment. Having the option to pair the definition type with a function would be great though.

This use case has been discussed internally. We are just not there yet, as @astrelsky has indicated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tambry picture tambry  路  3Comments

0x6d696368 picture 0x6d696368  路  3Comments

gemini00 picture gemini00  路  3Comments

Kerilk picture Kerilk  路  3Comments

pd0wm picture pd0wm  路  3Comments