Debug: Improve trap implementation for on ARM