In IDA’s disassembly, you may have often observed names that may look strange and cryptic on first sight: sub_73906D75, loc_40721B, off_40A27C and more. In IDA’s terminology, they’re called dummy names. They are used when a name is required by the assembly syntax but there is nothing suitable available, for example the input file has no debug information (i.e. it has been stripped), or when referring to a location not present in the debug info. These names are not actually stored in the database but are generated by IDA on the fly, when printing the listing.
The dummy name consists of a type-dependent prefix and a unique suffix which is usually address-dependent. The following prefixes are used in IDA:
sub_ instruction, subroutine(function) startlocret_ a return instructionloc_ other kind of instructionoff_ data, contains an offset(pointer) valueseg_ data, contains a segment address valueasc_ data, start of a string literalbyte_ data, byteword_ data, 16-bitdword_ data, 32-bitqword_ data, 64-bitbyte3_ data, 3-bytexmmword_ data, 128-bitymmword_ data, 256-bitpackreal_ data, packed realflt_ floating point data, 32-bitdbl_ floating point data, 64-bittbyte_ floating point data, 80-bitstru_ structurecustdata_ custom data typealgn_ alignment directiveunk_ unexplored (undefined, unknown) byteBecause the prefixes are treated in a special way by IDA, they’re reserved and cannot be used in user-defined names. If you try to use such a name, you’ll get an error from IDA:
Warning: can’t rename byte because the name has a reserved prefix
A possible workaround is to add an underscore at the start so the prefix is different. But if you want to get rid of an existing name and have IDA use a dummy name again, just delete it (rename to an empty string).
The default suffix is the linear (aka effective) address of the item to which the dummy name is attached. However, this is not the only possibility. By using the Options > Name representation… dialog, you can choose something different.
Dummy name representation dialog
The options from the first half can be especially useful when dealing with segmented programs such as 16-bit DOS software; instead of a global linear address you can see the segment and the offset inside it so, for example, it is evident when the destination is in another segment.
DOS program when using “segment name & offset from the segment base” representation
In addition to dummy names, there are two other kinds of autogenerated names that are used in IDA:
var_) and arguments (arg_). aException for “exception”)The stack prefixes are hardcoded and not configurable but the latter can be configured in Options > General…, Strings tab.
Strings options
Unlike the dummy names, these names are stored in the database marked as autogenerated so their prefixes are not considered reserved and you can use them in custom names.