Ive trained in many aikido dojo's which practice aikido disarming tecniques. In every cased their always taught, to weigh up the need to defend yourself. ie if he wants your wallet give it to him etc. If in some scenario you knew he would kill you then you would have to do something about it. It is something you as the student has to decide...how far would it need to go?
The one we regularly practice is you somehow talk your way into the attacker until he/she has the gun near your head. You keep on talking to give a distraction, like 'i have the keys to my ferrari in my pocket' then you flick the gun to one side moving your head the other way and use hiji-shime on the arm to control the gun. Then we take the gun, get the attacker in sankajo and walk him to the police station. OK we dont do the last bit really! The fact is while walking in the attacker might shoot you....bang no martial art tecnique can help you. Not even the ninja turtles could do anything.
Luckly the uk is very strict on firearms, the public aint allowed them, but thats another big debate.