Latest available version: IDA and decompilers v8.4.240215 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon

We already know that user-defined types such as structures and enums can be created and edited through the corresponding views, or the Local Types list.

However, some small edits can be performed directly in the pseudocode view:

  1. structure fields can be renamed using the “Rename” action (shortcut N):
  2. you can also quickly retype them using the “Set type” action (Y):

    NB: the neighboring fields are automatically overwritten if the size of the field increases so use Undo to revert if necessary.

These actions also work on stack variables because they behave like fields of the stack frame structure.

If you prefer to use the free-form C syntax editor to see and edit the whole structure, you can quickly navigate to the type using the “Jump to local type” action from the context menu and then use “Edit” (CtrlE) on the type’s entry:

See also:

Igor’s tip of the week #99: Enums

Igor’s tip of the week #42: Renaming and retyping in the decompiler

Igor’s tip of the week #11: Quickly creating structures