Rewrite OSDebug for arm and arm64