public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "robert.pirvu at cyberthorstudios dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug mi/31448] New: [Feature Request] Register's bitfields MI Commands
Date: Mon, 04 Mar 2024 14:16:23 +0000	[thread overview]
Message-ID: <bug-31448-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=31448

            Bug ID: 31448
           Summary: [Feature Request] Register's bitfields MI Commands
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: robert.pirvu at cyberthorstudios dot com
  Target Milestone: ---

I'm working on a new functionality for Eclipse to allow Register View to
display bitfields.

For this, I propose two GDB MI Command changes:

    1. A new command to return a list of bitfields' names, similar to
-data-list-register-name.

Command: -data-list-register-bitfield-name (regno) 
Response: ^done,register-bitfield-names=[{name="reg0",
bitfields=["A","B","C"]},{name="reg1", bitfields=["D","E"]}]

If regno(register's number) is specified then the response will contain only
the specified register.

    2. A new option "--with-bitfields" for -data-list-register-values to
include a list of bitfields' values. This option was suggested by Guinevere
Larsen to receive the necessary data and not change the default response of
this command. A similar approach can be used for the bitfields' names MI
Command as well if is a better implementation.   

Command: -data-list-register-values --with-bitfields
Respone:
^done,register-values=[{number="0",value="0x0",bitfields=[0,0,0]},{number="1",value="0x1",bitfields=[0,0]}]

Format of the response: 
[{number="regNo",value="regValue",bitfields=[bitVal1,bitVal2,bitVal3]}]

Initial thread of this
request:https://sourceware.org/pipermail/gdb/2024-February/051071.html

Any feedback regarding this feature is greatly appreciated and we are 
open to contribute to its implementation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2024-03-04 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 14:16 robert.pirvu at cyberthorstudios dot com [this message]
2024-03-04 15:29 ` [Bug mi/31448] " tromey at sourceware dot org
2024-03-06 12:05 ` robert.pirvu at cyberthorstudios dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31448-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).