I use this little gdb-script to determine the current state from the CPSR field, just put it in your ~ / .gdbinit file and call arm_isa if necessary.
define arm_isa
if ($cpsr & 0x20)
printf "Using THUMB(2) ISA\n"
else
printf "Using ARM ISA\n"
end
end
It checks bit 5 in cpsr, which indicates the current state and displays the used ISA.
source
share