DIRECTORY CD, CDVPrivate, CDApplications, CDEvents, CDPrivate, CDSequencer, TerminalIO, Process USING [Detach]; CDDebug: CEDAR PROGRAM IMPORTS CDPrivate, CDSequencer, TerminalIO, Process, CDApplications, CDEvents = BEGIN xdesign: CD.Design; -- some design MyGraphicRef: TYPE = CDVPrivate.MyGraphicRef; BreakProc: PROC [comm: CDSequencer.Command] = BEGIN me: MyGraphicRef = NARROW[comm.ref]; design: CD.Design = comm.design; app: CD.ApplicationPtr = CDApplications.AplicationAt[design^.actual.first.specific.contents, comm.pos]; ob: CD.ObPtr_NIL; type: REF_NIL; spec: REF ANY_NIL; IF app#NIL THEN {ob _ app.ob; IF ob#NIL THEN {type _ ob.p.objectType; spec _ ob.specificRef}}; xdesign _ design; SIGNAL CDPrivate.DebugCall["debug"] END; Debug: PROC [comm: CDSequencer.Command] = BEGIN n: INT_0; n _ TerminalIO.RequestSelection[ label: "Debug options", choice: LIST["proceed", "signal and proceed", "monitored signal"]]; SELECT n FROM 1 => TerminalIO.WriteRope["proceed\n"]; 2 => TRUSTED {Process.Detach[FORK BreakProc[comm]]}; 3 => BreakProc[comm]; ENDCASE => TerminalIO.WriteRope["skipped\n"]; END; NewDesign: CDEvents.EventProc = BEGIN xdesign _ design END; Impl: PROC [] = BEGIN CDSequencer.ImplementCommand[$Debug, Debug]; CDEvents.RegisterEventProc[$CreateNewDesign, NewDesign]; END; Impl[]; END. ÎCDDebug.mesa (part of Chipndale) Copyright c 1983, 1984 by Xerox Corporation. All rights reserved. by Christian Jacobi June 29, 1983 4:44 pm last edited Christian Jacobi November 23, 1983 11:43 am PrintDesign: PrintTV.RefPrintProc = BEGIN d: REF READONLY CD.DesignRec _ NARROW[ref]; stream.PutF["{Design: %g, technology: %g}", rope[IF Rope.Length[d.name]>0 THEN d.name ELSE "(no name)"], IF d.technology=NIL THEN rope["NIL"] ELSE IF d.technology.name#NIL THEN rope[d.technology.name] ELSE atom[d.technology.key] ]; END; PrintTechnology: PrintTV.RefPrintProc = BEGIN t: REF READONLY CD.TechnologyRec _ NARROW[ref]; stream.PutF["{Technology: %g}", IF t.technology=NIL THEN rope["NIL"] ELSE IF t.technology.name#NIL THEN rope[t.technology.name] ELSE atom[t.technology.key] ]; END; PrintTV.RegisterRefPrintProc[referentType: CODE[CD.DesignRec], proc: PrintTechnology]; PrintTV.RegisterRefPrintProc[referentType: CODE[CD.TechnologyRec], proc: PrintDesign]; Ê?˜šœ"™"Jšœ Ïmœ7™BJšœ,™,Jšœ9™9J˜—šÏk ˜ Jšžœ˜Jšœ ˜ J˜Jšœ ˜ J˜ J˜ J˜ Jšœžœ ˜J˜—šÏnœžœž˜JšžœI˜P—Jšž˜J˜Jšœ žœ Ïc˜#J˜Jšœžœ˜-J˜šŸ œžœ˜-Jšžœ˜Jšœžœ ˜$Jšœžœ˜ Jšœžœ`˜gJšœžœžœ˜Jšœžœžœ˜Jšœžœžœžœ˜šžœžœžœ˜Jšœžœžœžœ2˜N—Jšœ˜Jšžœ˜#Jšžœ˜J˜—šŸœžœ˜)Jšžœ˜Jšœžœ˜ ˜ J˜Jšœžœ7˜C—šžœž˜ J˜'Jšœžœžœ˜4J˜Jšžœ&˜-—Jšžœ˜J˜—šŸ œ˜Jšž˜J˜Jšžœ˜J˜—šÏb œ™#Jšž™Jš œžœžœžœ žœ™+šœ,™,Jšœžœžœžœ™