Well what did you want him to day?
I think you went there with expectations that were far to high for a GP.
GPs are not trained to deal with eating disorders (usually) and your doctor probally knows that telling someone with an eating disorder to gain weight is like talking to a brickwall Had the doctor have said- "I want you to gain weight and come back to see me in a week"
Would you really have done it?
Would that have fixed the underlying issues that are making you do this to your self in the 1st place?
That is why you should go see a dietitian and a psychologist.
-------
Most people would rather be certain they're miserable, than risk being happy.