scripts/gdb: add is_target_arch helper