Xref: utzoo comp.sys.att:5022 unix-pc.general:1944 Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!rutgers!bpa!manta!brant From: brant@manta.pha.pa.us (Brant Cheikes) Newsgroups: comp.sys.att,unix-pc.general Subject: Re: 3B1 problem: mysterious core files in /etc/lddrv Summary: Dump the user structure out of the core file. Message-ID: <460@manta.pha.pa.us> Date: 24 Dec 88 16:25:21 GMT References: <1988Dec23.021443.21872@ziebmef.uucp> Reply-To: brant@manta.pha.pa.us (Brant Cheikes) Organization: Soul of the Gnu Machine, Philadelphia Lines: 39 [Although Chris wrote > Thanks in advance; reply by mail if possible and I'll summarize. he also wrote >[The next hop on pathalias's preferred mail path to here just went >away; please route mail manually until the January maps come out.] I doubted the likelihood of mail to get thru with all the evil rerouters out there.] Chris Siebenmann writes: >Every so often (once a day right now, it seems) *something* here is >dumping core in /etc/lddrv. [...] >Any ideas on what program might dump core in /etc/lddrv? Any ideas on >how to identify what program produced a specific core dump? Is this >information stored anywhere in the core file? No, yes, and yes. If you know where to look, you can find the user structure, described in , 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"); where core_name is the name of the core file you want to inspect. Then you must jump past the stuff (kernel stack data?) at the start of the core file: fseek(cfp, (long)U_OFFSET, 0); where U_OFFSET is defined in . Now you can just { struct user u; /* from */ fread(&u, sizeof(u), 1, cfp); /* print out useful data in u */ } >Chris Siebenmann uunet!utgpu!{ontmoh!moore,ncrcan}!ziebmef!cks >cks@ziebmef.UUCP or .....!utgpu!{,ontmoh!,ncrcan!brambo!}cks -- Brant Cheikes University of Pennsylvania Department of Computer and Information Science brant@manta.pha.pa.us, brant@linc.cis.upenn.edu, bpa!manta!brant