DWARF parser: remove duplicated code and fix code style in DIE extractors.