There are two simple tests to make sure dsymutil does the right thing when emitting dwarf5 for darwin platforms.
The first test, dwarf5-darwin.test checks to make sure that dsymutil generates the correct headers and sections for a darwin binary with dwarf5 in it
The second test, dwarf5-dwarf4-comb.test checks to make sure that dsymutil generates the correct headers and sections for a darwin binary with which was linked with one object file with dwarf4 and the other with dwarf 5 in it.
We can see that in this case, dsymutil will generate dwarf4 and dwarf5, it doesn't do an "upgrade" to dwarf5 for everything. This is consistent with how it behaves when linking something with dwarf4 and dwarf2 as well
Is there a type in the file name!?