diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-25 10:01:57 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-01-26 18:28:31 -0700 |
commit | 3ad2b4af38e38e10166906f5238db098c886e1f9 (patch) | |
tree | aa55aee7360c36a19d55494eca86288b12108a5a /gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp | |
parent | d6acf25c03f8c507e134f7438bd4360464ce111e (diff) | |
download | binutils-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.dwarf2/dw2-opt-structptr.exp')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp index ae6c58f..0d54947 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp @@ -168,20 +168,13 @@ proc do_mi_test {} { set MIFLAGS "-i=mi" global mi_gdb_prompt - global srcdir - global subdir global binfile with_test_prefix "mi" { - gdb_exit - if {[mi_gdb_start]} { - return -1 + if {[mi_clean_restart $binfile]} { + return } - mi_delete_breakpoints - mi_gdb_reinitialize_dir $srcdir/$subdir - mi_gdb_load $binfile - # This causes GDB to dereference a pointer-to-structure when doing # -var-create. mi_gdb_test "-gdb-set print object on" ".*" "set print object on" |