The verifier builds a list of all "possible" names of a variable and then
verifies that the name inside __debug_names is one of those possible names.
For a nameless variable, the list is empty, but its name in the accelerator
table is "", so that logic fails.
One could also question whether accelerator table entries with an empty name
should be valid to begin with. The specification says that:
- All other debugging information entries without a DW_AT_name attribute are
- excluded.
But it also says that:
- DW_TAG_variable debugging information entries with a DW_AT_location attribute
- that includes a DW_OP_addr or DW_OP_form_tls_address operator are included;
- otherwise, they are excluded.
So it's not clear which rules takes precedence. Changing the logic to skip
generating entries in this case is likely more complex and probably deserves its
own discussion, as such this commit proposes making the verifier "clean" first:
its logic is arguably buggy and if we want to forbid empty names the verifier
implementation should check for that explicitly, not in this very implicit way.