From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32517 invoked by alias); 15 Jul 2014 09:06:55 -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 32480 invoked by uid 89); 15 Jul 2014 09:06:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: e06smtp16.uk.ibm.com Received: from e06smtp16.uk.ibm.com (HELO e06smtp16.uk.ibm.com) (195.75.94.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 15 Jul 2014 09:06:52 +0000 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Jul 2014 10:06:48 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 15 Jul 2014 10:06:46 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 523C91B0806E for ; Tue, 15 Jul 2014 10:06:56 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s6F96Faa28180498 for ; Tue, 15 Jul 2014 09:06:16 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s6F96F46005714 for ; Tue, 15 Jul 2014 03:06:15 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id s6F96DA5005632; Tue, 15 Jul 2014 03:06:13 -0600 Message-Id: <201407150906.s6F96DA5005632@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 15 Jul 2014 11:06:13 +0200 Subject: Re: [PATCH v2 03/13] S390: Migrate to regcache_supply/collect_regset. To: arnez@linux.vnet.ibm.com (Andreas Arnez) Date: Tue, 15 Jul 2014 09:27:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <1403714949-28133-4-git-send-email-arnez@linux.vnet.ibm.com> from "Andreas Arnez" at Jun 25, 2014 06:48:59 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14071509-3548-0000-0000-00000091C029 X-SW-Source: 2014-07/txt/msg00361.txt.bz2 Andreas Arnez wrote: > gdb/ > * s390-linux-nat.c: Include "regset.h". > (regmap_gregset): Delete macro. > (s390_64_regmap_gregset): New register map for > regcache_supply/_collect_regset. > (s390_64_gregset): New regset. > (S390_PSWM_OFFSET, S390_PSWA_OFFSET): New macros. > (regmap_fpregset): Delete macro. > (s390_native_supply, s390_native_collect): Delete functions. > (supply_gregset, fill_gregset): Replace s390-specific regmap > handling by a call to regcache_supply/_collect_regset. > (supply_fpregset, fill_fpregset): Call regcache_supply/ > _collect_regset instead of s390_native_supply/_collect. > (fetch_regset, store_regset): Likewise. Also change the last > parameter to a regset instead of a regmap. > (s390_linux_fetch_inferior_registers) > (390_linux_store_inferior_registers): Adjust last parameter in > calls to fetch_regset and store_regset. > * s390-linux-tdep.c (s390_regmap_gregset): Rename to... > (s390_gregmap): ... this. Also make static const and convert to > regcache_map_entry format. > (s390x_regmap_gregset): Delete. > (s390_regmap_fpregset): Rename to... > (s390_fpregmap): ... this. Make static const and convert to > regcache_map_entry format. > (s390_regmap_upper, s390_regmap_last_break) > (s390x_regmap_last_break, s390_regmap_system_call) > (s390_regmap_tdb): Likewise. > (s390_supply_regset, s390_collect_regset): Remove functions. > (s390_supply_tdb_regset): Call regcache_supply_regset instead of > s390_supply_regset. > (s390_gregset, s390_fpregset, s390_upper_regset) > (s390_last_break_regset, s390x_last_break_regset) > (s390_system_call_regset, s390_tdb_regset): Make global and > replace s390_supply/_collect_regset by regcache_supply/ > _collect_regset. > (s390x_gregset): Delete. > (s390_gdbarch_init): Replace s390x_gregset by s390_gregset. > * s390-linux-tdep.h (s390_regmap_gregset, s390x_regmap_gregset) > (s390_regmap_fpregset, s390_regmap_last_break) > (s390x_regmap_last_break, s390_regmap_system_call) > (s390_regmap_tdb): Delete global variable declarations. > (s390_gregset, s390_fpregset, s390_last_break_regset) > (s390x_last_break_regset, s390_system_call_regset) > (s390_tdb_regset): New global variable declarations. This is OK, except that: > -const short s390_regmap_last_break[] = > - { > - 0x04, S390_LAST_BREAK_REGNUM, > - -1, -1 > - }; > - > -const short s390x_regmap_last_break[] = > - { > - 0x00, S390_LAST_BREAK_REGNUM, > - -1, -1 > - }; These two are deliberately different, but the replacements are identical: > +static const struct regcache_map_entry s390_regmap_last_break[] = > + { > + { 1, S390_LAST_BREAK_REGNUM }, > + { 0 } > + }; > > +static const struct regcache_map_entry s390x_regmap_last_break[] = > + { > + { 1, S390_LAST_BREAK_REGNUM }, > + { 0 } > + }; That seems wrong, I think s390_regmap_last_break needs to skip the initial 4 bytes. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com