How to re-parent a bone? I have rigged a gun, but the bones/armature is attached to the wrong bone.

I need to move all the bones which are meant for the gun to a different bone.

Images which explain the problem:
I guess you mean the way to change parent of a bone: