From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36396 invoked by alias); 24 Apr 2015 09:47:15 -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 36378 invoked by uid 89); 24 Apr 2015 09:47:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f176.google.com Received: from mail-pd0-f176.google.com (HELO mail-pd0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 24 Apr 2015 09:47:13 +0000 Received: by pdbqd1 with SMTP id qd1so44440021pdb.2 for ; Fri, 24 Apr 2015 02:47:11 -0700 (PDT) X-Received: by 10.70.129.172 with SMTP id nx12mr4601204pdb.157.1429868831535; Fri, 24 Apr 2015 02:47:11 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id x4sm10579342pdl.55.2015.04.24.02.47.09 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 24 Apr 2015 02:47:10 -0700 (PDT) From: Yao Qi To: Vladimir Prus Cc: "gdb-patches\@sourceware.org" Subject: Re: [WIP] Bare-metal register browsing References: <55349CDB.8010100@codesourcery.com> Date: Fri, 24 Apr 2015 09:47:00 -0000 In-Reply-To: <55349CDB.8010100@codesourcery.com> (Vladimir Prus's message of "Mon, 20 Apr 2015 09:29:47 +0300") Message-ID: <864mo5yi1x.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-04/txt/msg00930.txt.bz2 Vladimir Prus writes: Hi Vladimir, > The attached patches implement accessing peripheral registers on > bare-metal targets. Typically, > these registers are memory-mapped, so one can poke at them using > memory operations, but it's > far from convenient. Also, on some targets the registers might require > a custom way of access, > which makes things even less convenient. > > This patch allows target XML to describe 'spaces' - contains of > registers, which can be further grouped. > Given that descrpiption, GDB allows one to do something like: > > (gdb) print $io.GPIO_PORTF.GPIO_PORTFDIR > $7 =3D -1 > > to access registers. One can also do > > (gdb) ptype $io > > to see top-level register groups in space 'io', and so find the > desired register. What does the xml using 'spaces' look like? A small example would be useful. Target description "reg" has already had a component "type", can't we extend "type" for memory-mapped registers? I am trying to understand how useful it is to add 'spaces' here. --=20 Yao (=E9=BD=90=E5=B0=A7)