Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!rpi!think.com!spool.mu.edu!agate!dog.ee.lbl.gov!nosc!crash!pnet01!cwr From: cwr@pnet01.cts.com (Will Rose) Newsgroups: comp.os.minix Subject: mu.c patch and psdatabase Message-ID: <1991Jun10.133607.16251@crash.cts.com> Date: 10 Jun 91 13:36:07 GMT Sender: root@crash.cts.com Organization: People-Net [pnet01], El Cajon CA Lines: 261 I took a look at mu.c when it came out a while back, but decided it was too much effort - I had some of the extra h files, but not all, and the code was hard to follow. Since W van Dorst cleaned it up, I thought I'd have another go. I'm running standard 1.5.10 on an XT, without shared memory, and I found that as written mu.c wouldn't compile. The typedef struct sysinfo_t contains #if NR_SHARE struct nlist mm_sh_text[2]; struct nlist mm_hole_head[2]; #endif which needs to be: #if NR_SHARE struct nlist mm_sh_text[2]; #endif struct nlist mm_hole_head[2]; This breaks the 1.5.10 ps, which doesn't use or update the mm_hole_head address in psdatabase. I long ago tired of this silly non-ascii format, and rewrote a chunk of ps.c to generate an ascii database automatically in the system build makefile. However, if other programs are going to need this format, I decided I'd have to have a simple way of viewing it or rebuilding it. Hence the program below, which displays a psdatabase file in human-readable form, or builds a new one directly from symbol tables. 'cat ps.sym' on an ascii database is less work, a lot quicker, and much more versatile, but there you are. Having built a suitable psdatabase, mu (patched as above) works fine on systems without shared text. Good luck - Will ============================================================== table !"#$%&'()*+,-./0123456789:;<=>? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ begin 644 psdata.c M+RH@<'-D871A+F,@+2!M86YI<'5L871E" Q+C4@<'-D871A8F%S92!F:6QE(&EN(&AU;6%N+7)E861Aw M8FQE"B J(&9O2!B92!B=6EL="!B>2!A9&1I;F<@=&AE(&9O;&QO=VEN9R!T;R!Tr M:&4@"B J('1O;VQS(&1I2!-86ME9FEL93H*('-Y;3H@8G5I;&0@q M8F]O=&)L;VL@:6YI=" N+B]K97)N96PO:V5R;F5L("XN+V9S+V9S("XN+VUMp M+VUM"B @(" @(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0DE'7T1""@ERx M96%D6TH1E-?4$%42"P@241?1E!23T,Lu M(&YL:7-T<" K(#@I(#T]($9!24Q%1"D*(V5L6TH34U?4$%4t M2"P@241?35!23T,L(&YL:7-T<" K(#0I(#T]($9!24Q%1"!\? H)F5O9BAS>7-I;F9O*2D@(3T@7-I;F9O*3L*("!]"B @97AI="@P*3L@"GT*"@HOj M*@H@*B!R(&4@82!D(&$@;"!L( H@*@H@*B!296%D(&%L;"!T:&4@9&%T82!Fi M2AS<"T^:V5?=&%S:W1A8ELP72YN7VYA;64L($E$r M7U1!4TM404(L($Y!345?4TE:*3L*"0ES<"T^:V5?=&%S:W1A8ELP72YN7W9Aq M;'5E(#T@;&H["@D)2AS<"T^;6U?;7!R;V-;,%TN;E]Ne M86UE+"!)1%]-4%)/0RP@3D%-15]325HI.PH)"7-P+3YM;5]M<')O8ULP72YNd M7W9A;'5E(#T@;&H["@D)6TH9FYA;64Lq M('-N86UE+"!N<"D*8VAAPH@('5N6U?9G ["@H@(&EF("@HPH)97)R;W(H;W!E;E]El MR *"6EF("ASPH)"7-TPH@(&9P