Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/2] Fix x86 debug registers on FreeBSD with threads
Date: Tue, 28 Jun 2016 22:57:00 -0000	[thread overview]
Message-ID: <20160628225507.80772-1-jhb@FreeBSD.org> (raw)

The pan-BSD x86 debug register support code was only setting the
debug registers on the current LWP identified by inferior_ptid.
This fixes the code to set the debug registers on all of the LWPs
belonging to the current inferior on each change.

One question I have is that the amd64 x86 debug register code was 
invoking x86_cleanup_dregs in the mourn_inferior target op, but
the x86 linux native code calls this in the post_startup_inferior
target op instead.  Any ideas as to why they are different?

John Baldwin (2):
  Consolidate x86 debug register code for BSD native targets.
  Set debug registers on all threads belonging to the current inferior.

 gdb/ChangeLog              |  65 +++++++++++++++++++
 gdb/Makefile.in            |   2 +-
 gdb/amd64bsd-nat.c         |  90 ++------------------------
 gdb/amd64bsd-nat.h         |  38 -----------
 gdb/amd64fbsd-nat.c        |  33 +---------
 gdb/config/i386/fbsd.mh    |   4 +-
 gdb/config/i386/fbsd64.mh  |   2 +-
 gdb/config/i386/nbsd64.mh  |   2 +-
 gdb/config/i386/nbsdelf.mh |   2 +-
 gdb/config/i386/obsd.mh    |   2 +-
 gdb/config/i386/obsd64.mh  |   2 +-
 gdb/i386bsd-nat.c          |  95 ++-------------------------
 gdb/i386bsd-nat.h          |  15 -----
 gdb/i386fbsd-nat.c         |  18 +-----
 gdb/x86bsd-nat.c           | 156 +++++++++++++++++++++++++++++++++++++++++++++
 gdb/x86bsd-nat.h           |  31 +++++++++
 16 files changed, 280 insertions(+), 277 deletions(-)
 delete mode 100644 gdb/amd64bsd-nat.h
 create mode 100644 gdb/x86bsd-nat.c
 create mode 100644 gdb/x86bsd-nat.h

-- 
2.8.4


             reply	other threads:[~2016-06-28 22:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 22:57 John Baldwin [this message]
2016-06-28 22:57 ` [PATCH 2/2] Set debug registers on all threads belonging to the current inferior John Baldwin
2016-06-28 22:57 ` [PATCH 1/2] Consolidate x86 debug register code for BSD native targets John Baldwin
2016-07-01 13:02 ` [PATCH 0/2] Fix x86 debug registers on FreeBSD with threads Pedro Alves
2016-07-01 14:58   ` 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=20160628225507.80772-1-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