Consider a small column at a distance $r$ from the center of a star with a height of $\Delta r$ and a base area of $\Delta S$, a density within the column approximated to be uniform for a value $\rho(r)$, and a mass of $M(r)$ within a radius of $r$ of the star. The conditions for hydrostatic equilibrium are: $$ \Delta p = p(r + \Delta r) - p(r) $$ $$ \Delta p \Delta S = -\frac{GM(r)}{r^2}\rho(r) \Delta r \Delta S $$ Get: $$ \frac{\Delta p}{\Delta r} = -\frac{GM(r)\rho(r)}{r^2} $$ Considering the whole Sun as a shell layer, and setting the pressure at the center $r = 0$ to be $p_0$, then $\Delta p = -p_0$ and $\Delta r = R_\odot$, the density of the shell is the whole Sun's density, we have: $$ \frac{-p_0}{R_\odot} = -\frac{GM(r)\rho_\odot}{r^2} = -\frac{GM(r)}{r^2} \frac{3M_\odot}{4\pi R_\odot^3} $$
Here is the problem: some books like Astronomy - A Physical Perspective (Marc Leslie Kutner, 2ed) will subsitute $r=R_\odot$ instead of $r=0$ (center) like this:
$$ \frac{-p_0}{R_\odot} = -\frac{GM(r)\rho_\odot}{r^2} = -\frac{GM(R_\odot)}{R_\odot^2} \frac{3M_\odot}{4\pi R_\odot^3} $$
$$ p_0 \sim \frac{GM_\odot^2}{R_\odot^4} $$
But if we use $r = 0$ and it will be: $$ \frac{-p_0}{R_\odot} = -\frac{GM(r)\rho_\odot}{r^2} = -\frac{G \times 0}{0^2} \frac{3M_\odot}{4\pi R_\odot^3} $$ which is a $0 \div 0$ paradox.