public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/2] gdb.arch/amd64-gs_base.exp: Support non-Linux.
Date: Fri, 17 Feb 2023 12:02:18 -0800	[thread overview]
Message-ID: <20230217200219.87439-2-jhb@FreeBSD.org> (raw)
In-Reply-To: <20230217200219.87439-1-jhb@FreeBSD.org>

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.
---
 gdb/testsuite/gdb.arch/amd64-gs_base.exp | 10 ++++------
 1 file 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 a60e1dbe7f4..083c7c9fe1f 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"
-- 
2.38.1


  reply	other threads:[~2023-02-17 20:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 20:02 [PATCH 0/2] Fix gdb.arch/amd64-gs_base.exp test on FreeBSD John Baldwin
2023-02-17 20:02 ` John Baldwin [this message]
2023-02-17 20:02 ` [PATCH 2/2] amd64-linux-tdep: Don't treat fs_base and gs_base as system registers John Baldwin
2023-03-03 17:58 ` [PING] [PATCH 0/2] Fix gdb.arch/amd64-gs_base.exp test on FreeBSD John Baldwin
2023-03-03 19:04   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230217200219.87439-2-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).