From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117283 invoked by alias); 15 Dec 2015 08:55:36 -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 117268 invoked by uid 89); 15 Dec 2015 08:55:36 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pf0-f173.google.com Received: from mail-pf0-f173.google.com (HELO mail-pf0-f173.google.com) (209.85.192.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 15 Dec 2015 08:55:34 +0000 Received: by mail-pf0-f173.google.com with SMTP id n128so1418748pfn.0 for ; Tue, 15 Dec 2015 00:55:34 -0800 (PST) X-Received: by 10.98.18.4 with SMTP id a4mr37028934pfj.54.1450169732731; Tue, 15 Dec 2015 00:55:32 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id 134sm714964pfa.30.2015.12.15.00.55.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 15 Dec 2015 00:55:32 -0800 (PST) From: Yao Qi To: Christopher Friedt Cc: gdb-patches@sourceware.org Subject: Re: cortex-m xml register descriptions for m-system References: Date: Tue, 15 Dec 2015 08:55:00 -0000 In-Reply-To: (Christopher Friedt's message of "Mon, 14 Dec 2015 12:04:57 -0500") Message-ID: <86vb80nlac.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00274.txt.bz2 Christopher Friedt writes: > The first question I would ask for clarification from the binutils-gdb > developers, is, which regnum is appropriate to assign to each of those > m-system registers? Should these registers enumerate starting with 26 > (resuming from the xpsr)? > > Just for comparison, the current binutils-gdb arm-m-profile.xml is > here (https://goo.gl/hpTye8), and the openocd variant is here > (http://goo.gl/FFn56X). The number doesn't matter, but the name does. In the target descriptions from openocd, the register is named as "xPSR" in standard feature org.gnu.gdb.arm.m-profile. { ARMV7M_xPSR, "xPSR", 32, REG_TYPE_INT, "general", "org.gnu.gdb.arm.m-pro= file" }, however, in gdb/arm-tdep.c, gdb expects "xpsr" if (is_m) valid_p &=3D tdesc_numbered_register (feature, tdesc_data, ARM_PS_REGNUM, "xpsr"); else valid_p &=3D tdesc_numbered_register (feature, tdesc_data, ARM_PS_REGNUM, "cpsr"); so I suspect that GDB won't accept the org.gnu.gdb.arm.m-profile feature from openocd. --=20 Yao (=E9=BD=90=E5=B0=A7)