Thanks for writing to us.
A pain chest in your case can be due to Pleurits (Inflammation of thin sac in which lungs are enclosed), A muscle injury
due to violent repeated cough
, a general body-ache associated with the basic pathology causing disease and may be GERD
(reflux of acid into upper food-pipe) or if your profile matches, it can have some more serious causes.
Your Doctor thought the GERD as the cause & gave you Panto-X.
I would advise you to revisit your doctor and get yourself examined because the above mentioned possibilities can be ruled out by examination only. If he has already prescribed you some pain killer , you may try it in recommended dosage, as you visit him.
Get well soon.