In my earlier C++-ization patch for file_and_directory, I introduced
an error:
- if (strcmp (fnd.name, "<unknown>") != 0)
+ if (fnd.is_unknown ())
This change inverted the sense of the test, which causes failures with
.debug_names.
This patch fixes the bug. Regression tested on x86-64 Fedora 34. I
also tested it using the AdaCore internal test suite, with
.debug_names -- this was failing before, and now it works.
file_and_directory &fnd = find_file_and_directory (comp_unit_die, cu);
int offset = 0;
- if (fnd.is_unknown ())
+ if (!fnd.is_unknown ())
++offset;
else if (lh == nullptr)
return;