  Given symmetric matrices $A_0, A_1, \ldots, A_n$ of size $m$ with rational
entries, the set of real vectors $x = (x_1, \ldots, x_n)$ such that the matrix
$A_0 + x_1 A_1 + \cdots + x_n A_n$ has non-negative eigenvalues is called a
spectrahedron. Minimization of linear functions over spectrahedra is called
semidefinite programming. Such problems appear frequently in control theory and
real algebra, especially in the context of nonnegativity certificates for
multivariate polynomials based on sums of squares. Numerical software for
semidefinite programming are mostly based on interior point methods, assuming
non-degeneracy properties such as the existence of an interior point in the
spectrahedron. In this paper, we design an exact algorithm based on symbolic
homotopy for solving semidefinite programs without assumptions on the feasible
set, and we analyze its complexity. Because of the exactness of the output, it
cannot compete with numerical routines in practice. However, we prove that
solving such problems can be done in polynomial time if either $n$ or $m$ is
fixed.
