From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34286 invoked by alias); 5 Dec 2017 12:29:07 -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 34254 invoked by uid 89); 5 Dec 2017 12:29:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=everybody, labor X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Dec 2017 12:29:05 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB5CSu18057400 for ; Tue, 5 Dec 2017 07:29:03 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2enubq0eva-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 05 Dec 2017 07:29:03 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Dec 2017 12:29:01 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 5 Dec 2017 12:29:00 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vB5CSxlJ33489020; Tue, 5 Dec 2017 12:28:59 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 994D44C052; Tue, 5 Dec 2017 12:23:51 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6FD4E4C044; Tue, 5 Dec 2017 12:23:51 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 5 Dec 2017 12:23:51 +0000 (GMT) From: Philipp Rudo To: gdb-patches@sourceware.org Cc: Andreas Arnez , Ulrich Weigand Subject: [PATCH v2 00/11] Split up s390-linux-tdep.c Date: Tue, 05 Dec 2017 12:29:00 -0000 X-TM-AS-GCONF: 00 x-cbid: 17120512-0040-0000-0000-000003F689F4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120512-0041-0000-0000-000025F97E79 Message-Id: <20171205122859.2919-1-prudo@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-05_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=15 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712050180 X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00093.txt.bz2 Hi everybody changes v1 -> v2: - Rebase to current master. - Hook s390 into osabi mechanism including some preparation/clean up in s390_gdbarch_init (Patches #1-#7) - Don't move s390_cannot_store_register and s390_write_pc as well as the regmap/regset definitions to the new file. Note: I haven't added the switch from macros to enum for the register numbering Uli has suggested. 'Condensing' the definitions, i.e. only define the first register number of a range of equal registers, like ppc does it, leads to constructs like 'S390_R0_REGNUM + N'. Those constructs appear rather often as there are quite a lot of instructions which give special meaning to specific registers. Giving the fact that the main reason to do this switch is so 'only' three of the definitions can stay in s390-linux-tdep.h, I think this switch can be deferred to later when I have time to take a closer look at it. Thanks Philipp --- This patch set splits up the s390 tdep code followed by some minor clean up and coding style fixes. It originates from my Linux kernel feature and helps adding the new Linux kernel 'OS' to s390 while keeping the code manageable. I want to bring the set upstream in advance of the rest of the kernel debugging feature as nearly all changes to s390-linux-tdep.c cause merge conflicts making the maintenance off-tree extremely labor intensive and error prone. Thanks Philipp Philipp Rudo (11): s390: Remove duplicate checks for cached gdbarch at init s390: Allocate gdbarch & tdep at start of gdbarch init s390: gdbarch_tdep.have_* int -> bool s390: gdbarch_tdep add field tdesc s390: Move tdesc validation to separate function s390: if -> gdb_assert for tdesc_has_registers check s390: Hook s390 into OSABI mechanism s390: Split up s390-linux-tdep.c into two files s390: Clean up s390-linux-tdep.c s390: Add comments to uncommented functions in s390-tdep.c s390: Add comments to uncommented functions in s390-linux-tdep.c gdb/Makefile.in | 3 + gdb/configure.tgt | 4 +- gdb/s390-linux-nat.c | 1 + gdb/s390-linux-tdep.c | 2897 +++---------------------------------------------- gdb/s390-linux-tdep.h | 176 +-- gdb/s390-tdep.c | 2565 +++++++++++++++++++++++++++++++++++++++++++ gdb/s390-tdep.h | 367 +++++++ 7 files changed, 3124 insertions(+), 2889 deletions(-) create mode 100644 gdb/s390-tdep.c create mode 100644 gdb/s390-tdep.h -- 2.13.5