Did Buddha go through the stages of sotapanna/sakadagami/anagami before his enlightenment? Or did he go straight from a normal person to an arahant and a Buddha during the night of his enlightenment?
The orthodox Theravada interpretation is that he went through all four stages.
[I]n the course of his long wanderings in samsāra, the bodhisatta had been to all the realms except the five suddhāvāsa realms which are meant only for those who have attained anāgāmi stage. The bodhisatta usually attains all the four stages on the path only in his last existence.
-- Mahasi Sayadaw, Discourse on Paticcasamuppada
N.B. I assume "usually" above is a mistranslation; it is not usually, it is always the case AFAIK.