Your baby must be having constipation
&hard stools which are painful to pass out.
PLease try Glycerine suppository for children .Inset in anus after applying some vaseline to lubricate . Hold the buttucks & avoid expulsion for about 20 mts. this will sooth the stool & baby will be in a position to deficate.
Encourage baby to eat fibrous /nutritive food.
PL give her some b complex syrup & a mild purgative like Duphalac
suspention dose depending on her age.to soothen & normalise her digestion.