public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Mask x86 segment registers in Windows gdbserver
Date: Wed, 20 Dec 2023 14:03:12 -0800	[thread overview]
Message-ID: <3c3d8d0c-8e61-46c0-88d5-fecce4112b59@FreeBSD.org> (raw)
In-Reply-To: <20231219144823.1070597-1-tromey@adacore.com>

On 12/19/23 6:48 AM, Tom Tromey wrote:
> A test internal to AdaCore prints the segment registers.  When run
> using gdbserver, it shows:
> 
>      (gdb) print /x $gs
>      $6 = 0x2b0000
> 
> However, the segment registers are only 16 bits -- so this has some
> invalid bits.
> 
> gdb's windows-nat.c has long had a fix for this problem.  This patch
> applies the fix to gdbserver as well.

LGTM.  Treating the x86 seg regs as 32-bits has required workarounds in
various places, but not easily fixable unfortunately.

Reviewed-By: John Baldwin <jhb@FreeBSD.org>

-- 
John Baldwin


  reply	other threads:[~2023-12-20 22:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 14:48 Tom Tromey
2023-12-20 22:03 ` John Baldwin [this message]
2023-12-21 20:29   ` Tom Tromey
2024-01-18 18:51     ` Tom Tromey
2024-01-22 16:57       ` John Baldwin

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=3c3d8d0c-8e61-46c0-88d5-fecce4112b59@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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).