<div dir="ltr"><div dir="ltr">Em seg., 23 de jan. de 2023 às 07:36, Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com">maurizio.cimadamore@oracle.com</a>> escreveu:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  
  <div>
    <p>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>, ...<br></p>
    <p>(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).</p>
    <p>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?</p></div></blockquote><div><br></div><div>In my experience, without prejudice to adding a hexdumper to JDK, such things are quickly and easily born wherever necessary.</div><div>An inspector does not seem quick and easy to write while debugging, so perhaps it would bring more value to the table.<br></div><div>Maybe the inspector could actually do both and somehow include a hexdump as part of the inspection.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>