1*5473Slinton /* Copyright (c) 1982 Regents of the University of California */ 2*5473Slinton 3*5473Slinton static char sccsid[] = "@(#)remake.c 1.1 01/18/82"; 4*5473Slinton 5*5473Slinton /* 6*5473Slinton * Remake the object file from the source. 7*5473Slinton */ 8*5473Slinton 9*5473Slinton #include "defs.h" 10*5473Slinton #include "command.h" 11*5473Slinton #include "object.h" 12*5473Slinton 13*5473Slinton /* 14*5473Slinton * Invoke "pi" on the dotpfile, then reread the symbol table information. 15*5473Slinton * 16*5473Slinton * We have to save tracing info before, and read it in after, because 17*5473Slinton * it might contain symbol table pointers. 18*5473Slinton */ 19*5473Slinton 20*5473Slinton remake() 21*5473Slinton { 22*5473Slinton char *tmpfile; 23*5473Slinton 24*5473Slinton if (call("pi", stdin, stdout, dotpfile, NIL) == 0) { 25*5473Slinton if (strcmp(objname, "obj") != 0) { 26*5473Slinton call("mv", stdin, stdout, "obj", objname, NIL); 27*5473Slinton } 28*5473Slinton tmpfile = mktemp("/tmp/pdxXXXX"); 29*5473Slinton setout(tmpfile); 30*5473Slinton status(); 31*5473Slinton unsetout(); 32*5473Slinton bpfree(); 33*5473Slinton objfree(); 34*5473Slinton readobj(objname); 35*5473Slinton setinput(tmpfile); 36*5473Slinton unlink(tmpfile); 37*5473Slinton } else { 38*5473Slinton puts("pi unsuccessful"); 39*5473Slinton } 40*5473Slinton } 41