There's a handful of DWARF parsers up on GitHub in various languages:
Code:
https://github.com/search?q=dwarf
(You will need to weed through all the Dwarf Fortress side projects but there are a handful available on there.)
One I've had success with in the past:
Code:
https://github.com/seilweiss/dwarf2cpp