RFR: 8346661: Add a register print helper method and unify register printing
Matthias Baesken
mbaesken at openjdk.org
Mon Dec 30 15:16:35 UTC 2024
On Mon, 30 Dec 2024 08:27:56 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> For printing registers we can add a little helper method to shorten the coding. Also some of the register printing code can use loops.
At least it is shorter , compare (old)
`st->print("pc =" INTPTR_FORMAT " ", (unsigned long)uc->uc_mcontext.jmp_context.iar);`
to
`print_reg(st, "pc =", uc->uc_mcontext.jmp_context.iar);`
(on some platforms for loops can be used too)
Then, whatever the 'nicer' output is (one per line or 3 or 4) we can use that; currently it is a mix, depending on platform.
And btw. currently the "Registers:" block shows (sometimes?) up without a blank after the stuff printed before (well we can of course fix this without introducing a print_reg helper).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22894#issuecomment-2565607232
More information about the hotspot-runtime-dev
mailing list