son of a gun

Slang.

noun, plural sons of guns.

a rogue; rascal; scoundrel: That son of a gun still owes me $20.
a tiresome or disagreeable matter, chore, etc.
(used as an affectionate greeting, term of address, etc.): Charlie Humpelmeyer, you old son of a gun, how are you?

interjection

(used as an exclamation of irritation, surprise, dismay, etc.).

Origin of son of a gun

1700–10; perhaps orig. the illegitimate offspring of a soldier, though later influenced by British argot gun thief; cf. gun moll

British Dictionary definitions for son of a gun

son of a gun

noun plural sons of guns

slang, mainly US and Canadian a rogue or rascal: used as a jocular form of address