On Wed, 29 Jul 2026 21:47:59 GMT, Chris Plummer <[email protected]> wrote:

> Ok, but the need for them in the java code is not obvious since they are not 
> referenced from java (and neither are almost all the R registers).

They are used as index of `AARCH64ThreadContext::data`.

> It's also unclear why the register numbers passed to DWARF_REG don't match 
> those in the java file:

In cpp/hpp file, the number defined in dwarf_regs_aarch64.h‎ means DWARF 
register number. OTOH defined numbers in AARCH64ThreadContext.java‎ are used as 
index of register list (`AARCH64ThreadContext::data`). It is strange, but SA 
code for other OS/archs has same manner...

Agree to add some comments into AARCH64ThreadContext.java to explain where 
const values for register numbers are used, but I wonder it is ok to add 
AArch64 only (in this PR).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/31999#issuecomment-5124671270

Reply via email to