aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-stack.exp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-25 10:01:57 -0700
committerTom Tromey <tom@tromey.com>2023-01-26 18:28:31 -0700
commit3ad2b4af38e38e10166906f5238db098c886e1f9 (patch)
treeaa55aee7360c36a19d55494eca86288b12108a5a /gdb/testsuite/gdb.mi/mi-stack.exp
parentd6acf25c03f8c507e134f7438bd4360464ce111e (diff)
downloadbinutils-3ad2b4af38e38e10166906f5238db098c886e1f9.zip
binutils-3ad2b4af38e38e10166906f5238db098c886e1f9.tar.gz
binutils-3ad2b4af38e38e10166906f5238db098c886e1f9.tar.bz2
Use mi_clean_restart more
This changes a number of MI tests to use mi_clean_restart rather than separate calls. This reduces the number of lines, which is nice, and also provides a nicer model to copy for future tests.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-stack.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-stack.exp12
1 files changed, 3 insertions, 9 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 3359a87..633e090 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -25,11 +25,6 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
@@ -37,10 +32,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
proc test_stack_frame_listing {} {
global mi_gdb_prompt