public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Register View bitfields support
@ 2024-02-09 12:56 Robert Pîrvu
  2024-02-16 12:00 ` Guinevere Larsen
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Pîrvu @ 2024-02-09 12:56 UTC (permalink / raw)
  To: gdb; +Cc: Sebastian Perta, Mark Goodchild

Hello,

I am a cdt developer and I'm working on a new functionality for 
Eclipse's Register View.

The current implementation of the Register View does not allow the 
display of individual fields of a register with bitfields. This 
functionality is only available in the Expression view by creating a new 
expression using the “$” and the name of the register.
Register view has a grouping functionality that allows us to create 
custom groups of registers, those groups can be expanded and collapsed 
to show/hide the register in the said group. The same functionality of 
expanding and collapsing can be added to a register with bitfield.

The implementation of this would require the modification of the 
-data-list-register-values MI Command to include a list of registers’s 
bitfields.
And the introduction of a new MI Command 
-data-list-register-bitfields-name, is also needed to retrieve the names 
of the bitfields.

The modified -data-list-register-values would have the following format:

Command: -data-list-register-values [ --skip-unavailable ] fmt [ ( regno 
)*]
Respone:  
^done,register-values=[{number="0",value="0”,bitfields=“{value=0, 
value=0}"}, {number="1",value="{0}”,bitfields=“{[]},...]
Format of the response: [{number="0",value="0”,bitfields=“{[value=0], 
[value=0]}"}]

The --skip-unavailable option indicates that only the available 
registers are to be returned.
The regno option indicates that only the specified register needs to be 
returned. If no register is specified then all registers will be 
returned.
The fmt indicates the format according to which the registers' contents 
are to be returned. Allowed formats for fmt are:

Hexadecimal - x
Octal - o
Binary - t
Decimal - d
Raw - r
Natural - N

If a register doesn't have bitfields, then the bitfields list will be 
empty or it can be not included in the response.

The new MI Command will have the following format:

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

The regno option indicates that only the specified register needs to be 
returned. If no register is specified then all registers will be 
returned.

If the register doesn't have bitfields, then the bitfields list will be 
empty or not included in the response.

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

Best Regards,
Robert.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-05  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 12:56 Register View bitfields support Robert Pîrvu
2024-02-16 12:00 ` Guinevere Larsen
2024-03-05  9:57   ` Robert Pîrvu

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).