Local Types

The options below appear when the Edit menu is opened from the Local Types View. In other views, the menu adapts dynamically and may show a different set of options.

Below is an overview of all actions that can be accessed from this menu.

UI Action Name
Action Name
Applies to
Description

Copy

EditCopy

Enum, Structure, Typedef

Copy

Copy full type(s)

CopyFullType

Enum, Structure, Typedef

Copies the full type(s) and its dependencies

Undo

UndoAction

Enum, Structure, Typedef

This command reverts the database to the state before executing the last user action. More…

Redo

RedoAction

Enum, Structure, Typedef

This command reverts the previously issued Undo command. More…

Add type...

TilAddType

Enum, Structure, Typedef

Create a structure, union, or enumeration

Delete type...

TilDelType

Enum, Structure, Typedef

Delete a type

Edit type...

TilEditType

Enum, Structure, Typedef

Open type editor for type

Add enum member...

MakeData

Enum, Structure

Convert to data. More…

Delete type member

TilDelTypeMember

Enum, Structure

Delete a type member

Change calling convention...

FuncChangeCC

Enum

Change calling convention

Rename

MakeName

Enum, Structure, Typedef

Rename the current location. More…

Edit enum member...

TilEditConst

Enum

Edit a symbolic constant

Edit location...

EditArgloc

Enum

Edit argument location

Show arguments location

ToggleArgloc

Enum

Show arguments location

Enter comment...

TilMakeComment

Enum, Structure, Typedef

Enter a comment

Toggle leading zeroes

ToggleLeadingZeroes

Enum, Structure

Toggle leading zeroes. More…

C-like format

TilCSyntax

Enum, Structure, Typedef

Toggle between assembly & C-like representation

Undo

This command reverts the database to the state before executing the last user action. It is possible to apply Undo multiple times, in this case multiple user actions will be reverted.

Please note the entire database is reverted, including all modifications that were made to the database after executing the user action and including the ones that are not connected to the user action. For example, if a third party plugin modified the database during or after the user action, this modification will be reverted. In theory it is possible to go back in time to the very beginning and revert the database to the state that was present immediately after performing the very first user action. However, in practice the undo buffers overflow because of the changes made by autoanalysis.

Autoanalysis (Options → General... → Analysis) generates copious amounts of undo data. Also, please note that maintaining undo data during autoanalysis slows it down a bit. In practice, it is not a big deal because the limit on the undo data is reached quite quickly (in a matter of minutes). Therefore, if during analysis the user does not perform any actions that modify the database, the undo feature will turn itself off temporarily.

However, if you prefer not to collect undo data at all during the initial autoanalysis, just turn off the UNDO_DURING_AA parameter in ida.cfg.

The configuration file ida.cfg has 2 more undo-related parameters:

Parameter
Description
Default

UNDO_MAXSIZE

Max size of undo buffers. Once this limit is reached, the undo info about the oldest user action will be forgotten.

128MB

UNDO_DEPTH

Max number of user actions to remember. If set to 0, the undo feature will be unavailable.

1000000

Since there is a limit on the size of undo buffers, any action, even the tiniest, may become non-undoable after some time. This is true because the analysis or plugins may continue to modify the database and overflow the buffers. Some massive actions, like deleting a segment, may be non-undoable just because of the sheer amount of undo data they generate.

Please note that Undo does not affect the state of IDC or Python scripts. Script variables will not change their values because of Undo. Also nothing external to the database can be changed: created files will not be deleted, etc.

Some actions cannot be undone. For example, launching a debugger or resuming from a breakpoint cannot be undone.

Redo

This command reverts the previously issued Undo command. It is possible to use Redo multiple times.

This command also reverts all changes that were done to the database after the last Undo command, including the eventual useful modifications made by the autoanalysis. In other words, the entire database is modified to get to the exact state that it had before executing the last Undo command.

Add enum member...

Convert to data. This command converts the current unexplored bytes to data. If it is not possible, IDA will warn you.

Multiple using of this command will change the data type:

You may remove some items from this list using the Setup data types... command (action SetupData).

If the target assembler (Options → General... → Analysis) does not support double words or another data type, it will be skipped. To create a structure variable, use the Struct var... command (action DeclareStructVar). To create an array, use the Array... command (action MakeArray). To convert back, use the Undefine command (action MakeUnknown).

Rename

Rename the current location. This command gives name/renames/deletes name for the current item.

To delete a name, simply give an empty name.

If the current item is referenced, you cannot delete its name. Even if you try, IDA will generate a dummy name (See Options → Name representation...).

List of available options:

  • Local name: The name is considered to be defined only in the current function. Please note that IDA does not check the uniqueness of the local names in the whole program. However, it does verify that the name is unique for the function.

  • Include in name list: Here you can also include/remove the name from the name list (see the Jump by name... command; action JumpName). If the name is hidden, you will not see it in the names window.

  • Public name: You can declare a name as a public (global) name. If the current assembler supports the "public" directive, IDA will use it. Otherwise, the publicness of the name will be displayed as a comment.

  • Autogenerated name: An autogenerated name will appear in a different color. If the item is indefined, it will disappear automatically.

  • Weak name: You can declare a name as a weak name. If the current assembler supports the "weak" directive, IDA will use it. Otherwise, the weakness of the name will be displayed as a comment.

  • Create name anyway: If this flag is on, and if the specified name already exists, IDA will try to variate the specified name by appending a suffix to it.

Toggle leading zeroes

Toggle leading zeroes.

This command displays or hides the leading zeroes of the current operand. Example: if the instruction looked like this:

then after applying the command it will look like this:

If you prefer to see leading zeroes in all cases, then open the calculator and enter the following expression: set_inf_attr (INF_GENFLAGS, get_inf_attr(INF_GENFLAGS) | INFFL_LZERO); This will toggle the default for the current database and all numbers without leading zeroes will become numbers with leading zeroes, and vice versa. See also Edit|Operand types submenu.

Last updated

Was this helpful?