Sensitivity of helioseismic gravity modes to the dynamics of the solar core