I'm about to overhaul dmd's DWARF information and will try to fix the outstanding issues. It seems (subjective) that the current state is worse than a year ago. So in any case we'll need a test suite to avoid regressions. In the best case we find/write a tool that verifies correct debug information. Otherwise we could try to automate gdb sessions but this is probably a very slow test.
A simple solution would be to process the output of readelf or dwarfdump.
$50 bounty placed
Martin, wouldn't that be very DMD-specific? Only ask because currently I'm in the process of writing a lot of tests for the GDB testsuite to ensure that GDB behaves correctly for both gdb sessions and evaluating expressions sent to GDB.
Yeah, that could easily turn into somethin DMD specific.
FYI https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=tree;f=gdb/testsuite/gdb.dlang;h=fde38f338eed0fd0555bc808dd0efc9ee0df1362;hb=HEAD This will grow as I continue adding D support into gdb.
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c775004af512810da1048f42df6cf6f9d2de4cba fix Issue 11530 - need gdb test suite - support gdb in d_do_test tool - add a basic test and 2 regression tests https://github.com/D-Programming-Language/dmd/commit/2d6fc0e4819e9bf6c7c1a5e9affde44f3cedd3b8 Merge pull request #4475 from MartinNowak/gdb_tests fix Issue 11530 - need gdb test suite
Commit pushed to 2.067 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c733d5cf5796f3fa744f690ee633d2a985cc238f Merge pull request #4475 from MartinNowak/gdb_tests fix Issue 11530 - need gdb test suite
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c733d5cf5796f3fa744f690ee633d2a985cc238f Merge pull request #4475 from MartinNowak/gdb_tests
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c775004af512810da1048f42df6cf6f9d2de4cba fix Issue 11530 - need gdb test suite https://github.com/D-Programming-Language/dmd/commit/2d6fc0e4819e9bf6c7c1a5e9affde44f3cedd3b8 Merge pull request #4475 from MartinNowak/gdb_tests