But modern dogs have evolved to digest starch far more efficiently that wolves, which are solely carnivores.
To trace how this modern digestive trait came about, researchers from France, Russia, Sweden and Romania analysed the DNA from 13 ancient dog remains from across Europe and Asia, dating back 15,000 years.
They were able to track one gene in particular through the timeline of sample as it spread, leaving a trail of genetic breadcrumbs marking their adaption to living alongside humans.
Their analysis showed that between 7,000 and 4,000 years ago, some dogs started to have more copies of the Amy2B gene.
Dogs need this gene to make amylase, which breaks down starch into sugar.
As farming spread from the Middle East throughout Europe from 6,000 years ago, hunter gatherers adopted the practice, with their diets changing to include more starchy grains.
The genetic changes seen in dogs, say the researchers, ties in with a switch in their diet as they ate scraps from early farmers.
According to the researchers, the findings show how the introduction of farming directly affected the evolution of dogs.
Morgane Ollivier, from the École normale supérieure in Lyon and lead author of the study, told MailOnline: "This duplication is associated with a higher amylase activity meaning a better ability to digest starch. This suggests that dogs have adapted to a diet richer in starch, relative to the carnivorous wolf diet."
She adds: "[The finding] is important because it definitely rules out the possibility for it to be very recent, i. e. during the dog breed formation in the last centuries."
Writing in a paper in the Royal Society's Open Science journal, the authors explain: "This expansion reflects a local adaptation that allowed dogs to thrive on a starch rich diet, especially within early farming societies, and suggests a bio-cultural co-evolution of dog genes and human culture."
Similar spreads of genes can be seen as marker of human evolution as well.
As farming was introduced, varieties of genes better at breaking down starch spread through groups with selective pressure.
The researchers add: "The history of the Amy2B expansion in dogs suggests that the genes responsible for digestion in both humans and dogs probably underwent similar changes."
What's more, they explain that a host of other genes could be waiting to be found in the Dog DNA, which could show how man and his dog evolved together over thousands of years.
Humans and dogs evolved together
The latest study shows co-evolution of humans and dogs, as they adapted to a radical change in diet.
When dogs were first domesticated - more than 15,000 years ago - their wolf-like ancestor would have scavenged meat scraps from hunter gatherers.
But modern dogs are able to digest starch far more efficiently than wolves.
DNA samples of ancient dog species from Europe and Asia revealed that genes for starch digesting enzymes became more widespread in dogs around 7,000 years ago.
This coincides with the introduction of farming in Europe around 6,000 years ago.
According to the researchers, the findings show how the introduction of farming directly affected the evolution of dogs.