Devel-MAT

 view release on metacpan or  search on metacpan

doc/format.txt  view on Meta::CPAN

File consists sections:
  Header
  Roots
  Stack
  Heap
  Context


Header:
  CHAR[4] MAGIC     "PMAT"
  U8      FLAGS     0x01 : big-endian
                    0x02 : INT/UV/IV are 64-bit
                    0x04 : PTR is 64-bit
                    0x08 : NV is long double
                    0x10 : ithreads
  U8      zero
  U8      FORMATVER_MAJOR 0
  U8      FORMATVER_MINOR 6
  U32     PERLVER   rev<<24 | ver<<16 | sub

  U8      NTYPES
  {U8     HEADERLEN
   U8     NPTRS
   U8     NSTRS}*$NTYPES
            -- type=0 is common, then actual SV types

  U8      NEXTNS
  {U8     HEADERLEN
   U8     NPTRS
   U8     NSTRS}*$NEXTNS

  U8      NCONTEXTS
  {U8     HEADERLEN
   U8     NPTRS
   U8     NSTRS}*$NTYPES
            -- type=0 is common, then actual Context types

Roots:
  PTR     UNDEF         the "undef" immortal
  PTR     YES           the "yes" immortal
  PTR     NO            the "no" immortal

  U32     NROOTS=$n
  {STR    ROOTNAME
   PTR    ROOT} * $n

          main_cv         = the main code
          defstash        = the default stash
          mainstack       = the main stack AV
          beginav         = the BEGIN list
          checkav         = the CHECK list
          unitcheckav     = the UNITCHECK list
          initav          = the INIT list
          endav           = the END list
          strtab          = the shared string table HV
          envgv           = the ENV GV
          incgv           = the INC GV
          statgv          = the stat GV
          statname        = the statname SV
          tmpsv           = the temporary SV
          defgv           = the default GV
          argvgv          = the ARGV GV
          argoutgv        = the argvout GV
          argvout_stack   = the argout stack AV
          fdpidav         = the FD-to-PID mapping AV
          preambleav      = the compiler preamble AV
          modglobalhv     = the module data globals HV
          regex_padav     = the REGEXP pad AV
          sortstash       = the sort stash
          firstgv         = the *a GV
          secondgv        = the *b GV
          debstash        = the debugger stash
          stashcache      = the stash cache
          isarev          = the reverse map of @ISA dependencies
          registered_mros = the registered MROs HV
          rs              = the IRS
          last_in_gv      = the last input GV
          ofsgv           = the OFS GV
          defoutgv        = the default output GV
          hintgv          = the hints (%^H) GV
          patchlevel      = the patch level
          apiversion      = the API version
          e_script        = the '-e' script
          mess_sv         = the message SV
          ors_sv          = the ORS SV
          encoding        = the encoding
          blockhooks      = the block hooks
          custom_ops      = the custom ops HV
          custom_op_names = the custom op names HV
          custom_op_descs = the custom op descriptions HV

          # Plus miscellaneous other internal UTF-8 / text encoding support SVs

Stack:
  UINT    SIZE = $n
  {PTR    ELEM}*$n

Heap:
  type==0-terminated list of SVs


An SV:
  U8      TYPE       (0xff == UNKNOWN)
  Header(4+P+I):
    PTR     ADDRESS
    U32     REFCNT
    UINT    SIZE
  PTRs(1):
            BLESSED
  STRs(0)

  type: SCALAR:



( run in 1.717 second using v1.01-cache-2.11-cpan-ceb78f64989 )