Thanks for posting your query.
Coughing blood is not a normal thing.
At times people confuse vomiting
blood for coughing.
Since you have assosiated pain abdomen it would be blood vomitus .
If it is fresh blood it would be cough from lungs and if dark brown it would be from stomach.
There are many causes like in case of vomitus bleeding ulcers or cancer stomach.
If blood sputum TB, Broncheictasis , Lung cancer
So do not negklect and consult a doctor as early as possible.
Hope I have answered your query.
Wishing you good health.