binutils-gdb/gdb/testsuite/gdb.dlang
Tom de Vries 2b3f4c0616 [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 47fe57c928 ("Fix "start" for
D, Rust, etc").

Tested on x86_64-linux.
2023-03-27 13:47:51 +02:00
..
circular.c
circular.exp Rename to allow_d_tests 2023-01-13 13:18:57 -07:00
debug-expr.exp Rename to allow_d_tests 2023-01-13 13:18:57 -07:00
demangle.exp Use clean_restart in gdb.dlang 2023-01-26 18:28:31 -07:00
dlang-start-2.exp [gdb/testsuite] Add test-case gdb.dlang/dlang-start-2.exp 2023-03-27 13:47:51 +02:00
dlang-start.exp [gdb/testsuite] Handle missing gdc in gdb.dlang/dlang-start.exp 2023-03-27 11:35:26 +02:00
dmain.c [gdb/testsuite] Add test-case gdb.dlang/dlang-start-2.exp 2023-03-27 13:47:51 +02:00
expression.exp Use clean_restart in gdb.dlang 2023-01-26 18:28:31 -07:00
primitive-types.exp Use clean_restart in gdb.dlang 2023-01-26 18:28:31 -07:00
properties.exp Use clean_restart in gdb.dlang 2023-01-26 18:28:31 -07:00
simple.d Fix "start" for D, Rust, etc 2023-02-18 15:41:38 -07:00
watch-loc.c
watch-loc.exp Rename to allow_d_tests 2023-01-13 13:18:57 -07:00