aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2024-04-17 19:59:01 +0100
committerPedro Alves <pedro@palves.net>2024-04-26 21:22:48 +0100
commitc7a2ee649115c78a7722fddccb5e27dbd1478a5c (patch)
tree761ca5a7b8e052a824cedb9f5fb099c75f82c688 /gdb/testsuite/gdb.threads
parentef27d39dd2c2e7b6af70884895e6d751872ae305 (diff)
downloadgdb-c7a2ee649115c78a7722fddccb5e27dbd1478a5c.zip
gdb-c7a2ee649115c78a7722fddccb5e27dbd1478a5c.tar.gz
gdb-c7a2ee649115c78a7722fddccb5e27dbd1478a5c.tar.bz2
gdb_is_target_native -> gdb_protocol_is_native
gdb_is_target_native uses "maint print target-stack", which is unnecessary when checking whether gdb_protocol is empty would do. Checking gdb_protocol is more efficient, and can be done before starting GDB and running to main, unlike gdb_is_target_native. This adds a new gdb_protocol_is_native procedure, and uses it in place of gdb_is_target_native. At first, I thought that we'd end up with a few testcases needing to use gdb_is_target_native still, especially multi-target tests that connect to targets different from the default board target, but no, actually all uses of gdb_is_target_native could be converted. gdb_is_target_native 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: Ia706232dbffac70f9d9740bcb89c609dbee5cee3 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.threads')
-rw-r--r--gdb/testsuite/gdb.threads/threads-after-exec.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.threads/threads-after-exec.exp b/gdb/testsuite/gdb.threads/threads-after-exec.exp
index 4dc71dd..32aec6b 100644
--- a/gdb/testsuite/gdb.threads/threads-after-exec.exp
+++ b/gdb/testsuite/gdb.threads/threads-after-exec.exp
@@ -38,7 +38,7 @@ proc do_test { } {
# leader detection racy") this isn't always thread 1.1.
set cur_thr [get_integer_valueof "\$_thread" 0]
- if {[istarget *-*-linux*] && [gdb_is_target_native]} {
+ if {[istarget *-*-linux*] && [gdb_protocol_is_native]} {
# Confirm there's only one LWP in the list as well, and that
# it is bound to the existing GDB thread.
set inf_pid [get_inferior_pid]