public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] x86_64-windows GDB crash due to fs_base/gs_base registers
Date: Fri, 29 Jun 2018 12:32:00 -0000	[thread overview]
Message-ID: <194adf0e-fce3-90af-6d07-93fab9e3d71a@redhat.com> (raw)
In-Reply-To: <20180626215333.GC8075@adacore.com>

On 06/26/2018 10:53 PM, Joel Brobecker wrote:

> ... and then decide whether we want to reorganize a bit the way
> we get the index of each register in the CONTEXT structure. I would
> say that we do want to do something. Perhaps, the path of least
> resistance is to just change the mappings structure from a C array
> to a gdb::array_view as you suggested. I may have a preference for
> the approach I took, but it is a large diff, and it's not clear
> whether it's going to be beneficial in the long run...
> 
> You pick! ;-) I'll take care of your comments if you chose the first
> patch. I'll send a new one if you prefere the gdb::array_view approach.

In all honesty, I'd just leave it alone as is, this sort of array is
used for other targets not just Windows (e.g., amd64fbsd64_r_reg_offset, 
amd64_linux_gregset32_reg_offset).  If we went for safety, we likely
wouldn't have noticed the unnecessary <unavailable> registers.
On the other hand, if we're going for safely, I'm fine with your
version too, I don't really mind your way vs array_view.  Up to you.

I do think that it would be nice if gdbserver is changed in the
same way to avoid further divergence (until some brave soul
spends time merging gdb's and gdbserver's windows-nat.c and
win32-low.c, probably the easiest backends to merge).

Thanks,
Pedro Alves

  reply	other threads:[~2018-06-29 12:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 18:55 Joel Brobecker
2018-06-25 18:55 ` [PATCH 2/2] " Joel Brobecker
2018-06-26 16:00   ` Pedro Alves
2018-06-26 21:53     ` Joel Brobecker
2018-06-29 12:32       ` Pedro Alves [this message]
2018-06-29 12:32       ` Pedro Alves
2018-06-29 22:08         ` Joel Brobecker
2018-06-25 18:55 ` [PATCH 1/2] Minor reorganization of fetch_registers/store_registers in windows-nat.c Joel Brobecker
2018-06-26 16:03   ` Pedro Alves
2018-06-26 21:41     ` Joel Brobecker

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=194adf0e-fce3-90af-6d07-93fab9e3d71a@redhat.com \
    --to=palves@redhat.com \
    --cc=brobecker@adacore.com \
    --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).