From patchwork Wed Nov 22 19:02:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 24450 Received: (qmail 16824 invoked by alias); 22 Nov 2017 19:03:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 16805 invoked by uid 89); 22 Nov 2017 19:03:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=general-purpose, generalpurpose, laid X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Nov 2017 19:03:07 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAMJ1KAF118340 for ; Wed, 22 Nov 2017 14:03:05 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2edcbn8xgw-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 22 Nov 2017 14:03:05 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Nov 2017 19:03:02 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 22 Nov 2017 19:02:59 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAMJ2wSn40304698 for ; Wed, 22 Nov 2017 19:02:58 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44B8D11C05B for ; Wed, 22 Nov 2017 18:57:39 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E1D011C04A for ; Wed, 22 Nov 2017 18:57:39 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.152.213.29]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Wed, 22 Nov 2017 18:57:39 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 5DA18D802BF; Wed, 22 Nov 2017 20:02:58 +0100 (CET) Subject: [pushed] Remove obsolete core-regset.c To: gdb-patches@sourceware.org Date: Wed, 22 Nov 2017 20:02:58 +0100 (CET) From: "Ulrich Weigand" MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17112219-0020-0000-0000-000003CF7ACD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112219-0021-0000-0000-00004264CC8D Message-Id: <20171122190258.5DA18D802BF@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-22_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=43 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711220250 Hello, the last target that used core-regset.c (FreeBSD/alpha) has been removed with GDB 8.0, and since then this file is obsolete. Bye, Ulrich ChangeLog: * core-regset.c: Remove file. * Makefile.in (ALLDEPFILES): Remove core-regset.c. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 78a43c5..0a1a769 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2559,7 +2559,6 @@ ALLDEPFILES = \ bfin-tdep.c \ bsd-kvm.c \ bsd-uthread.c \ - core-regset.c \ darwin-nat.c \ dcache.c \ dcache.c \ diff --git a/gdb/core-regset.c b/gdb/core-regset.c deleted file mode 100644 index 77ae85b..0000000 --- a/gdb/core-regset.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Machine independent GDB support for core files on systems using "regsets". - - Copyright (C) 1993-2017 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* This file is used by most systems that use ELF for their core - dumps. This includes most systems that have SVR4-ish variant of - /proc. For these systems, the registers are laid out the same way - in core files as in the gregset_t and fpregset_t structures that - are used in the interaction with /proc (Irix 4 is an exception and - therefore doesn't use this file). Quite a few systems without a - SVR4-ish /proc define these structures too, and can make use of - this code too. */ - -#include "defs.h" -#include "command.h" -#include "gdbcore.h" -#include "inferior.h" -#include "target.h" -#include "regcache.h" - -#include -#include -#ifdef HAVE_SYS_PROCFS_H -#include -#endif - -/* Prototypes for supply_gregset etc. */ -#include "gregset.h" - -/* Provide registers to GDB from a core file. - - CORE_REG_SECT points to an array of bytes, which are the contents - of a `note' from a core file which BFD thinks might contain - register contents. CORE_REG_SIZE is its size. - - WHICH says which register set corelow suspects this is: - 0 --- the general-purpose register set, in gregset_t format - 2 --- the floating-point register set, in fpregset_t format - - REG_ADDR is ignored. */ - -static void -fetch_core_registers (struct regcache *regcache, - char *core_reg_sect, - unsigned core_reg_size, - int which, - CORE_ADDR reg_addr) -{ - gdb_gregset_t gregset; - gdb_fpregset_t fpregset; - gdb_gregset_t *gregset_p = &gregset; - gdb_fpregset_t *fpregset_p = &fpregset; - - switch (which) - { - case 0: - if (core_reg_size != sizeof (gregset)) - warning (_("Wrong size gregset in core file.")); - else - { - memcpy (&gregset, core_reg_sect, sizeof (gregset)); - supply_gregset (regcache, (const gdb_gregset_t *) gregset_p); - } - break; - - case 2: - if (core_reg_size != sizeof (fpregset)) - warning (_("Wrong size fpregset in core file.")); - else - { - memcpy (&fpregset, core_reg_sect, sizeof (fpregset)); - if (gdbarch_fp0_regnum (regcache->arch ()) >= 0) - supply_fpregset (regcache, - (const gdb_fpregset_t *) fpregset_p); - } - break; - - default: - /* We've covered all the kinds of registers we know about here, - so this must be something we wouldn't know what to do with - anyway. Just ignore it. */ - break; - } -} - - -/* Register that we are able to handle ELF core file formats using - standard procfs "regset" structures. */ - -static struct core_fns regset_core_fns = -{ - bfd_target_elf_flavour, /* core_flavour */ - default_check_format, /* check_format */ - default_core_sniffer, /* core_sniffer */ - fetch_core_registers, /* core_read_registers */ - NULL /* next */ -}; - -void -_initialize_core_regset (void) -{ - deprecated_add_core_fns (®set_core_fns); -}