[gdb/testsuite] Add test-case gdb.dlang/dlang-start-2.exp
For test-case gdb.dlang/dlang-start.exp, I run into:
...
UNSUPPORTED: gdb.dlang/dlang-start.exp: require failed: can_compile d
...
My distro has no support for gdc, but I'd like to have the test-case
running and passing, so let's rewrite the test-case using dwarf assembly
and add it alongside (rather than replacing it, because it's good to use
actual compiler output if we have it available).
My distro does have a package providing dmd, so let's mimic that debug info in
the dwarf assembly. This gives us:
...
(gdb) start ^M
Temporary breakpoint 1 at 0x4004ab^M
Starting program: dlang-start-2 ^M
^M
Temporary breakpoint 1, 0x00000000004004ab in _Dmain ()^M
...
The "_Dmain ()" should probably be "D main", I've filed PR30276 about that.
Also add a "show language" to check that we automatically set the language
correctly to D.
Note that the dwarf assembly also describes main, otherwise the test-case
doesn't function as regression test for commit
47fe57c9281 ("Fix "start" for
D, Rust, etc").
Tested on x86_64-linux.