  We study the dynamics of the field equations in a four-dimensional isotropic
and homogeneous spatially flat Friedmann--Lema\^{\i}tre--Robertson--Walker
geometry in the context of Einstein-Gauss-Bonnet theory with a matter source
and a scalar field coupled to the Gauss-Bonnet scalar. In this theory, the
Gauss-Bonnet term contributes to the field equations. The mass of the scalar
field depends on the potential function and the Gauss-Bonnet term. For the
scalar field potential, we consider the exponential function and the coupling
function between the scalar field and the Gauss-Bonnet scalar is considered to
be the linear function. Moreover, the scalar field can have a phantom
behaviour. We consider a set of dimensionless variables and write the field
equations into a system or algebraic-differential equations. For the latter, we
investigate the equilibrium points and their stability properties. In order to
perform a global analysis of the asymptotic dynamics, we use compactified
variables. This gravitational theory can explain the Universe's recent and past
acceleration phases. Therefore, it can be used as a toy model for studying
inflation or as a dark energy candidate.
