Unaligned Access Detectors

You can use an unaligned access detector to determine when an unaligned memory access occurs:

 

unaligned_detector

        : unaligned

 

Unaligned accesses may be automatically handled by the operating system. By default, an unaligned access results in an information message and then is corrected so that your program can continue. (You or your system administrator can choose a different default. See uac(1) for more information.) This message looks like this:

 

Unaligned access pid=30231 <x_signals> va=0x11ffff791 pc=0x120001af4 ra=0x120001b84 inst=0xa0220000

 

You can request the debugger to detect unaligned accesses:

 

(idb) stop unaligned access

[#1: stop unaligned access]

(idb) run

Thread encountered Unaligned Access

[1] stopped at [int unalignedAccess(void):27 0x120001af8]

     27     return y;

 

Unaligned Access Detector (Linux* and Mac OS* Only)

Unaligned accesses are automatically handled and quietly corrected on Linux and Mac OS. The debugger cannot detect these events.