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

When working on a binary, you often recover types used in it from many sources:

However, it may happen that eventually you discover duplicates. For example, you find out that the “custom” structure you’ve been building up is actually a well-known type and you found the correct definition in debug info or header files. Or, after analyzing two different functions, you only find out later that two structures are, in fact, one and the same. Of course, you can go and replace all references to the “wrong” one manually, which is doable if you discover this early, but if you already have hundreds of functions or other types referring to it, the process can become tedious.

Type mapping

To map a type to another, open the Local Types window (ShiftF1), and choose “Map to another type…” from the context menu on the type you want to map.

After choosing the type to replace it, the original type is deleted and all references to it are redirected to the new one. This is indicated by the arrow sign pointing to the new type’s definition.

All uses of the old type in the function prototypes, local variable types etc. are replaced by the new type automatically.

See also:

IDA Help: Local types window