From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89732 invoked by alias); 1 Jul 2016 14:59:03 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 89695 invoked by uid 89); 1 Jul 2016 14:59:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:3216 X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 01 Jul 2016 14:58:52 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Consolidate x86 debug register code for BSD native targets. From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Fri, 01 Jul 2016 14:59:00 -0000 X-SW-Source: 2016-q3/txt/msg00099.txt.bz2 *** TEST RESULTS FOR COMMIT a3405d124e1388b613a35af49f19f0cc1b8d959d *** Author: John Baldwin Branch: master Commit: a3405d124e1388b613a35af49f19f0cc1b8d959d Consolidate x86 debug register code for BSD native targets. Move the debug register support code from amd64bsd-nat.c and i386bsd-nat.c into a shared x86bsd-nat.c. Instead of setting up x86_dr_low in amd64fbsd-nat.c and i386fbsd-nat.c, add a x86bsd_target function that creates a new target that inherits from inf_ptrace and sets up x86 debug registers if supported. In addition to initializing x86_dr_low, the x86bsd target installs a custom mourn_inferior target operation to clean up the x86 debug register state. Previously this was only done on amd64. Now it will be done for both i386 and amd64. The i386bsd_target and amd64bsd_target functions create targets that inherit from x86bsd rather than inf_ptrace. gdb/ChangeLog: * Makefile.in [HFILES_NO_SRCDIR]: Replace 'amd64bsd-nat.h' with 'x86bsd-nat.h'. * amd64bsd-nat.c: Include 'x86bsd-nat.h' instead of 'amd64bsd-nat.h'. (amd64bsd_xsave_len): Rename and move to x86bsd-nat.c. (amd64bsd_fetch_inferior_registers): Replace 'amd64bsd_xsave_len' with 'x86bsd_xsave_len'. (amd64bsd_store_inferior_registers): Likewise. (amd64bsd_target): Inherit from x86bsd_target. (amd64bsd_dr_get): Rename and move to x86bsd-nat.c. (amd64bsd_dr_set): Likewise. (amd64bsd_dr_set_control): Likewise. (amd64bsd_dr_set_addr): Likewise. (amd64bsd_dr_get_addr): Likewise. (amd64bsd_dr_get_status): Likewise. (amd64bsd_dr_get_control): Likewise. * amd64fbsd-nat.c: Include 'x86bsd-nat.h' instead of 'amd64bsd-nat.h'. (super_mourn_inferior): Move to x86bsd-nat.c. (amd64fbsd_mourn_inferior): Rename and move to x86bsd-nat.c. (amd64fbsd_read_description): Replace 'amd64bsd_xsave_len' with 'x86bsd_xsave_len'. (_initialize_amd64fbsd_nat): Remove x86 watchpoint setup and mourn_inferior' target op. * config/i386/fbsd.mh (NATDEPFILES): Add x86bsd-nat.o. * config/i386/fbsd64.mh: Likewise. * config/i386/nbsd64.mh: Likewise. * config/i386/nbsdelf.mh: Likewise. * config/i386/obsd.mh: Likewise. * config/i386/obsd64.mh: Likewise. * i386bsd-nat.c: Include 'x86bsd-nat.h'. (i386bsd_xsave_len): Rename and move to x86bsd-nat.c. (i386bsd_fetch_inferior_registers): Replace 'i386bsd_xsave_len' with 'x86bsd_xsave_len'. (i386bsd_store_inferior_registers): Likewise. (i386bsd_target): Inherit from x86bsd_target. (i386bsd_dr_get): Rename and move to x86bsd-nat.c. (i386bsd_dr_set): Likewise. (i386bsd_dr_set_control): Likewise. (i386bsd_dr_set_addr): Likewise. (i386bsd_dr_get_addr): Likewise. (i386bsd_dr_get_status): Likewise. (i386bsd_dr_get_control): Likewise. * i386bsd-nat.h (i386bsd_xsave_len): Remove. (i386bsd_dr_set_control): Remove. (i386bsd_dr_set_addr): Remove. (i386bsd_dr_get_addr): Remove. (i386bsd_dr_get_status): Remove. (i386bsd_dr_get_control): Remove. * i386fbsd-nat.c: Include 'x86bsd-nat.h'. (i386fbsd_read_description): Replace 'i386bsd_xsave_len' with 'x86bsd_xsave_len'. (_initialize_i386fbsd_nat): Remove x86 watchpoint setup and mourn_inferior' target op. * x86bsd-nat.c: New file. * x86bsd-nat.h: New file.