MemorySegment visualization API from Per

Pedro Lamarão pedro.lamarao at prodist.com.br
Mon Jan 23 12:49:14 UTC 2023


Em seg., 23 de jan. de 2023 às 07:36, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> escreveu:

> The HexDump functionality is, IMHO, more general, and I believe it
> deserves a more central place in the JDK, rather than some class in
> java.lang.foreign. In principle, users might want to produce hexdumps of
> byte buffers, segments, byte arrays, Collection<Byte>, ...
>
> (as I write this, I realize that the same argument might be applied to the
> memory inspection stuff, but I think it's a defensible move to keep layouts
> and segments together, which we have done in other places).
>
> Which of the two pieces of functionalities you find yourselves more in
> need of? Memory inspection (e.g. segment + layout -> string), or hexdump?
> Or both?
>

In my experience, without prejudice to adding a hexdumper to JDK, such
things are quickly and easily born wherever necessary.
An inspector does not seem quick and easy to write while debugging, so
perhaps it would bring more value to the table.
Maybe the inspector could actually do both and somehow include a hexdump as
part of the inspection.

-- 
Pedro Lamarão
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230123/08fe0639/attachment.htm>


More information about the panama-dev mailing list