Union tutorial
Suppose the source text looked like this:
We have a disassembly like this:
Let’s improve it with unions. First, let’s define an union type. For this we open the Local types view (menu View|Local types), press Ins to create an union.
We create the union using the "C syntax" tab of the "Add type" dialog:
Switching to the disassembly window, we apply the defined structure through the Edit|Operand types|Struct offset menu item and select the proper representation for the operand. In the union type case, it may be necessary to select the desired union member with the Edit|Structs|Select union member command. The final disassembly looks like this:
That’s all folks !
Last updated