labath added a reviewer: jasonmolenda.
labath added a comment.

I'd like to also pull in Jason for this, since this is really the trickiest 
part of the whole patchset.

What this patch essentially does is bake in the knowledge of the arm sve 
registers and their various configurations into the lldb client (and the 
`DynamicRegisterInfo` class in particular). Before we go into the 
implementation details, we should answer the question whether we are ok with 
that.

I am personally fine with that (if it gets encapsulated a bit better), because 
we can't avoid knowing about the registers of some architecture for various 
other reasons (core file debugging, eh_frame parsing, stubs which don't support 
qRegisterInfo, etc.). In fact, I'd be very happy if this got us closer towards 
a state where the stub does not need to send eh_frame and other register 
numbers over. Also, hardcoding may be the only way to get reasonable 
performance out of this, since a fully generic solution of asking about the 
register information after every stop would likely be prohibitively slow 
(well.. I suppose we could come up with some way of letting the stub to notify 
us when the register configuration has changed).

I believe Jason is also ok some hardcoding, in principle. However,
a) I don't want to speak for him,
b) there's still a lot of details to be worked out.

For example, one of the ideas floated around previously was based on the client 
and server communicating 4 things about each register:

- name
- the register number (for `p` packets, etc.)
- size
- offset (for e.g. `g` packet)

The register name and number are fine, but the other two things are sort of 
variable with SVE. The register size was mainly there as a cross-check, and so 
we could conceivably just drop it from the list (or use the max value or some 
other placeholder for sve registers in particular). But that still leaves the 
question of the `g` offsets...

It might be interesting data point to look at how the sve registers are 
described in gdb's target.xml descriptions.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82863/new/

https://reviews.llvm.org/D82863

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to