public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: x86_64-windows GDB crash due to fs_base/gs_base registers
Date: Mon, 25 Jun 2018 18:55:00 -0000	[thread overview]
Message-ID: <1529952947-48942-1-git-send-email-brobecker@adacore.com> (raw)

Hello,

Here are two patches aimed at fixing a crash in GDB when debugging
on native windows targets. The crash only occurs when trying to access
the fs_base/gs_base register, but is fairly easy to trigger, as any
function call will cause that. "info reg" will also trigger it.

When I saw this failure, it made me realize that I found the current
code to be quite fragile, and I wasn't surprised once I understood
the situation that it eventually lead to this crash. As a result,
I decided to implement the register fetch/store code a bit differently.
As such, I did the work in two steps, hence the two patches.

    [PATCH 1/2] Minor reorganization of fetch_registers/store_registers
    [PATCH 2/2] x86_64-windows GDB crash due to fs_base/gs_base registers

Both patches were tested on x86-windows and x86_64-windows, using
AdaCore's testsuite.

Let me know what you think of the approach and choices taken in those
two patches.

Thanks!
-- 
Joel

             reply	other threads:[~2018-06-25 18:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 18:55 Joel Brobecker [this message]
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
2018-06-29 22:08         ` Joel Brobecker
2018-06-29 12:32       ` Pedro Alves
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=1529952947-48942-1-git-send-email-brobecker@adacore.com \
    --to=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).