3B1 problem: mysterious core files in /etc/lddrv

Alex S. Crain alex at umbc3.UMD.EDU
Wed Dec 28 05:55:52 AEST 1988


In article <460 at manta.pha.pa.us> brant at manta.pha.pa.us (Brant Cheikes) writes:

>If you know where to look, you can find the user structure, described in
><sys/user.h>, in the core file.  The user structure tells you all sorts
>of neat things about the core-dumping process, including its name.
>In C, first
>  cfp = fopen(core_name, "r");

>  fseek(cfp, (long)U_OFFSET, 0);
>where U_OFFSET is defined in <sys/param.h>.  Now you can just
>  { struct user u; /* from <sys/user.h> */
>    fread(&u, sizeof(u), 1, cfp);
>    /* print out useful data in u */
>  }

	You could also use that wonderful binary inspector, GNU emacs (if
you have it) with

	emacs core_name
	ESC-ESC (goto-char 2304)

where 2304 is decamil for 0x900 (U_OFFSET).
-- 
					:alex
Alex Crain
Systems Programmer			alex at umbc3.umd.edu
Univ Md Baltimore County		nerwin!alex at umbc3.umd.edu



More information about the Comp.sys.att mailing list