From patchwork Tue Jul 15 11:16:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 2056 Received: (qmail 7286 invoked by alias); 15 Jul 2014 11:17:14 -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 7197 invoked by uid 89); 15 Jul 2014 11:17:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD 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 11:17:05 +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 12:17:01 +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 12:16:59 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 23C121B08040 for ; Tue, 15 Jul 2014 12:17:39 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s6FBGwbm24576002 for ; Tue, 15 Jul 2014 11:16:58 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s6FBGvvL006469 for ; Tue, 15 Jul 2014 05:16:58 -0600 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-196.boeblingen.de.ibm.com [9.152.212.196]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s6FBGvTP006419; Tue, 15 Jul 2014 05:16:57 -0600 From: Andreas Arnez To: "Ulrich Weigand" Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 03/13] S390: Migrate to regcache_supply/collect_regset. References: <201407150906.s6F96DA5005632@d06av02.portsmouth.uk.ibm.com> Date: Tue, 15 Jul 2014 13:16:57 +0200 In-Reply-To: <201407150906.s6F96DA5005632@d06av02.portsmouth.uk.ibm.com> (Ulrich Weigand's message of "Tue, 15 Jul 2014 11:06:13 +0200 (CEST)") Message-ID: <87mwcaeus6.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14071511-3548-0000-0000-000000926665 X-IsSubscribed: yes On Tue, Jul 15 2014, Ulrich Weigand wrote: > 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. Good catch! With my original patch the register was always shown as zero for 31-bit ABI inferiors. After the correction below we get real values again. diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index f67ba9c..a4e9342 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -445,6 +445,7 @@ static const struct regcache_map_entry s390_regmap_upper[] = static const struct regcache_map_entry s390_regmap_last_break[] = { + { 4, REGCACHE_MAP_SKIP_BYTES }, { 1, S390_LAST_BREAK_REGNUM }, { 0 } };