From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95879 invoked by alias); 28 Jun 2016 22:57:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 95765 invoked by uid 89); 28 Jun 2016 22:56:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=HX-Greylist:0400, HX-Greylist:EDT, Hx-languages-length:1479 X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 28 Jun 2016 22:56:49 +0000 Received: from ralph.com (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 20A2AB94C for ; Tue, 28 Jun 2016 18:56:47 -0400 (EDT) From: John Baldwin 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 Message-Id: <20160628225507.80772-1-jhb@FreeBSD.org> X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00479.txt.bz2 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