Use clean_restart in gdb.dlang
authorTom Tromey <tom@tromey.com>
Wed, 25 Jan 2023 16:26:53 +0000 (09:26 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 27 Jan 2023 01:28:31 +0000 (18:28 -0700)
Change gdb.dlang to use clean_restart more consistently.

gdb/testsuite/gdb.dlang/demangle.exp
gdb/testsuite/gdb.dlang/expression.exp
gdb/testsuite/gdb.dlang/primitive-types.exp
gdb/testsuite/gdb.dlang/properties.exp

index 111042cbe7819dd766b22d41fc695d8c955d85f2..c0ae92537e6fce143420b13f7a6b3b6a2a51890d 100644 (file)
@@ -195,10 +195,7 @@ proc test_d_demangling {} {
     test_demangling "_D3std6socket23UnknownAddressReference6__ctorMFPS4core3sys5posix3sys6socket8sockaddrkZC3std6socket23UnknownAddressReference" "std.socket.UnknownAddressReference.this(core.sys.posix.sys.socket.sockaddr*, uint)"
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
+clean_restart
 
 if [set_lang_d] {
     gdb_test_no_output "set width 0"
index 2f80b3390a053610e1b020b60e8cb6e1b067abe4..c7aeec52d25afa3a01e05314f69424e75850a71f 100644 (file)
@@ -127,10 +127,7 @@ proc test_d_expressions {} {
     gdb_test "print \[1, 2\] ~ \[2, 3\]" " = \\\{1, 2, 2, 3\\\}"
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
+clean_restart
 
 if [set_lang_d] {
     test_d_integer_literals
index 3fd6d2d6e4139e7929ebcbd1ad0baf2cd2ec7657..7b284bad2f02189440305ab3f3302e09f72f4872 100644 (file)
@@ -49,10 +49,7 @@ proc test_builtin_d_types_accepted {} {
     gdb_test "ptype dchar" "type = dchar"
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
+clean_restart
 
 if [set_lang_d] {
     test_builtin_d_types_accepted
index 474c18b31778a48ca6d6029a5801b4c49c110c7f..3b92a81e2ca05a41b7af1ae35547fd48eceffbe8 100644 (file)
@@ -80,10 +80,7 @@ proc test_d_typeof {} {
     gdb_test "ptype typeof(7.0f ^^ 3)" "type = float"
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
+clean_restart
 
 if [set_lang_d] {
     test_d_sizeof