aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2025-04-23 21:39:28 -0700
committerKevin Buettner <kevinb@redhat.com>2025-04-24 09:54:42 -0700
commite1bedd1b21ec7c3445eafe7cb4557ff6563e7f3b (patch)
treea148be0f02371b4b83540294574c62cc36fcda07
parent8b87fe90e81f933b7c88e1ea25b02426ee3f58eb (diff)
downloadbinutils-e1bedd1b21ec7c3445eafe7cb4557ff6563e7f3b.zip
binutils-e1bedd1b21ec7c3445eafe7cb4557ff6563e7f3b.tar.gz
binutils-e1bedd1b21ec7c3445eafe7cb4557ff6563e7f3b.tar.bz2
Allow TLS access to work in gdb.server/no-thread-db.exp
The patches later in the series add GDB-internal TLS support for certain targets. This commit updates the "print foo" test in gdb.server/no-thread-db.exp to accept either a TLS failure (when libthread_db isn't available) or printing the correct answer, which will occur when GDB's internal TLS address resolution can be used. I'm making this change prior to the commits which actually add the GDB-internal TLS support in order to avoid tripping regression testers. Tested-By: Luis Machado <luis.machado@arm.com> Approved-By: Luis Machado <luis.machado@arm.com>
-rw-r--r--gdb/testsuite/gdb.server/no-thread-db.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp
index cc24708..9fd2090 100644
--- a/gdb/testsuite/gdb.server/no-thread-db.exp
+++ b/gdb/testsuite/gdb.server/no-thread-db.exp
@@ -57,6 +57,8 @@ gdb_breakpoint ${srcfile}:[gdb_get_line_number "after tls assignment"]
gdb_continue_to_breakpoint "after tls assignment"
# Printing a tls variable should fail gracefully without a libthread_db.
+# Alternately, the correct answer might be printed due GDB's internal
+# TLS support for some targets.
set re_exec "\[^\r\n\]*[file tail $binfile]"
gdb_test "print foo" \
- "Cannot find thread-local storage for Thread \[^,\]+, executable file $re_exec:\[\r\n\]+Remote target failed to process qGetTLSAddr request"
+ "= 1|(?:Cannot find thread-local storage for Thread \[^,\]+, executable file $re_exec:\[\r\n\]+Remote target failed to process qGetTLSAddr request)"