[comp.sys.mips] RISC/os core files.

hartzell@boulder.colorado.edu (George Hartzell) (03/09/90)

I just went around and around trying to get a program to read a
RISC/os 4.01 core file.  Here is the format of a core file according
to core(4). [u is a struct user]

beginning of file		-> -------------

struct user			   NBPG * UPAGES

				-> -------------

data pages			   NBPG * u.u_dsize

				-> -------------

stack pages			   NBPG * u.u_ssize

end of file			-> -------------

I learned several things.

1) NBPG is the same as NBPC, and UPAGES is the same as USIZE.

2) The struct user at the beginning of the file is the one described
in /usr/include/sys/user.h, not the (very different) bsd one described
in /bsd43/usr/include/sys/user.h.  It would be helpful if MIPS would
lobotimize /bsd43/usr/include/sys/user.h like they did for the bsd43
utmp.h so people don't get bitten by this.

2) The data pages do *NOT* start at NBPG*UPAGES (or NBPC*USIZE).
They start at NBPG * 1.

Hope that this might save someone some frustration.

g.


George Hartzell			                  (303) 492-4535
 MCD Biology, University of Colorado-Boulder, Boulder, CO 80309
hartzell@Boulder.Colorado.EDU           ..!ncar!boulder!hartzell

rogerk@mips.COM (Roger B.A. Klorese) (03/09/90)

In article <17983@boulder.Colorado.EDU> hartzell@boulder.colorado.edu (George Hartzell) writes:
>2) The struct user at the beginning of the file is the one described
>in /usr/include/sys/user.h, not the (very different) bsd one described
>in /bsd43/usr/include/sys/user.h.  It would be helpful if MIPS would
>lobotimize /bsd43/usr/include/sys/user.h like they did for the bsd43
>utmp.h so people don't get bitten by this.

Done in release 4.50.
-- 
ROGER B.A. KLORESE      MIPS Computer Systems, Inc.      phone: +1 408 720-2939
MS 4-02    928 E. Arques Ave.  Sunnyvale, CA  94086             rogerk@mips.COM
{ames,decwrl,pyramid}!mips!rogerk                                 "I'm the NLA"
"Two guys, one cart, fresh pasta... *you* figure it out." -- Suzanne Sugarbaker