aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2024-04-17 20:43:53 +0100
committerPedro Alves <pedro@palves.net>2024-04-26 21:22:48 +0100
commit5fec7411a2b02d4623484ad089b722f8c281575e (patch)
treeb38b90695d85e34c01ffebd6a7ec5118f0b5a66f /gdb/testsuite/gdb.mi
parentc7a2ee649115c78a7722fddccb5e27dbd1478a5c (diff)
downloadgdb-5fec7411a2b02d4623484ad089b722f8c281575e.zip
gdb-5fec7411a2b02d4623484ad089b722f8c281575e.tar.gz
gdb-5fec7411a2b02d4623484ad089b722f8c281575e.tar.bz2
gdb_is_target_remote -> gdb_protocol_is_remote
This is similar to the previous patch, but for gdb_protocol_is_remote. gdb_is_target_remote and its MI cousin mi_is_target_remote, use "maint print target-stack", which is unnecessary when checking whether gdb_protocol is "remote" or "extended-remote" would do. Checking gdb_protocol is more efficient, and can be done before starting GDB and running to main, unlike gdb_is_target_remote/mi_is_target_remote. This adds a new gdb_protocol_is_remote procedure, and uses it in place of gdb_is_target_remote/mi_is_target_remote throughout. There are no uses of gdb_is_target_remote/mi_is_target_remote left after this. Those will be eliminated in a following patch. In some spots, we no longer need to defer the check until after starting GDB, so the patch adjusts accordingly. Change-Id: I90267c132f942f63426f46dbca0b77dbfdf9d2ef Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r--gdb/testsuite/gdb.mi/mi-nonstop.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-nonstop.exp b/gdb/testsuite/gdb.mi/mi-nonstop.exp
index 922f5ea..609fbec 100644
--- a/gdb/testsuite/gdb.mi/mi-nonstop.exp
+++ b/gdb/testsuite/gdb.mi/mi-nonstop.exp
@@ -126,7 +126,7 @@ mi_gdb_test "-thread-select 2" "\\^done.*" "select first worker thread"
mi_gdb_test "-gdb-set --thread 3 variable exit_first_thread=1" ".*\\^done" "ask the second thread to exit"
set test "wait for thread exit"
-if { [mi_is_target_remote] } {
+if { [gdb_protocol_is_remote] } {
# The remote protocol doesn't have support for thread exit
# notifications.
unsupported $test