aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-03-06 16:47:03 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2023-03-06 16:47:03 -0800
commitb1453f150c08b31e9c057224e523a721958fde02 (patch)
treeeb9e95e77f146173e7d9b14f4eb7c38638c177a0
parenta06baa832c9be15ddc397336e093c657f347565c (diff)
downloadbinutils-b1453f150c08b31e9c057224e523a721958fde02.zip
binutils-b1453f150c08b31e9c057224e523a721958fde02.tar.gz
binutils-b1453f150c08b31e9c057224e523a721958fde02.tar.bz2
gdb.arch/amd64-gs_base.exp: Support non-Linux.
The orig_rax pseudo-register is Linux-specific and isn't relevant to this test. The fs_base and gs_base registers are also not treated as system registers in other OS ABIs. This allows the test to pass on FreeBSD. Reviewed-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/testsuite/gdb.arch/amd64-gs_base.exp10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.arch/amd64-gs_base.exp b/gdb/testsuite/gdb.arch/amd64-gs_base.exp
index a60e1db..083c7c9 100644
--- a/gdb/testsuite/gdb.arch/amd64-gs_base.exp
+++ b/gdb/testsuite/gdb.arch/amd64-gs_base.exp
@@ -32,14 +32,12 @@ gdb_test "print /x \$gs_base" "= $hex" "print gs_base"
gdb_test "print \$fs_base = 2" "= 2" "set fs_base"
gdb_test "print \$gs_base = 3" "= 3" "set gs_base"
-# Test the presence of fs_base and gs_base on the system
-# register group and values.
+# Test the fs_base and gs_base values.
#
set ws "\[\t \]+"
-set info_reg_out [multi_line "info register sys" \
+set info_reg_out [multi_line "info register fs_base gs_base" \
"fs_base${ws}0x2${ws}2"\
- "gs_base${ws}0x3${ws}3"\
- "orig_rax${ws}$hex${ws}\[-\]$decimal" ]
+ "gs_base${ws}0x3${ws}3" ]
-gdb_test "info register sys" $info_reg_out\
+gdb_test "info register fs_base gs_base" $info_reg_out\
"info registers fs_base and gs_base with value"