Honestly playing hypotheticals like that is a fools errand. A lot depends on the situation, the local laws, etc.
It also depends on where you live, in Kalifornia or the People's Socialist Republic of Illinois or the New York Police Protection District, you probably wouldn't have a (legal) gun...