Just because a woman has been impregnated, that does not turn her into some sort of breeding machine there purely for the use of the baby. The woman is a fully alive, fully functioning individual, and if her life is endangered because of the partially-alive fetus inside of her (that will certainly die if she does), she should be allowed to save herself. If the mother dies, both die. If the fetus dies, the mother lives. One life is better than two deaths.
The mother is here. The mother is on this planet already. She is a whole, living, breathing person, able to live on her own. For that reason alone, her life should be given priority over that of an unborn child. There really is no other good answer. To say that the child's life should be given precedence is to suggest that the unborn child is somehow more inherently valuable than the mother. How do we assign value to one life over another? As soon as that question is reasonably answered, then perhaps we can decide this issue for good.
As sad of a situation as that would be, I still do not believe it is decent to kill the baby just to save the mother because the baby has not had a chance to make any decisions in life unlike the mother so I think the baby should be the main concern.
The only case that a medical procedure to end the life of a baby would be necessary s if there is an ectopic pregnancy. In the case of an ectopic pregnancy, a medical abortion may be the only option to save the life of the mother, and in most ectopic pregnancies the child does end up dying before he/she is born.