From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 048203939C0C for ; Thu, 18 Jun 2020 08:44:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 048203939C0C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x42e.google.com with SMTP id l11so5153974wru.0 for ; Thu, 18 Jun 2020 01:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0vW+vgz2HjG5hciER0ojpKfbrA9PYc+SgctiSEylifo=; b=fJquvGwMc6z3MmWq7MBZzeChnXvFNcWSYude4YaFvgBYypY+xdizPLNWYaOxePQjwr HOf/PbYvBIYJYRv0RTJAnG49inN20g1wt8r9krfc48ZWGE0iTKFHGJCdwdQaIVMVO+uO 6NQJCY5EATg6uqeij+i8QKJTM/t1KA9Hp4u/zwezp1EkVxFQc3yiczYROTylTpnqyrse CNes6h/19/wSfs8ae3ghsyjtl+Jej9i/R1ZDDOUaaD1KJLA49Sh7V/zXF8ejcYIcmbgL ZVsQsT8LJ2+Rrvhw66XMdFzq8W28ZKYQa2dF3zRZceXvHmNZYgAmT/wH2E1dgmnJF4gV YVSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0vW+vgz2HjG5hciER0ojpKfbrA9PYc+SgctiSEylifo=; b=DOGMniroovRhDEsbg5QVN2J6kAGAa0DYDtHUYlR1C5TlwrJxI3jYrl7TxGbEDc2UZ7 ZioIRbmE4udraam8gPLXYsYl+W1iHTGPVkIIiOOu1kzhraA8qpazvcHBAJ7UeuQD1eUh dAbFl3sYVY5O0wSH5O4SuTT2PgZjtzw0WHF3CBAcxhmjt6AQgBkDDDwJYM4UhVX38/s0 CMx1QlqJqGtyMlr77KHPM9oTbRjXVvK4msnJ8MM8jjlWKqniD8xcxZFdGQlAPpIue3w3 etbpYtoj22xfDtu06cCSCZjSAVU/KhGuJ3NGs8eD4feu0FwLMVRxTObOwPTFEvFCAenN elUQ== X-Gm-Message-State: AOAM530Kch4Y8p/gfn6hU/tUP0UpqQHpdVhic83PKixhqQ+dbEkB2X+x VElDfE5MesZShRorortSMcS2rJi1Wx8= X-Google-Smtp-Source: ABdhPJw/XmJFo48PZtIL3o13MIs2d+qHbytvB0qKf4CwkkLJH7Nj6U3nyC+wmJK0WaxlyT76dcWa7A== X-Received: by 2002:adf:f4c6:: with SMTP id h6mr3509972wrp.398.1592469853065; Thu, 18 Jun 2020 01:44:13 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id z7sm1575260wmb.42.2020.06.18.01.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 01:44:12 -0700 (PDT) Date: Thu, 18 Jun 2020 09:44:11 +0100 From: Andrew Burgess To: Christian Biesinger Cc: gdb-patches Subject: Re: [PATCH 4/5] gdb/python: New method to access list of register groups Message-ID: <20200618084411.GW2737@embecosm.com> References: <360af15dc7ea2e2e20f2b9ff6529467b7e0a0614.1592415322.git.andrew.burgess@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 09:26:26 up 9 days, 22:33, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 08:44:15 -0000 * Christian Biesinger [2020-06-17 13:40:47 -0500]: > On Wed, Jun 17, 2020 at 12:38 PM Andrew Burgess > wrote: > > > > Add a new method gdb.Architecture.register_groups which returns a new > > object of type gdb.RegisterGroupsIterator. This new iterator then > > returns objects of type gdb.RegisterGroup. > > > > Each gdb.RegisterGroup object just wraps a single reggroup pointer, > > and (currently) has just one read-only property 'name' that is a > > string, the name of the register group. > > > > As with the previous commit (adding gdb.RegisterDescriptor) I made > > gdb.RegisterGroup an object rather than just a string in case we want > > to add additional properties in the future. > > So this adds just the ability to get the names of the groups, without > a way to associate specific registers with the group? Out of > curiosity, what's the use case for that? I did consider that, but remember that groups exist across architectures. That is, there's only one "all" group that everyone shares. As such to go from group -> registers you would have to supply an architecture. And by that point you may just as well call the registers method on the architecture. As for use case the only thing that comes immediately to mind would be if you wanted to implement a new kind of register viewing window in the TUI. This would provide a way for Python to figure out which register groups exist. Honestly, I needed the registers API to write my test (for a later patch in the series), and I added this one mostly just because I was working in the area and it seemed kind-of related. Thanks, Andrew