CORE(V)                      2/11/75                      CORE(V)







NAME

     core - format of core image file



DESCRIPTION

     UNIX writes out a core image of a  terminated  process  when

     any  of  various errors occur.  See signal (II) for the list

     of reasons; the most common are memory  violations,  illegal

     instructions,  bus  errors, and user-generated quit signals.

     The core image is called ``core''  and  is  written  in  the

     process's  working  directory  (provided  it  can be; normal

     access controls apply).



     The first 1024 bytes of the core image are  a  copy  of  the

     system's  per-user  data  for  the  process,  including  the

     registers as they were  at  the  time  of  the  fault.   The

     remainder  represents the actual contents of the user's core

     area when the core image was written.  If the  text  segment

     is  write-protected  and shared, it is not dumped; otherwise

     the entire address space is dumped.



     The format of the information in the  first  1024  bytes  is

     described   by  the  user  structure  of  the  system.   The

     important stuff not detailed therein is the locations of the

     registers.   Here  are  their  offsets.   The  parenthesized

     numbers  for  the  floating  registers  are  used   if   the

     floating-point  hardware  is  in  single  precision mode, as

     indicated in the status register.



        fpsr    0004

        fr0     0006  (0006)

        fr1     0036  (0022)

        fr2     0046  (0026)

        fr3     0056  (0032)

        fr4     0016  (0012)

        fr5     0026  (0016)

        r0      1772

        r1      1766

        r2      1750

        r3      1752

        r4      1754

        r5      1756

        sp      1764

        pc      1774

        ps      1776



     In general the debuggers db (I) and cdb (I)  are  sufficient

     to deal with core images.



SEE ALSO

     cdb (I), db (I), signal (II)