Unified framework to determine Gaussian states in continuous-variable systems