12Chapter2DebuggersforAlgol-likeLanguagesThischapterdiscussesdebugginginmoredetail,layingthegroundworkfortheremainderofthedissertation.Thefirstsectionpresentsaprogramexecutionmodelthatcanformtheconceptualbasisforbuildingsource-leveldebuggersforAlgol-likelanguages.Thesecondsectionisauser-orientedoverviewofabroadrangeofpopulardebuggingfeatures;italsoshowshowaprogrammerusesthesefeaturestoanswersometypicaldebuggingquestions.ThisoverviewpreparesthereaderforChapter3,whichdescribestheeffectsofcommonoptimizationsonaconventionaldebugger'soperation.Inacompilation-basedenvironment,thecompilermusttellthedebuggerhowtotranslatethelow-levelmachinestateintosource-levelterms;thedebuggermustperformtheindicatedtranslations,interactwiththeuser,anddosomebookkeeping.Thethirdsectiondiscussesconventionalcompileranddebuggerimplementations,focusingonafewbasicdebuggingoperationsthatwillplayamajorroleintheimplementationportionofthisdissertation.ThissectionprovidesusefulbackgroundandcontrastforthedescriptionofNavigator'scompileranddebuggerimplementations.Thefourthsectiondescribesthepropertiesthatasource-leveldebuggerforoptimizedprogramsmusthavetobeconsideredeffective,anditdefinestwokeytermsforevaluatingadebugger'sresponses:"expected"and"truthful".Thechaptercloseswithabriefsurveyofthehistoryofdebuggersandrecentresearchdirectionsindebugging.Previousworkondebuggingoptimizedprogramsisdiscussedattheendofthenextchapter.pïg/îMÓqïVÑî'Aî0ÍïP4îî%rî)z î4ñrïI–î¤îÂî²î}î&;î'îî+…î/­î3Éî6- î=óî@5îB™îI5ïFÕîâî+ î$îæî¨î#/î(qî)…î.þî5î9@î;øî>mîA¾îD ïDîâî—î-î î"ãî)Éî,_ î3 î:ïî> îC îHîIÅïARîâ î�î”î�î üî%6î)Cî+>î0¢î7žî=‡î?îB.îF~îIÅï>�îâ îîWî-î#¦î%¡î*Šî.jî3'î:. îA·îEï;Ïîâî©î@î»î0î#µî%yî)¾î/Ýî2tî6ûî8ëî>Ó îG‡îIÅï9 îâ îü îâ ï5xî¤îlî�îê î(Jî*£î0Wî3¸î6î8iî>lîAiîCîH�ï2¶îâî:î;îèî"= î*Dî/î1àî8fîî3îNî5îóî ’î"ã î,³î1ƒî3-î5¿ î=Æî@ÑîE_ï'°îâîx î€îµî$^î'î)õ î1…î3» î;xîA±îDåï$îîâï!Yî¤î]îyîøî"Âî% î+\î. î/ î6„îŽîDÛï˜îâîpîÝî²îÉ î Õ î&Ùî)¶î+3î0î2éî5¥î9–î;ú îB¸îD ïÖîâ î… î¢îY ïAîlîˆî¶îæî"Dî#²î'Gî+åî-âî0…î5Zî7Wî>(îA#îE‹ïîâ î-îÜ îrî$ î'‰î)�î0Iî6µî<Éî>5îD>îE×îH7ï¾îâî›îúî €TVm$CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES132.1Source-levelmodelofexecutionforAlgol-likelanguagesAprogramisastaticentity,whileitsexecutionisadynamicone.Thesemanticsofaprogramminglanguagedefinesasource-levelmodelofcomputationforprogramswritteninthatlanguage.Inhisproposalforadoptingafunctionalstyleofprogramming,Backuscharacterizedconventionalprogramminglanguagesquitesuccinctly[Backus78]:"VonNeumannprogramminglanguagesusevariablestoimitatethecomputer'sstoragecells;controlstatementselaborateitsjumpandtestinstructions;andassignmentstatementsimitateitsfetching,storing,andarithmetic....[AvonNeumannprogram]isdynamicandrepetitive.Onemustmentallyexecuteittounderstandit....Itsstatementsoperateonaninvisible`state'accordingtocomplexrules."Thesource-levelmodelofcomputationisacombinationofthat`state'anditscomplexrules.2.1.1Thesource-levelmodelOnewaytodefinethebehaviorofaprogramisviaasetofinput/outputpairs:theprogramtransformsagiveninputintoitscorrespondingoutput.Thisdefinitionisadequateforaprogram'suser,whowishesonlytoseetheprogram'sresult.However,aviewofthecomputation'sinternalstateisessentialforaprogram'simplementorormaintainer,whomustlocatetheproblemwhentheprogramfailstoproducethedesiredresult.Ontheotherhand,thismodelisnotintendedtocapturetheparticularsofamachine-levelviewofaprogram'scomputationalbehavior.Amachine-levelmodelwouldincludemanydetailsaboutanindividualimplementation,suchasthemachine'sinstructionset,thatdonotappearinandarenotspecifiedbyahigh-levellanguage.Thepurposeofthemodelistodefinetheviewofexecutionthatshouldbepresentedtoauserbyasource-leveldebugger.Thedebuggertypicallyconstructsitssource-levelviewofacomputationfromalower-levelrepresentationthatishiddenfromtheprogrammer.ThemodeldevelopedinthissectionwillbeusedinChapter3todeterminewhatthedebugger'sresponsetoagivencommandshouldbeatagivenpointinacomputation.ThismodelwasproducedbycombiningHorningandRandell'sviewofsequentialprocesses[Horning73]andthestandardsemanticsofAlgol-likelanguages.AlthoughtheresultingmodelisneitherasgeneralnoraspreciseasHorningandRandell's,itiswell-suitedfordescribingtheexpectedbehaviorofasource-leveldebugger.Amoreformaltreatmentofmuchofthematerialinthissection,thoughwithasomewhatdifferentemphasis,appearsinChapters3and4ofSatterthwaite'sdissertation[Satterthwaite75].rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓtïa¸îâî îàî"Šî$äî-¡î0³ î9rrï]•î¤îsîEîôîaî .î$«î(¢î*Àî19î2èî4Tî:'î>5îAPîGÈîIÅïZÔîâ î†î^î".î#i î+î/Pî1 î9'î;vîA›îF`îH ïXîâî¸î¡îíî¡î!øî'Îî) î/®î2øî4Ë î=ÏîBœ ïUQîâ îü î�î%Ùî)c sî/¯ïUQïUQî/þrî4ÀïUQïUQïSî‰î[îé î#™î*î,”î2mî49î8ôî;q îB–îGfïQuî‰î1 îßî!Æî#•î')î)Õî,U î4"î6Î î=Ô îD‚îIïOÍî‰îFîGî î%î(î*áî1hî7pî8óî>šîAh îGêïN&î‰îÓîYî0îgî ÷ î(î)�î,s î3î7Ùî9Àî;’î@ëîD®ïLî‰î8î¼ïHéîâîº îEî}î6 î'1î(œî)Æ î1´î3mî6<î:î<Ôî>¯îD3uïCîâîÏî: î+rï>üî¤î¬î‰î<îzîÞî%“î'Qî(î.î/ƒî1Åî2ôî5î6Ó î?!îBûîE`ï<:îâ î¤îÀîhîî Ñî"ž î+ˆî0¼î3É î:î;eîA6îCfîDƒï9xîâî7î>î›î¸îiî Àî#"î)�î.>î4vî5¢î8àî:œî<ÿ îEÙï6·îâî%î¤î/îî»î#9 î+pî-F î4–î7­î;'î?1îA£îG9ï3õîâîBîÐî¾îlî Æî#%î'îî,•î.óî1Sî4òî8Èî;jî?£îAîC„îI@ï14îâî+îè îÿî î!� î*ºî.Sî0jî1ñî8º îBîIbï.rîâ î¤îàî î$ôî(Áî-î0øî2ë î9pîCªîFÞîH�ï+±îâîC îî“î!aî#hî%Ýî*dî,î.Éî1î3’î9Nî;Iî` îDñsï½îâ rï½îDî!î¥î eî&¿î(� î/! î6’î<Öî?ZîE%îIƒïüîâîÅî£î¦îaî?î$ î%êî+žî.† î5î6�î88 î?YîAÆ îH�ï:îâî¨îaî#îV î$êî+áî-vî1î5‹î;Êî=ŒîAlîC.îE—ïyîâîÕî¼îöîïî!Oî"¾î)oî/Zî5êî;:î=.îCEîD¿îG»îI5ï ·îâî sîOï ·ï ·îŸrî'?ï ·ï ·ÿãTVm$³CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES14Programmersoftenenvisionaprogram'sexecutionbehaviorintermsofaprocessorinterpretingthesourcestatementsoftheprogram.Thisprocessorhasasetofstatevariables,whichholdvaluesofuser-definedvariablesandauxiliaryvariables(usedbytheprocessortoexecutetheprogram).Theprogram'sexecutioncanbedescribedintermsofasequenceofvaluesofthesestatevariables.Thissequenceiscalledacomputation.Anactionspecifiesthetransitionfromonestatetothenext:itassignsnewvaluestosomestatevariables;theremainingstatevariableskeeptheiroldvalues.Thefinalstateofafinitecomputationisastateforwhichnoactionisdefined.Acomputation'sactionsequenceisthesequenceofactionsperformedtogeneratethecomputation.Ingeneral,agivenactionsequencedoesnotcompletelyspecifyacomputation,becauseitcouldbeappliedtoseveralinitialstates.Aprogramisacompactdescriptionofthesestatetransitionsandtheirsequencing.Aprogramisexecutedbyaprocessor.Thestatevariablesofaprocessorinclude:9theprogramstatements,9theuser-definedvariables,and9asetofauxiliaryvariables,usedbytheprocessorforthebookkeepingnecessarytoexecutetheprogram.Theseauxiliaries,whichincludetheprogramcounter,theprocedurecallchain,anddatafromcurrently-activeprocedures,arediscussedbelow.InanAlgol-likelanguage,thetransitionfromonestatetothenextinvolveschangestoonlythevariablesandtheauxiliaries;thestatementsareconstantovertheprogram'sexecution.Thatis,theprogramcannotcreatenewstatementsandexecutethem.(ThisisnottrueofLISP,forexample.)Themostimportantauxiliaryvariableistheprogramcounter,whichidentifiesaprogram"portion"thatisabouttobeexecuted.Ingeneral,thegranularity,orlevelofdetail,atwhichaprogram'sexecutioncanbeviewedisdependentonthelanguagedefinition.Foralanguagethatspecifiestheexecutionorderwithinastatement,orforanexpressionlanguage(suchasBliss[Wulf+71]),itmightbeanexpression.Foralanguagethatdoesnotspecifytheexecutionorderofexpressionswithinastatement,thegranularitymustbestatementlevelorhigher;inthetypicallanguageastatementisareasonableprogram"portion".(MostAlgol-likelanguagesdefine"statement"recursively.Thereforetheexecutionofacompositestatement,suchasaloop,generallyimpliestheexecutionofseveralnestedstatements.AmorecompletecomputationalmodelforAlgol-likelanguagescouldalsomarktheendofexecutionofeachcompositestatement.)Theremainderofthediscussionassumesstatementgranularityunlessotherwisenoted.rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)î¤ îóîfî"±î#ºî*î0î5¦î73î:ÜîÖï_gï_gî?¢îC îFÀï\¦îâî° î³î‚î!Nî'î,×î0¡î2±î5%î;Mî=îBîD�ïYäîâî®î î6î µî"™î(¸î*Zî.î/Åî0ãî6¿î8lî<�î>:îA·îDÜ ïW#îâîüîäîPîGvîqïW#ïW#î rî%¢ïW#ïW#ïS�î¤vîïS�ïS�îÄrïS�îBîÙî U î&‘î*î,Ýî0+î1÷î4sî8î9Œî>:îAEîE�îG[ïPÌîâîF î­î@î!ôî%Xî+Fî.Êî2Dî4áî:Qî=\î@¿îD#îFvîGkïPÌïPÌîGÚrïN îâ îîŸîõîQîºî#ôî&&î*jî,î24î3ì vî<ïïN ïN î=ŸîA,rïN îF÷îH�ïKIîâîÙî îKî"î#Úî)mî+Û î4Íî6«î;äî=î@ßîEïH‡îâîî‡ îƒî î!I î)œî.¾î0î3ßî5Ðî:ºî›îexï?orîï?oï?oîŒî|vî ï?oï?oî�rî$ï?oï?owï;Ùîexï<­rîï<­ï<­îŒî| vî kï<­ï<­î!rî%�ï<­ï<­î&]wï9îexï9ërîï9ëï9ëîlî¯îŽî!Y î'‘î*óî-î/šî5Ôî87î:¼ îCîI@ï7·îeî@î…î!ºvî%¡ï7·ï7·î&R rî+¶ï7·ï7·î,xî0kî50î7tî<èîB'îDkï5ƒîeîðîþîµî ºî$!î-ß î5?î7’î=œï1íî¤î‚î� îïî"î$Œ î*¹î.0î0êî4+î5èî8Wî;uî@ÜîFîGÕï/,îâîPîîßîL î#Uî%à î,‹î.íî4jî7’î:î@z îG§ï,jîâîÃî@îìî…î!¥î$± î+ˆî.]î3pî8î;Àî=Iî?ÜîBÝîD³îH±ï)©îâï&î¤î°î@îÕî$­î*î+·î.Kî4 î9šî=Ü îDîE`ï#Rîâî1îî‹î|î;î!;î'óî)Òî/ vî1|ï#Rï#Rî2- rî7íï#Rï#Rî8Ùî:­î>î?ËîCÿîE§îIÅï �îâîSî�î î î$Äî&6î-î/î1tî7@ î>sîA$îBTîH ïÏîâî—î3î¤î!•î&î'| î.Fî0Fî2¿î4ì î;àîAãîEÊîG´sï îârîï ï î˜îuîÌîÄîµî¦ î&;î(çî*î/Øî2§î5Øî8Mî<êî?JîE€îI5ïKîâ î<îžîå î"�î% î,%î/ªî1¸î8 î;nî=OîB5îDîF}ïŠîâîüî{îîÅî C î'fî-I î5 î9c î@îFµïÈîâ î[ îàî$#î&dî,|î.î/#î5ˆ î;øî? î@œîA¨îEïîâîÑîXîµî•î#Mî'Å î/©î1]î5î;' îDQîH±ï Eîâ îmîãîÚî"Òî&‘î)î+ÿî-äî4Eî6)î9†î@4 îHï „îâîzî3î’ î î%aî+— î2’î6µî<ßÿ "TVm$BCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES15Withtheexceptionofdynamically-allocatedvariables(whichcanbehandledbyasimpleextension),auser-definedvariablecanbethoughtofashavingaconceptuallifetimethatextendsovertheentirecomputation.Eachvariablehasatype,whichspecifiestherangeofvaluesitcanassume.However,asinglevariableidentifiercanrefertodifferentvariablesatdifferentpointsinacomputation.Anenvironmentisamappingfromidentifierstoasubsetofthevariables.Ifagivenenvironmentassociatesapreviously-usedidentifierwithanewvariable,theoldvariableisinaccessibleinthatenvironment.Algol-likelanguagesarestaticallyscoped,meaningthattheenvironmentisafunctionofapointintheprogramtext(i.e.,theprogramcounter).Incontrast,mostdialectsofLISParedynamicallyscoped,meaningthattheenvironmentisafunctionofthepointinthecomputation.Variablebindingisarelatedconceptforthehandlingofdynamically-allocatedvariables.Algol-likelanguagespermitrecursion,implyingthatmultipleinstancesofaparticularvariablecanexistatthesametime.Foragivenidentifier,thecorrectinstanceofitsvariable(i.e.,thebindingoftheidentifier)isafunctionofthehistoryofthecurrentlyactiveprocedurecalls,thatis,theorderoftheiroccurrenceandtheirdata.Atagivenpointinacomputation,statementsinanAlgol-likelanguagecannotrefertoadifferentinstanceofavariablethanthatspecifiedbythebindingrule.Toimplementthebindingofnon-localvariables,theprocessorkeepsahistoryofthecurrentlyactiveprocedurecalls,calledtheprocedurecallchain,aspartoftheauxiliaries.Atprocedureentryandexit,theprocessormanipulatestheseauxiliariestomaintaintheproperbinding.Therefore,thesource-levelviewofacomputationinanAlgol-likelanguagecanbecompletelydescribedbytheconstantprogramtext(T)togetherwiththesequenceofvaluesoftheuser-definedvariables(V),theprogramcounter(PC),andtheprocedurecallchain(C).Thesearetheitemsthattheuserwillwanttoobserveviathedebuggertomonitortheprogram'sbehavior.Thefirstlineofthefollowingfigureshowsafully-specifiedfinitecomputation.Thesecondlineshowsthatthetransformationfromstatesitoitssuccessorsi+1iscausedbytheexecutionofthepieceofprogramtextatPCi.<<{T,V0,PC0,C0},{T,V1,PC1,C1},...,{T,Vn,PCn,Cn}>>T(PCi)[{T,Vi,PCi,Ci}]={T,Vi+1,PCi+1,Ci+1}Notethatthelocationofthestatementthatisabouttobeexecuted(i.e.,theprogramcounter)isanexplicitelementofthecomputationalstate.Therefore,acomputationthatexecutesthesameactionsonthesamedata,butthatusesdifferentcopiesofthoseactions(i.e.,actionsatsomeotherrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb!î¤îWîìîWî Eî-âî3Òî8�î;Pî=vîBùîE*îF‰ï__îâ îÙî îî$=î&Ðî(Çî-ñî/±î1fî5èî7 î>îCîEîï\žîâîîtîl vï\žrî![ï\žï\žî"Bî$Úî*î,Ÿvî-Õï\žï\žî.Erî06ï\žï\žî1î59î:¾î=*îAîBÆîGîHcïYÜîâîŽîÆîôîãvî%ïYÜïYÜî%€rïYÜî*Öî-eî0ºî2lî8î=Ôî?pîEîI@ïWîâî! î!vî‰ïWïWî$ rïWî#Lî$Íî& î+Üî/X î5äî7¨î8æî=*î>øîAm îH.îIÅïTYîâîª îÍ î! î"Hî,0 î26î5eî6¢î9¤î?GîAºîD8îIƒïQ—îâ îŠîvî‚ î$è î+…î2î4Ÿ î:ƒî?«îEƒîH�ïNÖîâ î÷îjîšîî Ûî" î%±î'fî)Ìî/bî2 î54î7›î=0îC“îEiïLîâîIî>îî”îò î&¨î+�î1Aî4î6„ î>�î@îAGîFËîH�ïISîâî�î/î� ïE½î¤vîqïE½ïE½î!rïE½î’îGîºî$•î)õî,|î/$î5)î7+îDÜ ïBûîâ î>î†îõ î&Hî, î.×î4Nî:î;Ôî<ü îC/îHcï@:îâîî«î î‰îŠî 6î!`î% î+`î-Àî2Rî7 î9Yî;4î@kîCxîEØï=xîâîºî9 îÄîOî—î"0î$ î&‡î+8î-î/Žî5‹î9–î@8îC¾îF¬îH�ï:·îâî½îœî î!î!ÿî%lî)šî+¼î- î0æî4¬î6€î7Ð î@I îG*îHþï7õîâ îfîQîòî#hî%;î&Šî,Uî1Çî3¥î4ôî:Oî=šî@�îFnîH�ï53îâî îéî$î!î#‘î(¼î*‰î0¥ î6Ìî9@î?hîCRîD�îI5ï2rîâîOî:î4î!Äî%9î)>vî+«ï2rï2rî,[î1äî4‡rî7±ï2rï2rî8›î:Vî=Gî?îA{ îHóï/°îâîEî¸îPî4î sî&f î-òî1\ î7½î9Kî>æîA%îE�ï,î¤ îOî¡ î"î%Lî&øî( î0î1£î3† î9Øî?‘îBîCó ï)Yîâîøîßî+î…î#ÿî&£xî'ï)Yrï)Yî'ôî(Ýî.-î13î3~î9Rî:÷î?î@µîC ï&—îâîŽxîï&—rï&—îàî'îxîùî#ëxî$dï&—ï&—î%<rî&ï&—ï&—î&�î'[î*î,Uî2Êî5Fî8íxî9gï&—rï&—î:>î;ûî?ïîB4îD…îH ï#ÖîâîKîMîîhî î!4î#{î%ãî+öî-®î2øî5aî;ÖîBuîEVîH8ï!îâîšîøî î î!î">î+)î.Æ î7šî:pî?îA¶îEÂîH�ïSîâ î\îúxîbïSï yï î :rïSî!¢î#‡î%˜xî+ÂïSï yï î,™rïSî/[î0ýî5°î7âî:yî@åîBÔîEjîI5ï‘îâîqî(xîÁï‘ï‘î™yïKîqrï‘îxï‰î¤yïBî³xï‰î`yïBîçxï‰î”yïBîDxï‰îñîxyïBî"Øxï‰î#…yïBî& xï‰î&¹yïBî(ixï‰î)î+�î.ýî0­yïBî4 xï‰î4¹yïBî7Axï‰î7íyïBî9�xï‰î:Jï9îSyïóî³xï9î`yïóîoxï9îyïóî£xï9î Pyïóî"xï9î"­î%4î&äyïóî*Dxï9î,Jyïóî.Òxï9î0Øyïóî2ˆxï9î4Žrï£î¤î îÏî"îLî øî#Kî)tî,5î-”î1iî3 î4ïî:Ÿî= î?òîEtïâîâîEî,îøî&îÖî - î)'î-" î3Òî4ò î<äî?©îEîGqï îâîzî{îÕîMî¥î!!î#êî&ßî,î0¨î2\î5öî:Žî=–îB.îCÁîGO ZTVm$ÓCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES16locationintheprogramtext),isadifferentcomputation.Foreaseoflaterreference,weinformallypartitionthemodelintothreeparts:locations,data,andhistory.Thelocationelementsofacomputationaretheprogramcounterandtheactionabouttobeexecutedatsomestateinthecomputation.Thedataelementsofacomputationarethevariablesandtheirvaluesatsomestateinthecomputation.Thehistoryelementsofacomputationrefertothesequencingofcodeordataelements,suchastheprocedurecallchainorthenumberoftimesthatagivenactionwasexecuted.Thissource-levelmodeliseasilyextendedtohandlemultipleprocesses.Eachprocesscreatesaseparatecomputation,withitsownprogramcounterandprocedurecallchain.Variablesandprogramtextcanbesharedamongmorethanoneprocess.[Wearenotinterestedinmethodsforinterprocesscommunicationhere.]2.1.2Behindthesource-levelmodelThissource-levelcomputationalmodelisanabstraction;anexecutingprogramdemonstratesobservablebehaviorthatisoutsidethemodel.Furthermore,theactualsequenceofstepsrequiredtoexecuteaprogramonacomputerismuchmoredetailedthanthismodelsuggests.Topresentasource-levelviewofacomputation,adebuggermustmapthesedetailsintoacorrectsourceviewanditmusthidethepartsoftheimplementationthatareextraneoustothesourceview.Aprogram'scomputationalbehaviordoesnotincludeanyencodingofprogramoroutputtiming,dataorprogramstorageparticularsthattheusermightbeabletodeducefromtheprogram'sphysicalbehavior,oraudiblecuesfromspecifichardware(suchasdisks).Theseandothersimilaritemsarenotdirectlyspecifiedbythehigh-levelspecificationoftheprogram;rathertheyareimpliedbythelow-levelimplementationoftheprogramminglanguage,theoperatingsystem,thehardware,andsoon.Thedefinitionofcomputationalbehaviorconstructedhereexpresslyavoidsdefiningallsuchbehaviorsoastoavoidconstrainingthelow-levelimplementation.AcomputercoulddirectlyexecuteaprogramwritteninanAlgol-likelanguage,eitherbyinterpretingitorbyhavinganinstructionsetthatimplementedthelanguage.Forefficiencyandflexibility,ahigh-levelprogramisusuallytranslatedintoalower-levelrepresentationthatismoresuitedtotheparticularmachine,frequentlythenativeinstructionsetofthemachine.Thistranslationisperformedbyacompiler.Ofcourse,aprogram'sexecutiononanactualcomputercanbeviewedatmanydifferentlevels:thesequenceofprogramstatements,thesequenceofrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb!îâîîÇî&îµî!>î"ªî#Ôî)z ï^‹î¤îJî=îñî î"bî$„ î+,î0Âî3î7Pî:#î=§îAƒ îG‘ï[ÊîâîˆîÓîšîÀî$jî&î'* î/î1Uî3¤î9!î>î@·îCîG ïYîâî³îÆî¥î`îî!iî#9î%» î.Öî1Ðî4÷î:Õî<°î=ü îFîH�ïVGîâî‹î1îfî‚î î#Šî&©î(Eî*“ î3Fî6 î:Œî@5îAÜîBô ïS…îâî9îíîR îuî4î"�î$Jî'Uî-nî0¥î2Yî4¿î;Gî=ØîA“îC]îEÂïPÄîâî›îEîî=îñî î"µïM.î¤î½ îGî î!ëî%´î+œî-Jî1Ðî7I î>"îA”îFgïJmîâî)îŸ îî!Fî#>î&_î, î1)î3þî:žî=FîBîH7ïG«îâî^îî{îXî«î$î'žî*±î-Jsî2bïG«ïG«î2²î4«î6xî8` î=Zî>£îCîD ïDêîâ î¤uï? îâîÏîdî< î$-rï:ýî¤îÍ îh î%zî)Ãî+>î-> î4Äî6Äî<þîB� ï8<îâ î´î]î#î‡î$Hî& î+¥ î4î6rî:mî@MîAþîE^ï5zîâî’îŠî¶îGîOî{î%¨î'î*îî.„î3½î6åî9‰î=ÄîCñîFï2¹îâîÿ î~î¬îYîv î%½î&Úî,×î03î3Aî6¾î;î=Íî>êîCpîG³ï/÷îâî™îðîXîrîÒî:î óî#R î-1î/ÿî2S î98î:æî=FîA•ï,bî¤î\îô î##î)î,]î.þî4 î6×î<ëî>ÑîDŒîF|ï) îâîsîWîúîhî!ù î(’î+?î-}î0Uî4,î5ûî8Óî:aî>ÿîBEîDƒï&ßîâî)î+îéî Íî#Öî'7î,î2î5Áî7iî<$î@îBÐîFiï$îâî½îCîéîî"þî%+î'½ î.O î6dî8Oî:àîAîEYîH›ï!\îâîöîûîdîI î(1î)ôî,] î4ùî;!î=ŠîC²îH�ïšîâîFîîÇî®î‰ î%×î'“ î0˜î6K î=£î@ÁîFªïØîâîPî@îqî"î æî"”î$Bî( î/Ãî2#î7þïCî¤î`îºî¶î"Ûî(î)Zî/î3ûî5Ùî7ú î>ˆîDÖîHóï‚îâ îhîÄîŽî�î î" î(éî+ î-à î67î8�î?KîAü îH7ïÀîâ îhî— îüî"�î$î(· î/î1äî3 î: îCîEëîG[ïþîâî=î9îå îhî$’ î+ƒî./î2• î9½î<'î>-î@ÚîGÔï =îâ î²î*îúî î!8î'çî*î.¸î/íî6eî<¦î>¸î@µîDÄï {îâî¤îËî©îxîyî$Uî(Ïî+eî1ƒî3sî98 î@�îCîI5ÿÛTVm$¨CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES17machineinstructions,thesequenceofstepstoperformeachmachineinstruction(oftenintheformofmicrocode),thephysicalbehaviorofthecircuitsinthemachine,etc.Thesource-levelviewisthusonlyoneofseveralpossibilities;ithastheadvantageofbeingtheviewformulatedbytheprogrammer.Acompilertranslateseachsourcestatementintoasequenceoflower-levelinstructionsthatcarryouttheactionsspecifiedbythestatement.Thereareusuallymanydistinctwaystoaccomplishthesesameactions;whichonethecompilerchoosesdoesnotaffectthedefinitionofprogrambehaviorwehavealreadyconstructed.Thecompilerfrequentlyusestemporarystoragetoholdintermediateresults;whereandhowmanyofthesetemporariesexistisimmaterialtotheuser.Thecompileralsoselectsparticulararrangementsofstoragetoholdvaluesofuser-definedvariables.Forexample,mostusersarenotconcernedwithwhetherarrayelementsarestoredbyroworbycolumn.2.2OverviewofdebuggingfeaturesAninteractivesource-leveldebuggercanbeusedformanydifferentpurposes,dependinguponitscapabilities:debugging,development,testing,andperformanceanalysis.Debuggingistheprocessoffindingandfixingprogramerrors.Programdevelopmentistheprocessofaddingnewfunctionalitytoaprogram.Programtestinginvolvesmoreorlesssystematicexaminationofexternalprogrambehaviorusingvariousinputs;performanceanalysisexaminesinternalprogrambehaviorusingvariousinputs.2.2.1MonitoringacomputationAsinglesourceprogramrepresentsapossiblyinfinitenumberofcomputations,correspondingtodifferentinitialstates(i.e.,differentinputs).Iftheprogramtextcontainsnobranchesorprocedurecalls,thenitspecifiesexactlyoneactionsequence,whichcontainsthesamenumberofactionsinpreciselythesameorderastheprogram.Butevenasingleactionsequencecanrepresentmultiplecomputationsfordifferentinput.Iftheprogramtextcontainsconditionalbranches,theprogramspecifiesmanydifferentactionsequences,dependingontheprogram'sinput.Iftheprogramcontainsloopsorprocedurecalls,thesequenceofactionsexecutedforagiveninputcanbelongerthanthetotalnumberofactionsintheprogram.Whenaprogramfailstospecifyaterminationcondition,theresultingcomputationsareinfinitelylong.AnalyticallydeterminingtherïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb!îâîZ îîXî$3î%àî);î*Ýî0(î3Lî8Ä î?“îC“îE4îG‡ï__îâî¥ î.î˜îïî%©î'lî)Õî.�î0Uî2¿î8¥î;Èî>ª îF>îIƒï\žîâîî?î îâî’ î&‰î'ÿî*“î-î3¨î5€î9jî;éî?C îFtîH�ïYÜîâ ïVGî¤îOî( îPî"Ÿî' î-aî0Xî1 î7§î9 î@¢ îH ïS…îâîBîšîÜî[î ùî"×î% î+ïî/Óî2 î6žî:Kî?îB@îCÑ ïPÄîâîœîJî’îÐî"­î%>î+*î0fî3Çî6mî:iî<ú îCvîE`ïNîâî°îõîZîK î'¸î*®î0‡ î7Iî:`îA!îEñîG¾ïK@îâ îîïî -î# î&3î*#î,î/¯ î7Tî:ªî<; îCEîEîGžïHîâî�î;îêî î$) î,‰î.%î2ºî4Kî7^î;oî= îDÜ ïE½îâî™îuîÝîfî Äî#Eî)éî-î2hî5üî;Âî>!îBPîDWîG#îHóïBüîâtï<^îâîîYî²î%½rï8<î¤îÞ ît î!æî'Öî*Iî,!î/Dî1iî5î:¨î@®îGZï5zîâî îÝ î 4 î)î.î1 î9Kvî?Æï5zï5zî@Úrï5zîFÞîH�ï2¹îâîÀîƒîVîî! î&¦î+�vî10ï2¹ï2¹î1á rï2¹î8ãî:Yî<ÃîA¡îCdîHï/÷îâ îÇîUî^î‰vî%ï/÷ï/÷î%rrï/÷î)7î.nî1áî3…î5ú îï*tîâîŒîTuï$ªîâîÏ îŠîü rï ˆî¤î$îîHî Ë î'Bî(`î-¡î2^î7î9, îA÷ ïÆîâîÑî·îâîØî"&î( î.î/Òî2rî8Aî;9î@ÜîC#îI*ïîâîkîÙîîbî"áî'„î*6î.Uî4œî8°î>î@îDîI5ïCîâîhîîšîâî Iî#çî%î'Èî.î0�î3Àî4Óî8¨î<ªîB|îDðï‚îâîe îíî3î$âî){î+î-oî3î5Éî;5 îBfîH�ïÀîâî¦îUîUî$1î( î/yî6tî8°î;EîAåîF×îH�ïÿîâîrî×î‚îHî%Ìî)5î+–î1€î3:î7Ùî=—î?ÖîAîD·îHcï =îâîïîOî’î îPî#˜î%nî*'î+ñî.mî5î9Eî:‹î@7îCAîE îIÅï {îâ îH î¼îî$¹ î-4î/„ î5\î9J î@Ü îH�ÿ:TVm$XCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES18sequenceofactionsandstatesthatarisefromagiveninputisatbesttedious(forsimpleprograms)andatworstvirtuallyimpossible(forcomplexones).Infact,themajoruseofadebuggeristohelpprogrammersmonitorprogrambehavior,topinpointwhereinacomputationaprogrambeginstostrayfromitsintendedbehavior.Adebuggerthatcanmonitoracomputationcanhelpauserwithdebugging,testing,andperformanceanalysisactivities.Theimportantfeaturesfordebuggingarethefollowingbasicoperations:reportingthecurrentexecutionpoint,displayingthevaluesofvariables,settingandfieldingbreakpoints,anddisplayingtheprocedurecallchain.Fortesting,adebuggercancollectinformationforstatementexecutioncountsordatausecounts,toensurethatallcontrolpathsanddataconfigurationshavebeentested.Executionsummariescanalsoisolateprogramareasthatmightprofitfromtuning.2.2.1.1BasicmonitoringfunctionsThebasicmonitoringfunctionsofadebuggerincludeexaminationcommands,whichdisplayinformationaboutasinglestateofthecomputation,andcontrolcommands,whichspecifythesetofstatestobeexamined.Foraninteractivedebugger,thecontrollingcommandssuspendandresumethecomputation,sothatthesingle(current)stateisusuallythelaststatethathasbeengeneratedsofarinthecomputation.Thesearethebasicexaminationcommands:1.Reportthevalueofthecurrentstate'sprogramcounterinsource-levelterms.Thisfunctionreportswhichsourceprogramstatementinwhichprocedureiseitherexecutingorabouttoexecute.2.Displaythevalueofavariablevinthecurrentstate,intheappropriateformatforthedeclaredtypeofvinthatenvironment.InanAlgol-likelanguage,thecurrentprogramcounteruniquelydefinesanenvironment,orasetofvisiblevariables.Theeffectofthisfunctionisasiftheprogrammerhadincludedastatementtoprintthevalueofvintheoriginalsourceprogramatthevalueofthecurrentstate'sprogramcounter.Withtheaidofanexpressionparserand/orinterpreter,adebuggercanusethisbasicfunctiontodisplaythevaluesofexpressions.3.Displaythevalueoftheprocedurecallchaininthecurrentstate(alsocalledtheproceduretraceback).Thisfunctionreportsalist,usuallyinreverseorderofinvocation,ofthenamesofthecurrentlyactiveprocedures,theirpointsofsuspension(i.e.thecallingstatement),andpossiblytheirargumentsandlocalvariables.4.Setthevariableenvironmenttosomeotherprogramstatement.ThisfunctionisdefinedrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb!îâî¼îgîöîŸî!Fî$î'3î*Œî+§î/Mî2êî4Hî5Òî8¨î=cî@ îDbï__îâî­îZî"î¤ î#‡î&Qî+éî0–î2yî5’î8î<î>™î@fîA£îGÀîI@ï\žîâîß î)îMî$¾î*©î,:î1­î5§î78î8E î@!îA.îFŸïYÜîâî�îâîIî#îàïVGî¤î_î–î“îMî$½î& î.>î0øî4Aî5™î8Áî< îCKîH7ïS…îâ î#îu î#qî&†î-$î2Žî5î;ÿî>�îA,îG{ïPÃîâ î*îIîÊî#µî* î.$ î4Òî7Rî;¢î=| îC°îH7ïNîâîõ îËî‹ î%!î'‰î.î0¨î5Kî7ÿî<Æî=øîD îFžïK@îâ îfî�îÍî$üî)Rî+î.î0~î5+î6Ôî;3î=ûî?åîD’îH7ïHîâî î&î�î"î',î-Çî4Åî7tî:dî>ÌîDîH ïE½îâîÙî¯îzï@Çîâî0îð îérï<¤î¤îƒîý î î%&î&æî(î.'î3 î:âîB'îF<ï9ãîâ înîSîîlî" î$[î&½ î/î1Ëî6€î=ÀîAÑîFpîHÑï7!îâî¿î™îlî�îåî"µî$Ê î+�î2#î4§ î;»îBÅîH7ï4`îâîÊîI î»î Ÿî#Œî& î*î/òî3Cî4Îî9 î<î>¿îBîDýîG’ï1žîâî-îñîîÆî& ï. î¤î¥îùîXîË î%˜ï+GîeîîÜî]î!(î#î%ƒî*nî.�î4Mî9oî;? îBëîGÔï)îeîëîŸî"¹î'î,¯î2ñî4«î8Åî?Tî@ÌîDÄï&Þîeî)î î¹ï$îeîëîïîHî ëî"�î#Àxî(ðï$rï$î*Eî+íî.Eî3î6‹î82î:‹ îAäîFXîH�ï!èîeîóî xîÏï!èrï!èî 5î!ìî$Ä î-Áî/šî1” î7üî>$î@�îE`ï´îeîgî$î#ãî%Ô î.<î0î1,î3Jî5î9T î?íîBÆîF“îHMïîeîäîUîîmî Ò î(¹î+uî1!î2Oî8Šî:=î=ªî@îC½xîE{ïrïîFÜîH�ïKîeîfî¬î#1î$Àî'î*·î,fî.¼î3}î7�î=îBÐîFDîHšïîeîUî| îkî#Äî(¢ î0î1aî7¡î:bî=î?æîC�îI@ïâîeîîwî¥î!^ ï îeî+îpî î!îî#áî&{î-8î/ýî3ìî5Õî8nî=rî@ÝîD]îH�vïìîeî˜rî 6ïìïìî ¯î"î%Aî*Âî/rî0£î3Aî7ûî9±î>kîB'îCè ï·îeîîfîŸîLî  î&rî*S î1¦î4âî8úî:§ îAŒîD5îF‰ï ƒîe îlî$î#pî&·î-fî0î3c ï ÁîeîÕîî\îw î'jî(üî,sî/öî5i îÖîC§îF%ï]Àîeî‹î;îíî!“î$X î-2î1+î2Žî4Œî8èî:˜î=1îB¢îDHîFŸï[ŒîeïWöî¤î¥îùîXîËî"~ïU5îeîñî‚îá î%Ü î-³î2$vî3NïU5ïU5î4 î62rî;EïU5ïU5î;¾ïRsîeîñî‚îá î%Üî'tî+î0Ãî4çî8vî9»ïRsïRsî:lrî?õïRsïRsî@òîCFïO²îeîñî>îž ïLî¤î‘ î î&£ î/ î3~î5Ôî;Ôî?îAfîG½ïI[îâî|îïîîîîùî h î&÷î(Dî.\î2> î:žî?1îC�îE_ïF™îâî�îºîåïCî¤î4 î(î—îöî!ÿî#-î(¿î.Ùî0íî2î6Aî8¤î>±îB'îFÝîH�ï@CîâîÈîéî4îÊîpî!¼î'7î,$î0Uî3î8Šî=®îB îDWï=�îâî‰îÖ îˆ î#ýî&K î.3î/Œî64î:qî<¿îBâîD‰îFÖï:¿îâîŸî“îFîúî! î#î' î)"î0 î7Õî;ÐîB‚îG²ï7þîâî\îî%y sî,îï7þï7þî-> rî2–ï7þï7þï4iî¤î� îîî»îø î$üî,Cî1ºî5+î9lî;9î=¬îCOîHcï1§îâîÖ îûî#î!³î#óî&Vî)Ö î2lî85î<î@@îAmîGîI5ï.æîâî-îÍîÌî œî&<î*Yî.Ûî0Ñî3wî7î<¥î?ÐîB5 îI5ï,$îâîs î. î"cî'Úî*jî,úî0Ëî4Óî7c îAsîC^îD¹ ï)bîâî î-î¾îrî%!î*Ûî0 î2Øî8Èî:î=>îAÂîGêï&¡îâîŒ îîî·î%;î(Ïî+ˆî/î4�î:2 îA$ îH ï#ßîâîjî¿î»îÓîO î(Iî)Ñî,Mî0¹î4ƒî92î< îCîG‡ï!îâî=î î …î"?î%î'„î*‰î- î0Fî5&î6[ î=Xî?jîAÕîD¹ï\îâîžî×î†îIî´ î#"î)zî-2 î4}î86î;`î@è îG°îIÅï›îâîÍîÛîî î 'î$vî', î.'î1Wî3Ëî8;î:šî=“î?AîBÔîCþ ïÙîâîÁîË î�îÜîßî$Áî'žî*Cî.¯î3î8v î>cîAmîBô ïîâîîÖ î, î æî"©î%ä î,žsî/·ïïî0prî2ìïïî3§sïî4•rî7ïïzï"îâî0îô î ìrï ÿî¤îÁîÿî ¨î&Íî)~î+•î/î2�î5î8° î?ò îGï >îâîÔîîñî î&Kî,u î3œî6–î9 î@'îC! ÿqTVm$“CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES20assertion-drivenbreakpoints,andconditionalbreakpoints.Adumpisalistingofprogramvariablesandtheirvalues.Afulldumpshowsallofthevariables(includingdynamically-allocatedvariables)andtheirvalues,andislikelytocontainmoreinformationthantheusereitherwishestoseeorcanreasonablyabsorb.Afulldumpismostcommonlyprovidedafteracomputationhasterminatedabnormally,whenitiscalledapostmortemdump.Aselectivedumpshowsaspecified(andtypicallysmall)subsetofthevariables.Atraceshowsthecompletesequenceofstatesofsomefinitecomputationorsubcomputation.Itcanshowavaryingamountofinformationabouteachstate.Anactiontraceshowsthesequenceofactionsthatareabouttobeexecuted(i.e.,thevalueoftheprogramcounter,eitheraloneorwithitstext)ineachstate.Aresulttraceshowsthesequenceofactionstogetherwiththeirresults.Afulltraceshowsthesequenceofactions,includingthevaluesofvariablesthatarereferencedineachactionandtheresultsoftheaction'sexecution.Anotheraxisuponwhichtheamountoftraceinformationcanvaryisthegranularityofthetrace.Tracingwithfinegranularityshowstheexecutionofeveryactioninthesource-levelcomputation.Tracingwithmediumgranularityshowstheexecutionofeverybranchpoint,whichisanactionthatchangestheprogramcountertosomethingotherthanthelexicallyfollowingstatement.Tracingwithcoarsegranularityshowsonlyprocedurecallsandreturns.Afulltracewithfinegranularityofanentirenontrivialcomputationgeneratesmuchmoreinformationthanafulldump,andisthereforelikelytobehardertouse.Satterthwaite'sideaofthek-limitedtrace,implementedintheAlgolWdebugger,limitstheamountofinformationproducedbysuchatraceto(approximately)ktimesthesizeoftheprogramsource.Ittracesthefirstkexecutionsofastatement,exceptthataprocedureistracedthefirstktimesthatitisinvokedfromeachseparatecalllocation.Whenkisgreaterthanone,theintuitivebasisforthisideacomesfrommathematicalinduction:thefirsttimeastatementistracedformsthebasisstep,andthesecond(orkth)timeshowstheapplicationoftheinductionsteptothefirst(ork-1st)time.Tosingle-stepacomputationmeanstowatchitexecute.Thedebuggerstopsthecomputationbefore(orpossiblyafter)everystatementisexecutedsothattheusercanexaminefeaturesofthesequenceofstatesindetail.Itcanbethoughtofasenablingabreakpointateverypossiblesuccessortothecurrentstatement;whensomesuccessorisreached,allofthebreakpointsareremoved.Sincethe"statement"unitisrecursivelydefinedinthesourceprogram,thenotionof"successor"hasseveralpossiblemeanings.Forsingle-steppingwithfinegranularity,thesuccessorrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâîÖ î £î#[ î*‚ ï^“î¤vîbï^“ï^“îrï^“îKîéîDîŽî xî&9î,%î/î2‡î7ôvî9³ï^“ï^“î:!îIîB)vîC<ïVNïVNîCìîEþïS�îârîïS�ïS�îvvîïS�ïS�î†îGrïS�îÿî" î#6î(òî,"î1§î5¾î9íî;¦î> ïO÷î¤vî)ïO÷ïO÷î™rïO÷î�î‡îàî"Áî(£î*Uî.î/¶î3Bî6Ú î>Íî@ŠïM6îâîIîÄî<îUî.î!(î"Ñ î*Jî.î1<î5(vî7kïM6ïM6î8î;lrïM6î>»îB·îEïJtîâî·îpîZîÊîÇî ’î"žî(wî+ î.î1âî3·î62î;ÝîARîEZîI*ïG²îâîòîÂîèîŒî²îªvî!+ïG²ïG²î!°î$ÙrïG²î(-î,/î.„î4aî6î:¢î?ûîC îFGïDñîâvînïDñïDñîÝîärïDñîCîPî¯î"˜î$Pî)Eî/Yî1¹î5çî7 î=Zî@(îB| îI@ïB/îâîî î²îîAî éî#8î( î/î4kî7î:¡î>žî@îîEèîG‘ï?nîâ î«îvîÄîoî! î(Iî*Aî,àvî1—ï?nï?nî2î6äî:î= rï?nîDCîH�ï<¬îâîîÆîuîˆî 1î"Œ î* vî2Üï<¬ï<¬î3Äî7åî:Ûî?ñ rï<¬îFáï9ëîâî{îéîÜîÉî" î&Ðî+î,½î.æî38î6@î;¥î>>îDîI@ï7)îâî{îî-îƒî#Ðî)Ù vî0×ï7)ï7)î1¾î5Úî8Ìî<æ rï7)îCÑîGÕï4hîâîeîtî+ï0Òî¤îQîþî|î¹î§ î&Ãî(žî*¯î.½ î5 î=9îCcîG[ï.îâ îvî¦îÚînî!Óî$”î& î+üî/Äî1}î3wî7çî9Ÿî=îF2îI5ï+Oîâvîƒï+Oï+OîJî…rî`ï+Oï+Oî~ î$î&î(£î,¤î.Ëî5nî9{î<îAiîCd ï(�îâîîÿî1î[î¹î hvî*]ï(�rï(�î+©î/Sî1³î4_î6î8yî>îC5îD­îH�ï%Ìîâvî¥ï%Ìrï%ÌîÚ î~î"î6 î"®î&éî)¡î*µî1#î2yî6‡î8Ñvî;”ï%Ìrï%Ìî<Éî@]îCîDWîE­ï# îâî7îVîœîî#vî' ï# rï# î(Bî)›î.%î19î4+î6xî;Õî?îAJîCÙîFÀï Hîâîp î î!Õî$[î'[î*§î+÷î2Tî3çî82îÊîBNîE±îH�ï‡îâîtvî±ï‡rï‡îxî«îÑîÞî"= î)Oî+î-hî3’î6vî8%î:„î=\vî?™ï‡ï‡î@`rîAŠï‡ï‡îBîC{ïñî¤vîÄïñïñîH rïñîOîr î#fî'£î)Kî-<î.Œî4Pî7!î=$î@›îBô ï/îâî5îuîÆî~î"6î(oî)Þî/Ÿî1fî48î6›î9˜î<&îA¢îFÒîH�ïnîâîîñîÝîÁî!Öî#ƒî&Eî(mî-Æî/µî1šî7kî8Ë î?òîAÂîE¬ï¬îâîîäîsîm î%Lî)1î,ôî3î4³î:]î<}î>fî@ö îH›ïëîâî�îRîÁ î#gî&Zî'Ö î.Êî3Úî5˜î8î×îA‰ïYáîâîîb îyîî%âî(î*î/dî4=î7Ÿî9iî;äî@OîFñîH�ïW îâîÀîîÒîî"î#Vî$éî* î2^î5ªî8Àî;× îCîEIïT^îâîTîÀ îLî=î!Uî$²î&Kî)Þ ïPÉî¤î†îÝît î# î)‹î,©î6 î=î@¿ îH7ïNîâîQî®îJ î$÷ î+mî.‘ î5J î<òîAUîC²îI@ïKFîâîÎ ïG°î¤î>î%vî ÊïG°ïG°î!eî'rïG°î+jî/î1—î6æî8Áî<Žî?îBÒîI*ïDïîâî;î¼îOî!•î$þî(r î0Bî1Üî#î?òîA«îE¬ï<ªîâîSî îRîôîGî%™î(eî,î-ðî3íî:!î<¶ îD4ï9éîâî�îºîÒî‹îêî Uî#oî(Bî,9vî.*ï9éï9éî.Åî4Eî73rîÕîA¸îB÷îHCï3’îâîPîî[î{î(î"Æî%ˆî&Òî)qî.Xî/Ùî2Æî5Eî:²î>/î@˜îDçîF‰ï0ÐîâîêîMîî…î!Ãî#«î&Cî,9î0_î5@îãî@¤îG9ï'¸îâîÖîjîÚ î rî&&î)î/î2þî4ý î=1î@| îH7ï$öîâîÕ î!#î$©î%Ñ î.ý î5ìî8vî:{î> îA2îE ï"5îâî* îÐîÐî$î'âî+–î/ãî2+î8Rî=ë îDÄïsîâî�îðîîî‡î"~vî#¨ïsïsî$ î(Í rî/ïsïsïÞî¤vî4ïÞïÞîäî= rïÞîÿînî"Íî$×î& î-÷î4î8î:mî=îBc îI5ïîâîí îÆîÐî"Pî%$î'Šî-šî1î5Ëî7î9åî<åîC îE…îI5ï[îâîQî—îî1î!0î$î&}î)ÿî+½î/Úî2J î8lî<%î=¡îBBîC½îD÷îI5ï™îâîuî…î™îêî"7î& î)nî+¿î/.î4î6Ùî:jî?ÔîB”îDåïØîâîTîîµîîî$Bî&¢î*Kî,î.dî3šî5ï Bî¤vîsï Bï Bî î® rï Bî!¯î#^î%’î+óî-ïî/\î4Öî7Wî; îBLîD>îH�ï �îâîìî_îîÁî!"î$î'Òî*2î/Âî4ùî6fî;‰î=Çî@'îE^îFË ]TVm$CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES22oraccessed)andtheexecutionstateoftheprogramsatisfiesaspecifiedcondition.Thevaluesofvariables,theprogramlocation,andsomeelementsoftheexecutionhistory(suchasvaluesintheprocedurecallchain,statementexecutioncounters,ordatausecounters)maybelegalcomponentsofthiscondition.Anassertion-drivenbreakpointcausesthedebuggertogivecontroltotheuserwhenevertheexecutionstateoftheprogramsatisfiesaspecifiedcondition.Itdiffersfromaconditionalbreakpointinthatitsconditionisevaluatedateverystate,whileaconditionalbreakpoint'sconditionisevaluatedonlyinthestatesspecifiedbytheprogramcounterorvariable.Notethatifanassertion-drivenbreakpoint'sconditioncanrefertothevalueoftheprogramcounterortheaccessofavariable,thenalltypesofbreakpointsarespecialcasesofassertion-drivenbreakpoint.Anyofthesebreakpointscanbeextendedbyallowingtheusertoassociateadebuggingprocedurewiththebreakpoint,toexamineanddisplayelementsoftheexecutionstate.Thesebreakpointsarecalledprogrammablebreakpoints.Ideally,anycommandthatcouldbeenteredinteractivelytothedebuggercouldalsobespecifiedinadebuggingprocedure.Thusaprogrammercouldconstructaspecialtraceroutine,forinstance.Finally,thedebuggercouldrecordsomeorallofthedataandlocationchangesinacomputationforlateraccessbyvarioushistorycommands.Forexample,ahistoricdisplayoftheexecutionpathofaprogramiscalledaretrospectivetrace[Johnson82a].Thisinformationcanberecordedatvaryinggranularities.Possiblegranularitiesforretrospectivetracesinclude:alistofrecently-executedstatements,alistofrecently-executedbranches,andalistofrecently-executedprocedurecalls.Foratypicaldebugger,theprimaryformofretrospectivetraceistheproceduretraceback,whichliststheactiveprocedurecalls.Notethattherecently-executedprocedurecallsandtheactiveprocedurecallsareincommensurate:somerecentcallsmayhavecompleted,whilesomeactivecallsmaynotbeatallrecent.Itisrarerforadebuggertorecordoldvaluesofvariables.Itisimportanttonotetwobasicfacetsofdebuggerusehere.Somedebuggingactivityispreplanned.Thatis,theuserspecifiesinterestinagiveneventbeforeitoccurs.Forexample,breakpointsandtracesrepresentpreplanneddebuggingactivity.Incontrast,otherdebuggingactivityisunplanned.Programexceptions,userinterrupts,andproceduretracebacksfallinthiscategory.Inmanydebuggerimplementations,thedebuggercangivemoreinformationaboutpreplannedeventsbecauseitknowsaheadoftimetocollectrelevantinformation.Similarly,preplanneddebuggingactivitynecessarilyoccursatthedebugger'simplementationgranularity,rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb!îâî°vî­ïb!ïb!î]rïb!îZîÃî"î%<î&ÿî)hî/î4î5Hî; îBîDþîI5ï__îâ îõîUîäî"sî%+î(¾î.yî02î2’î8Èî=YîAîB²îFáîH�ï\žîâî\îÝîáî" î(9î. î/Èî2Ãî5/î;$î>î@îCB ïYÜîâî›î< ïVFî¤vî ïVFïVFî¼îÄ rïVFî$–î(äî+Xî1uî38î6:î;î<Äî?8îBFîH�ïS…îâîïîøî‰îÀî!&î& î' î,ž î3Hî4—î8¾î;ýî<þ îCþ ïPÃîâîÖîéî înîî$�î&mî*fî.5î2/î3ž î; îCîIƒïNîâî\îÄîÂîpî!uî'€î)Ëî,yî2Wî7§î9ºî@kîD1îGNîHþïK@îâîÒ î šî&´î);î,ˆî.1î0Œî41î5æî8@î=ËîBÇîD†îFáïH~îâî›îÅîSîzîjîþî!· î),î+î/ûî3mî5&î? ïDéî¤îàîÒî” î"Bî%î'0î-Qî/†î5Bî7Úî; î<ôîBÒîD5ïB'îâîŒîÍîS î"Ãî$˜î*7î-î1îî7Ðî9°î<6îB’îFìï?eîâ î€îüvîï?eï?eîÍ î& rî,Üï?eï?eî.Žî3 î6jî<ôî?ëîCßîEùï<¤îâ îŠîîcî Rî$î&µî(‹î.-î/Áî0Ðî7o î>™îAýîC ï9âîâî®î—îÀî<î!™î&ºî(÷ï6Mî¤î„îºîšî"=î&cî)Íî+gî-.î.¾î0ôî3Ðî6^î;lî@oîAôîBô ï3‹îâîî,î.îvîÚï3‹ï3‹î–î#@rî)[ï3‹ï3‹î*£î-Bî3î4%î8øî=žî?KîAŸîGÈï0ÉîâîŒî¦î%î‚îjvî„ï0Éï0Éî î%0sï0Éî(€ rî.¬ï0Éï0Éî/íî2ø î:rî<îî>ÐîD|îFï.îâ îîš î%¯î(* î0wî4–î:-î;”î>î@ï+Fîâ îáîøî#îÉî%Ÿî+¬î.Pî/gî1’î38î>îD~îHCï(…îâîî‰îñîWî"“î&î'À î/Öî39î4«î7î=š îDîH,ï%Ãîâî)îýîhî#î"�î%7î'~î2Oî8ºî;±î>Pî@—îDkï#îâîòîGîî"£î&Çî)Øî,Ýî0$ î7-î:âî>wîBdîEtîHyï @îâîÓîkî[î[îÒî>îšî!×î#î) î*¸î/î1rî5 î7Y ïªî¤î@îÑîXî,î lî#=î&Öî*Òî,°î2Þî5yî9ºî=µîD”îIƒvïéîâ rî>ïéïéîÜîBî%î¤î!¼î'Uî,Sî. î/iî3<î7î;~î<ôîBSîEï'îâ î–î�î­î#ê î+hî2aî8„î:’î@VîD5ïfîâîÊvîUïfïfîrî\ïfïfîúî"² î)âî,ú î3½î6“î=5 îCøîF€îHMï¤îâî î¤î¤î!âî,Ñî/fî5¤î8cî;†î?N îG ïâîâ î^îÔî 4î!Çî&Hî*ˆî,î/áî1Íî6Zî;Ú îDº ï !îâ î\îRî"W î)mî-îî/Ãî2^ î9€ îC› ÿ ¦TVm$CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES23becausetheusercannotspecifyotherwise.Incontrast,unplanneddebuggingeventsmayfrequentlyoccuratprogramlocationsthatarebelowthelevelofthesource-levelmodel.Thedebuggermustreporttheselocationsintelligibly.2.2.2SampleusesofsomemonitoringfeaturesToconstructaprogramthatembodiessomefunction,theprogrammerconstructsaseriesofstepsthatareintendedtotransformtheinputintotheoutput,littlebylittle.Inthepopulartop-downprogrammingmethodology,theprogrammerdecomposesthedesiredfunctionintoaseriesoflargesteps,thendecomposeseachofthesestepsintoaseriesofsmallersteps,andsoon,untileachstepisalegalstatementinthechosenprogramminglanguage.Asaresult,theprogrammerisfamiliarwiththeprogram'sstepsanditsdatastructuresastheyappearintheprogramtext.Itisadebugger'sresponsibilitytocommunicatewiththeprogrammerinpreciselytheseterms.Forexample,theprogrammerfrequentlyassociatesassertionswithspecificprogramsections,suchas"thevalueofyisnon-negativehere",or"thevalueofxismonotonicallyincreasinginsuccessiveiterationsofthisloop".Theseassertionsmaybeexplicitlystatedintheprogram(asspecialassertionstatements[Sites72]orsimplyasteststhatprintawarningmessage)ortheymaybeimplicit,appearingonlyincommentsorintheprogrammer'smind.Adebuggermustreportthecurrentexecutionlocationandthevaluesofvariablescorrectlytohelptheprogrammerverifyimplicitassertionsofthiskindduringtheprogramcheckoutprocess.Aprogrammerformulatesquestionsaboutthecomputationalbehaviorofaprogramandthentranslatesthequestionsintotheavailabledebuggingcommands.Thefollowingexamplesshowspecificquestionsthataprogrammermightwantanswered,asopposedtogeneralquestions(suchas,"WhydoesthevalueofxdifferfromthevaluethatIexpectedatthisprogrampoint?").Asophisticateddebuggermightbeabletoanswerthesegeneralquestionsdirectly.Questionscorrespondingtolocationbreakpoints:1.Whatisthevalueofvariablexbeforeaparticularassignmenttox?Toanswerthisquestion,aprogrammerusuallyplacesalocationbreakpointontheassigningstatement.2.Whatarethevaluesofvariablesusedtocomputethenewvalueofx?Again,thelocationbreakpointisusuallyplacedontheassigningstatement.3.Whatisthevalueofvariablexafteraparticularassignmenttox?Inthiscase,aprogrammerusuallyplacesalocationbreakpointonthestatementfollowingtheassigningstatement,becausemostcurrentdebuggersdonotallowausertospecifythatabreakpointistooccuraftertheexecutionofastatement.rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâîéî/îîoî!ò î(Ãî*wî/âî6£î=BîAaîDK ï_gîâîœî.î¶îjî"2î$~î(…î*Ýî.î/Ïî2' î9«î>²îA„îG†ï\¦îâîî�îJ uïVÜîâîÏî¦îDîHî"„ î*ârïRºî¤îÛîÔîî ­î#Œî)Æî-iî3Lî5¼ î=® îD,îEfîI5ïOøîâî{îyîýîêîÉî&Dî(Ôî,¯î/¸î2Hî7Bî:¤î<ÐîA=îC=îEÍïM6îâîN î î&ëî)� î1š î9qî<îAîF¶îIÅïJuîâî îXî¾î~î£ î&Cî)sî++î.³î2î4ñî6î9Øî;�î@WîDîFÍîH�ïG³îâîzîüî0îíîhîþî&…î(„î+4î0 î8úî@>îB îDîH�ïDòîâ îúî›îñî!Bî#×î*xî.î1î3î6N î<Åî>©îAîîF«îH�ïB0îâî�î4î»î7îq î#g î+éî-§ î6*î9Uî;Ä îC·vîEuïB0ïB0îF%ï?oîâî^rî‡ï?oï?oîîÄî¥î" î* î0» î6õ î=:î@eîE`ï<­îâîžîîîWî!Dxî#@ï<­rï<­î$ßî&Ž î/î3gî5nî8Áî<®xî>ªï<­rï<­î@IîAø ï9ìîâ îpî5 î¸ î#Íî%�î(Uî-5î1N î7™î:´î<¼ îB»îFÊîH�ï7*îâîmî‘î î ¶ sî'lï7*ï7*î'»rï7*î+Ûî-›î2î3²î6¿î9‰î<îî>îC]îI*ï4hîâîàîÓî²îî"Sî%[î&÷î-sî/%î0Áî3 î;¼î@îA�îG†ï1§îâîîbî*î ^î%“î(Iî*§î.Óî0‹î6Dî;èî=•î@®îC ï.åîâîÍîØ î îÆî"gî%—î*î,hî1öî7Éï+Pî¤î* î î!Ïî'Ýî+¸î. î7î<¸î>kî?�îEîGÈï(�îâ îî“îËî Çî#Kî)*î0î8î;îADîGfï%ÍîâîÎîäî´îà î%Äî)½î-î3~î5-î:©îî/Çî4šî:®ïµîâîC î9îèî% ï€î‰îîÖîAî¡îKîxï€î$Žrî&>ï€ï€î'î*�î+¶ î1ì î8ýxï€î:ÿrî<¯ï€ï€ïKî1îWîóî”î!|î"¦ î*ˆî/:î3Rî4|î9² î@£îB¨îEï¤î1 ïpî‰îîÖî)î‰î·î pî&+î)gî+î0»î3î6 î9²xïpî;¿rî=oïpïpï;î1î•îôî+ î%î&ˆî+:î/•î1œî3ûî9â ïî‰îîÖîAî¡îKîxïî$Žrî&>ïïî&ãî)yî*£ î0Ù î7êxïî9ìrî;›ïïï Òî1îîÐî.îo î#iî(3î,cî-¤î2ò î9úî<î>�îDÜï +î1î�î� î!+î&Zî)Ãî.™î54î7Gî9Éî=î>µîA»îCvîH ï ƒî1îZ îKî·îevî!&ï ƒï ƒî!Örï ƒî$Yî&¸î,íî.¦î/Ð ÿ ,TVm$ CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES244.Whatarethevaluesofsomevariables(otherthanvariablesassignedorusedinthisstatement)atthispointintheprogram?5.Howmanytimesdoesexecutionreachthispointintheprogram?6.Bywhatcontrolpathdidexecutionreachthispointintheprogram?Theresponsetothisquestiondependsonthegranularityofthedebugger'slocation-orientedhistorycommands.Theproceduretracebackrepresentsthecanonicalgranularity.Questionscorrespondingtodatabreakpoints:1.Whereinthiscomputationisthevalueofvariablexaltered?2.Howmanytimesisthevalueofvariablexaltered?3.Whatarethevaluesofsomeothervariableswhenthevalueofvariablexisaltered?4.Whereisthevalueofvariablexused?5.Howmanytimesisthevalueofvariablexused?Questionscorrespondingtoassertion-drivenbreakpoints:1.Whereinthiscomputationdoestheprogram'sexecutionstatesatisfythegivencondition?2.Howmanytimesdoestheprogram'sexecutionstatesatisfythegivencondition(whenthepreviousstatedidnot)?Aquestioncorrespondingtotracingorsingle-stepping:1.Whatcontrolpathdoestheprogramfollowforthegiveninput?Thisquestioncanalsobeansweredwithlocationbreakpoints,butthatmethodismoreworkfortheuser.2.2.3ModifyingacomputationManydebuggerspermittheusertomodifyaswellasmonitoracomputation.Thissectionbrieflydescribestherangeofmodificationfunctionsandtheiruses.Thesefunctionsarediscussedinlessdetailthanthemonitoringfunctionsbecausetheyaresomewhatlessimportant,bothfordebuggingandforthisdissertation.AlthoughChapters3and4considertheeffectsofoptimizationonsomemodificationfunctions,theimplementationportionofthisdissertationconcentratesonthebasicmonitoringfunctions.Adebuggerthatcanmodifyacomputationcanhelpauserwithdebugging,development,andtestingactivities.Theabilitytoassignavaluetoaprogramvariableorreturntoapointintheprocedurecallchainwithareturnvaluecanacceleratedebugging,allowingaprogrammertogetaprogram'sexecutionbacktoitsintendedstatesothatfurtherprogrammingerrorscanbediscoveredduringtherestofthatcomputation.Adebuggercanbeusedforinteractiveprogramdevelopmentifitallowsausertoassignvaluestovariables,callprocedures,orcreatenewvariables,statements,orprocedureswhenevertheexecutionoftheprogramissuspended.AdebuggerthatrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb!î‰îî®îíî9îSîøî#wî)î-"î04î5Ûî;@î<ðî@îA²îD? ï`yî‰î"îÃîbîîpï^Eî‰îîsî=îçî î&Lî*î,£î0Bî1ðî4Pï\î‰îî2î�îAîhî!Ýî(î+Èî.iî2î3¶î6ïYÜî1îî­îZîûî$Šî)ùî+þî.] î5Xî7î9o î@TïX4î1îÂîƒî![î'Þî-þ î4€î6àî<ó ïTŸîâîC î9îèî"í ïRkî‰îî‘î?îà î"Úî$Fî&¦î*Oî,xïRkî1’rî3BïRkïRkî3èïP6î‰îîsî=îçîSî ²î$\î&xïP6î+Ÿrî-OïP6ïP6î-ôïNî‰îîÖî)î‰î·î pî$î'¢î-]î1î3qî7î8ÔxïNî>^rî@ïNïNî@qîAzïKÍî‰îî‘îüî\îî¿xïKÍî%Irî&ùïKÍïKÍî'ÀïI˜î‰îîsî=îçîSî ²î$\î&xïI˜î+Ÿrî-OïI˜ïI˜î.ïFîâîC î9îèî)Ü ïCÏî‰îî‘î?îà î"Úî& î(jî.Öî5 î8<îÉîB~ ïAšî‰î5î±î›îdî ´î#3î)¾î0î3cî7°î:/î>îDAîH�ï?óî‰îîIî¿ï<]îâîoîþ îõî ¤î%5î&ùï:)î‰îîÖîˆî¯î ßî#?î(Íî-î/Cî1¢î5Wï7ôî1îGîÓî[î $î"î(î+-î0` î8*î:§î=rîBzîCâîGqï6Mî1înîÍuï0ƒîâîÏî·î) rï,aî¤î±îTî Ûî#Qî&aî(&î,ùî.¾î1Âî3†î8Þî: îC!îFRï)ŸîâîAî#î|î@î ó î(ñî.éî1šî4Ûî8¤î<ŸîB—îDåï&Þîâî®îbîKî�î î$Fî*bî/¢î2Ðî5Bî;Ìî> îEWîH±ï$îâî…î&îLî× î$Îî*Öî0’î1°î4Qî5oî:Ñî=îASîBõ ï![îâî îÀ îæ î#_î%á î/âî4ãî6¾î9‚ î@í îHèï™îâîAî´ îÐ ïî¤î#îîßî]î# î$) î,î.”î1¢î2¾î5ªî8· î?¼ îH7ïBîâî[ îîïî!<î"ýî'î(Zî,î-Ùî/î4¹î:î;Úî@îAÞîCîFÍîH�ï�îâîrî îÎîöî -î$iî(!î*¹ î1 î82î=Âî>ú îFéîH¥ï¿îâîZîî—î!,î#(î%Qî+[î.Úî0ìî4 î8ÿ îAàîF$îHþïþîâ î½î8î£îOî!î#ì î,Ùî.pî4„î7î9î<]î>¦ îE`ï <îâ îúîBî€î•î¦î!‡î#î'î+&î,¼ î2·î5) îîBîDÛ ï zîâ îúîÅ îÒî% î'sî-¯î/nî1Ôî7iî8Û î@~îBîH ÿUTVm$¶CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES25allowsprocedurecallsandtheassignmentofvaluestovariablesaidstheprogramtestingprocessbyallowingeasycheckoutofindividualprogramcomponents.Thebasicmodificationcommandsare:1.One-timedatachange.Assignavaluetoavisiblevariable.2.One-timecodechange.Executesomestatementintheprogramminglanguage,includingabranch,anarbitraryprocedurecall,orareturn.3.Alterthedata.Declarenewvariables,eitherforthecurrentenvironmentorforsomeotherenvironment.4.Altertheprogram.Insertnewstatementsintheprogram,eitheratthecurrentprogramcounteroratsomeotherpoint.5.Alterthecomputation.Restorethestateofthecomputationtosomepreviousstate,sometimescalledreverseexecution.Whenadebuggerallowscomputationmodification,itsprogrammablebreakpointscanbemorepowerful.Aprogrammablebreakpointthatmodifiestheexecutionstateandthenresumesprogramexecutionwithoutuserinterventionactsasaruntimeprogrampatch,andissometimescalledadvisingaprocedure,programpoint,orvariable.2.3ConventionalcompileranddebuggerimplementationsTosupportinteractivesource-leveldebugginginacompilationenvironment,aconventionalnonoptimizingcompilersuppliesthedebuggerwithmappingsbetweensourcestatementsandobjectcodelocations,andamongvariableidentifiers,types,anddatastoragelocations.Assumingtheexistenceofthesetwoabstractmappings,Section2.3.1brieflydescribeshowthedebuggerimplementsthebasicmonitoringfunctions.Section2.3.2ismoreconcrete:itdiscussesseveralwaysthatacompilermightsupplythestatementandvariablemappingsanddescribeshoweachformofmappingisused.ReaderswillfinditinstructivetocomparetheconventionalimplementationdescribedherewiththeversionforoptimizedprogramspresentedinChapters5and6.Thissectiondoesnotconsidermachinearchitecturerequirementstosupportinteractivesource-leveldebugging;Johnsonpresentsagoodtreatmentofthatissue[Johnson82b].rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâîî±îÏî–î" î)$î*íî/*î0çî6²î9™î<îA¦îFï_gîâîÞîaîeî7î ð î'sî- ï[Òî¤î|îï îóî&ØïYîe{îñïYïYîôî`î rïYî"¬î'î(Eî+ïî-�î.Çî3ïVOîe{îøïVOïVOîûîlîZrïVOî"íî(+î+Åî2î3¶î6 î>µîDÚïTîeî�î…îuî"î(�î+€î-Dî.nïQYîe{îïQYïQYîéîLîˆrïQYîÂî#õî&ÿ î-/î18î3’î6î:õ îC îEîG[ïO%îeî ïLcîe{îþïLcïLcîÙî.î\rïLcî §î$ î'› î.bî0î2Šî8~îî@‰îE`ïJ/îeîfî*îÂî Uî#ôïGmîe{î2ïGmïGmî î�îì rïGmî#¡î(ìî+Œî.þî0øî3˜ î;Óî=ÂîA•îGeïE9îeîvîïE9ïE9î™î#’rî)(ïE9ïE9ïA£î¤î£î´î¤î ¹ î(š î0Þî2  î;µ îCîEƒîG[ï>âîâî`îÕ îë î&Äî){î.ýî1Eî7cî:|î=î@*îE`ï< îâîOî“îÅ î%´î(£î*Šî+ëî1[î7"î;sî>cî@îF÷vï9_îârï9_îîE î î!¯î%¦î'jtï2Áîâî î¦î%|î))î1Mrï.Ÿî¤îçî îÙ î'€î.Uî0î1e î9 îA�îBÔ ï+Þîâ îéî‰î"¼î%î*îî-îî4î9fî=š îD9îFÕï)îâîK î�î[î î%\ î,Mî0\î35î6\î;1 îB îH�ï&Zîâî#î@î.î>î#ºî*¶î/úî3£î8lî>¹îB!îDåï#™îâ îuîýî™ î#Þ î+ î0î3�î5î8Òî>îî@nîF^ï ×îâîPî1îlî:î Cî$Æî'8î-î0Iî5‘î;ãî>­îD§îG½ïîâîÉîî=î)î"Aî(î+9î.§î0} î7¬î9Ûî?õîBÔ ïTîâ îÕîî"Cî%rî'æî,Âî/î5”î;¼îBîCÓîIºï“îâî™ïýî¤îîî§î {î&Sî,7 î4 î<Èî>ÕîD@ ï<îâ îl îŸî#î(fî)�î-î38î4ñî7¿sî;ï<ï<î;k rîAbï<ï< TVm$÷CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES262.3.1AbstractimplementationofbasicmonitoringfunctionsThebasicdebuggingoperationsaretoseta(location)breakpoint,todeterminethecurrentexecutionpoint,todisplaythevalueofavariable,andtodisplaytheproceduretraceback.Tosetabreakpoint,thedebuggerusesthemappingfromsourcestatementstoobjectcodelocationstodeterminetheobjectlocationcorrespondingtoagivensourcestatement.Itplacesabreakpointthere(i.e.,itensuresthattheprogramexecutionwillstoptheresothatthedebuggerandpossiblytheusercangaincontrolofthecomputation).Italsorecordstheexistenceofthebreakpointatthesourcestatementinaninternaldatabase,sothattheusercanlistorremovethebreakpointlater.Todeterminethecurrentexecutionpoint,thedebuggerusesthemappingfromobjectcodelocationstosourcestatements,applyingittothecurrentprogramcounter.Thismappingusuallyhasmultiplelevels,suchasamappingfromabsoluteobjectlocationstomodulenames,amappingfrommodule-relativeobjectlocationstoprocedurenames,andamappingfromprocedure-relativeobjectlocationstosourcestatements.[Note:theselevelscorrespondroughlytoloading,linking,andcompiling,respectively.]Thedebuggercanthenreportthesourcestatement,procedurename,andmodulenametotheuser.Somedebuggersusethisfunctiontofieldabreakpoint:thedebuggerdeterminesthecurrentexecutionpointandsearchesitsbreakpointdatabasetoseewhethertheuserhasrequestedabreakpointatthatsourcestatement.Becauseunplanneddebuggeractivitymayoccuratanobjectcodelocationrepresentingthemiddleoftheexecutionofsomeprogramportion,thedebuggermayneedtorecordmoreinformationtopermitmappingobjectlocationstosourcestatementsthanitneedstopermitmappingintheoppositedirection.Todisplaythevalueofavariable,thedebuggermustknowwhatsourcestatementdefinesthevariableenvironmenttobeused.Bydefault,thedebuggersetstheenvironmentfromthecurrentprogramcounter,determiningthecurrentexecutionpointasdescribedabove.Givenasourcestatement,thedebuggerusesthemappingfromidentifierstouser-definedvariablestogetthetypeinformationforthevariableandfinditsstoragelocation.Foranon-localvariable,thisoperationinvolvesaccessingtheprocedurecallchaininexactlythesamewaythatacompiledvariablereferencemight.Thedebuggerthenprintsthecontentsofthestoragelocationformattedaccordingtothetype.Todisplaytheproceduretraceback,thedebuggeraccessesthecurrentprocedurecallchain,whichtypicallyrecordsobjectcodereturnaddresses.Foreachobjectcodelocationinthischain,rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓuïaïîâîÏîn î%î'î+3 î3�rï]Íî¤îšî*î î%Íî(?î* î,Fî-� î3Õ î;;î=îC§îF%ï[ îâîîî½îpî!Ïî%yî'2î([î-êî0¢î2Pî7î9bî?å ïWvî¤îèî"îi îÏî!Kî'rî*ˆî-î2Þî6bî:Ï îA¦îCqîG§ïT´îâî«îhîøîfî#�î(Ò î1×î3“î4Ëî8�î<ë îDîEžîIÅïQóîâ îæî„î¥îî# î%ïî(bî.î4Nî7 î:î=¸î?�îBrîDåïO1îâî±îîŽîŸîCî"_î')î(úî+r î4ñî6�î9eî>Qî@ÉîF¾îH�ïLpîâ îÖîrîÔî'î$`î&î(î-î3î4Ûî7­î:î= î?›îAÛîC£îH�ïI®îâ îÓïFî¤îßîuîéî!Çî(î,î.�î4®î7»î:/î?ÿîCzîG§ïCWîâî¦î]îµ î!Ðî'~î(Ýî*”î,ýî1Ïî7gî=Tî@wîF<ï@–îâîLî»îÒîùîœî »î&lî)Èî/,î3:î8êî:Žî?ƒîDîE3ï=ÔîâîEîî *î%áî'Œî. î2£î5Wî6}î<5î?˜ï;îâîîÃîxîÎ sî&pï;ï;î&¿î)ëî,Äî/Ò î5‡î9žî:ûî?5îC9îEj ï8Qîâ rï8Qîéîêî î"Ðî&î*kî,óî1l î8"î>ÎîCîEîï5�îâî‹î#îkîîÒî$Iî&§î)2î.•î0-î3Fî4Y î;­î=õîCè ï2Îîâî€î‰îýî Ûî#Ñî)sî+� î2¼î8–î:„î=îB£îEAîHyï0 îâî'îU îJîæî!¸î& î-&î2lî9Kî?XîD&îG.ï-Kîâî€îuî“îàî î&ùî)^î. î/Éî2.î8hî:&î=¿îCSîH�ï*‰îâî#î_îõîÛî"cî&. î-ðî/×î4€î:tî>ÅîD¸îFŸï'Èîâ îœîÂîîùî¨î$î)Ôî+‚î-áî3f ï$2î¤îÀîiî¾î^î î!,î&±î)î/î2cî6î9kî=°îCÛîH�ï!qîâî î%îÒîÁî#Öî%ñî*ðî-Nî3Vî5öî8T î@aîCÇîF%ï¯îâîšî î!ûî$ƒî)vî/Ôî3œî5sî;Æî@öîELîFŸïîîâ îeî¹î·î ¦î"úî(ªî, î2rî4 î;ùîA©îCLîEŠîGÞï,îâ îoî°îî Mî#î%ùî'×î,�î2¦î5Uî6‚î<ŽîB îDÅïkîâîyî¡î@î$î&Îî*Ãî,±î1Žî4-î7êî;î>î?zîE¸ï©îâîËîuî9î"-î%?î)î+bî0¼î2aî4¬î9Jî>lîD®ïçîâî�îðï Rî¤îäî°î)î!Æ î(Wî*Ðî0óî6Dî8½î= îD<îFáï ‘îâîöî€îZî!yî$Åî(ú î/õî2¦î5Ýî9üî=IîB†îD9îFáÿ ETVm$ÁCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES27thedebuggerreportsthecorrespondingsourceinformation,asdescribedintheparagraphondeterminingthecurrentexecutionpoint.Thedebuggercanalsoreportthevaluesoflocalvariablesorparametersbyusingthesourceinformationtodeterminethecorrectenvironment.2.3.2ConcreteversionsofmappingsandcorrespondingdebuggeruseThecompilerisresponsibleforconstructingmappingsthatallowadebuggertocommunicatewiththeprogrammeraboutacomputationinsourcelanguageterms.Thesemappingsincludeinformationabouttheuser-definedvariables,theprocedurehistory,andprogramlocations.Someofthisinformationisneededwhetherornotadebuggerispresent.Thecompilerneedsthevariableinformationtogeneratecodecorrectly;mostlanguagesupportsystemsdonotneedthisinformationduringexecution.Thelanguagesupportsystemneedstheprocedurecallhistoryinformationduringexecutiontomanagetheprogram'scontrolflowandtobindvariablesproperly.Useofthisinformationiscompiledintotheprogram'sobjectcode.Locationinformationisneededbythedebuggeronly.Debuggerimplementationscanbecategorizedbytheamountofextraobjectcodetheyrequirespecificallyfordebuggingsupport,inadditiontotheobjectcodeneededtocomputethestatementsspecifiedinthesourceprogram.Invasivedebuggerimplementationsincludeexplicitcallstothedebuggerintheobjectcodegeneratedfortheprogram.Semi-invasivedebuggersrequireextraobjectcode,butdonotexplicitlycallthedebugger.Asaresult,forinvasiveandsemi-invasivedebuggerimplementations,theusermustspecifyadesiretodebugaprogrambeforecompilingit.Tosupportanon-invasivedebugger,acompilerplacesalldebugginginformationinauxiliarytables,keepingtheobjectcodeassmallandasfastaswhennotdebugging.Theauxiliarytablescanbekeptinsecondarystorageuntiladebuggingrequestisissued.Acompilersupportinganon-invasivedebuggercanmakethegenerationoftheauxiliarydebuggingtablesoptional,therebydecreasingcompilationsizeandspeedwhennodebuggingisdesired,oritcancreatethemduringeverycompilation.Ifthecompileralwaysgeneratestheauxiliarytables,nospecialcompilationdirectivesareneededtoallowlaterdebuggingactivity.Thisdissertationemphasizesnon-invasivedebuggersbecausetheyaremoreinkeepingwiththephilosophyofoptimization:theextraobjectcodegeneratedforinvasivedebuggerscanconsumeasignificantamountofexecutiontimeandspace,evenwhennospecificdebuggingrequests(suchasabreakpointrequest)areactive.Althoughadvanceddebuggingcapabilities,suchasrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâî‚îËî´îS î(‹î- î5=î7,î=—î?…îB%îHèï_gîâ î…îÑî‡î#¨î'üî*Àî0¶î3-î5æî9öî rïR¸î¤î}î9î¦ î"Ùî% î,Üî3î5ìî9–î:Áî@ÌîB{ ïO÷îâî'î° î¼î Çî" î*?î,î0�î6€î;zî?¥îFïM5îâ îgîCî� î$‡ î*”î,ïî3lî8Qî;î@Œ îGïJtîâîÐî¦ îdîî"î'…î)}î,'î-…î3Ãî5cî;}î>‰îDyîH�ïG²îâî- îÌî�î#'î&ƒ î,·î0(î6î;#î@7îBRîDÛîHMïDðîâ î¬î\ î"ìî&î, î1Uî6î:1î<ÐîC’îF]ïB/îâ î]î¿î åî"…î'‹î)Üî08î4Üî7çî:�îÁîC©îFÌîH�ï0Ñîâîîèîoî°î!î'‘î)öî,}vî36ï0Ñï0Ñî4 rï0Ñî;ÖîB‹îG|ï.îâîîÍîhîˆî î$î&½î)7î0Oî2zî3½î7úî:Qî?¬îB} ï+Nîâîçî�î!øî$íî(Pî,éî.î2 î3µî7àî9î>�îBÚîIAï(�îâîòîævîùï(�ï(�î· rï(�î—î$áî%óî+—î/˜î1qî8 î?†îAîFªï%Ëîâîî|îœîëî î#Fî&î'ºî*Xî,î/Êî2G î9ëî<ËîBwîFkîHþï# îâîáîtîÄîZî!†î"”î)2î-êî/;î4î5sî; îAÝîBë ï Hîâîüî˜î]îÍ î$¡î&kî(Ûî.‘î5[î9Xî?$îD5 ï†îâ îžî{îdî wî$]î&•î-€î/î4oî6eî7ìî:©î>ÝîB˜îG:ïÅîâ î'î™îçî ’î$æî*Þî--î2Áî6õî8êî=U îDÏ ïîâî5îÿî­îVî{î%5ïnî¤î× î9 î#… î+¢î2Iî7„î:­î=î@ÇîBŽîGÓï¬îâî& îî» î"î$Wî'®î+¬î.Øî5î7*îÕî@¹îGÓï_gîâî# î îî ¤î#pî%a î-³î0Î î8Ñ zïZqîâî0î©rïVMî¤î[î’î§îbî Àî"{î%Œî)Cî*ýî/Yî3‰î5õî< î?îBÒîH�ïSŒîâî• îTîXîíî%Þî)Oî+3î0íî6Yî;Æî>³ îF~ïPÊîâ î÷îáîiîî"|î%P î- î1 î5 î=(îB�îDqîGïN îâîPîÄîÞî™ î&$î)Žî+�î1=î2×î8î;ôî?'îE<îHïKGîâîXî î¿ î6î"[î$Åî*ìî-Ïî2kî3áî6Kî:!î;åî>NîCèîE¶îH�ïH†îâîî°îÛîWî"ðî(#î)ùî,u î2…î6Wî8Óî;êîA_îCWîHïEÄîâî‡î.îÊîî î§î%1î(Fî.‹î1Áî4\î7¨î9“î=7îBªîGîHþïCîâ î6î¦îSîöî"Íî%!î)Þî+Œ î2¾î5�î7Õî:Äî@îA´îD ï@Aîâ î}îJî Ïî#”î(>î+E î2Çî6Sî;™î>2î?• îFÖï=îâî îšî)îèî#fî'Íî* î.Õî0<î2—î7ÉîuîBmîDj ï7üîâ î¹îuîaî!>î#�î)çî,Vî/îî1€î8Iî:Œî?†îBÅîDæï5;îâ îî î’î î%tî+cî/€î1`î3çî9| î@~îD³îH�ï2yîâî¬îUîînï.ãî¤î îPîÀî#€î'ôî*Xî//î1ëî6¡ î<åîANîC ï,"îâîœî î’î¸îiî–î$aî(ªî+Xî,… î4¢î;î=hî@ÈîFOîI5ï)`îâîƒ îîyîÙî ¤î"]î#‡ï%Ëî¤î„îL î! î"ðî$O î,Ÿî2nî8·î<î>›îD® ï# îâî±î"î'îî Òî#Fî(#î+Ÿî-Lî0î3Êî7ôî:àî>À îF^îHþï Gîâî³î¿îŒîÔî ±î$î)aî+¾î/î4cî6Ÿ î=5î?î@JîE1ï†îâî¿îî’î�î"Zî$î%:î(þî-Êî2 î8!î:ƒî@BîC¸îF&ïÄîâîYîîúîÕîPî"�î%î)¦î*ßî.®î0� î8wî:­î?CîA² îI5ïîâîä îéî©î«î[î"‘î$“ î+tî-?î/°î3? î9Dî;©îA@îE‹ïAîâî¦îtîÔîJîXî!·î&ú î-Eî.°î2¾î5–î7Dî8nî=6î@žï«î¤îÑîâîîàî"Nî$‘î%Áî+Ñî-…î0î4wî6Ýî=N îCâîF‰ïêîâî²î" îDî"´î$­ î,«î/·î5î8î=ÓîAMîD†îIÅï (îâî•î©î?î†î 6î$Iî'§î*]î+oî/"î46vî5‰ï (ï (î6Hrï (î7Ôî8æî=‹î@¹îEÍÿÿTVm$ÄCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES29manydifferentscopeshavethesamenestinglevel.Aseparatetabledescribesthetreeofscopenumbers.Atruntime,thedebuggermustbeabletodeterminethescopecorrespondingtoanygivenprogramlocation.Thescopetreecanincluderangesofsourcestatementsduringwhicheachscopeistheinnermost.Anotherpossibledatastructureforthescopenestingandstatementinformationisalistofscopeswithrangesofapplicablesourcestatements.Inthisstructure,thescopenestingisimplicitinthenestingofthestatementranges.Thedebuggermustsearchscopesfrominnertooutertofindtheproperdefinitionofmultiply-definedidentifiers.Symboltablesgeneratedbyconventionalcompilersgenerallyequatesourcestatementrangesandobjectlocationranges,sincethesetworepresentationsareinlock-stepforstraightforwardcompilation.Thesesymboltablesfrequentlyrepresentscopeinformationdirectly,asobjectcodeaddresses,sothatthedebuggercanomittheextratranslationfromobjectcodelocationtosourcestatementwhenaccessinginformationaboutvariables.Furthermore,thesecompilersassumethateachvariablehasasingleuniquestoragelocationthatisvalidfortheentirescope.Asweshallsee,neitheroftheseassumptionsholdforoptimizedprograms.2.3.2.2StatementmappingAdebuggerusesamappingfromsourcestatementstocorrespondingobjectcodelocationstosetlocationbreakpoints.Amappingfromobjectcodelocationstocorrespondingsourcestatementsisusedtoreportthesourcelocationwhenacomputationissuspendedforanyreason.Indirectly,thissecondmappingisalsousedtofindthecorrectvariableenvironment.Inaninvasivedebugger,thegeneratedcodeforeachsourcestatementbeginswithacalltothedebugger,providingthenumberorsomeotheridentificationofthesourcestatementasanargument.Thusthemappingbetweensourceandobjectlocationsisembeddedintheobjectcodeitself.Sincethesedebuggersareactivatedateachstatementboundary,theycanimplementalltypesofbreakpointsorsingle-steppingeasily.Thedebuggerkeepslistsofeventsofwhichtheuserwishestobenotified.Eachtimethedebuggeriscalled,itcheckstoseewhetheranyoftheseeventshaveoccurred.Forexample,itcandeterminewhetheragivenstatementisabouttobeexecuted,whetherthevalueofasetofvariableshaschangedsincethelaststatement,orwhetheracertainconditionnowholds.Implementingdataaccessbreakpointsisalittlemoredifficult:thecompilergeneratesalldataaccessesindirectly,ascallstoadata-accessingprocedureinthedebuggertowhichthedesiredvariableisaparameter.Tosingle-step,thedebuggersimplygivescontroltotheusereachtimeitiscalled.IncaseaprogramexceptionoccursduringtheexecutionoftherïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâîÃî€îçî Dî"ºî&Oî+#î/sî1î6†î:î@îBzîESîG#ï_gîâî¥î¼îfîáî&î)‰î+•î.©î0sî7î9‹î=r îF„îHNï\¦îâîˆîîýî Çî$„î'7î)´î.…î2Åî4pî8± î?\îC¾îG½ïYäîâîïî�î? îî$Æî*Jî-‘î3‘î6î8²î<¿îA¿îD¹ïW#îâ îîýî:îŠîVî!¸î$æî)Gî+ î1³î6 î=Ñî?³îBg îH�ïTaîâî­îjîÕîßî�î!ìî&©î(aî*Àî0õî6î8öî>þîBfîFŸïQ îâîIîçî–î5îãîÒî"1î&­ î,÷î.°î9* ïN î¤î¼î¶î!î# î+?î1Œî7€î;ÿî@\îF ïKIîâîÑî!î�î nî$î'Øî*¼î4nî6ùî8ßî>èîA]ïH‡îâ îcîrî Gî$@ î*ñî0üî4Õ îŒîCWîEzîG³ï=�îâîŽîAîúîƒ î#Eî&vî(³î/zï8‹îâî0îÇrï4iî¤î/î8î1îZî#î&{î*Ê î1ƒî31 î<'î@?îC…îI@ï1§îâîêî î2îªî%Qî(£î,¦î/Øî5î7 î?úîD4 ï.æîâîNîŠî8î\î¼î î%Bî(÷î*! î2î3‡î:Bî<î? îDV ï,$îâîƒîîÑî=î î#Eî$óî'âî*Aî.Óî4 ï(�î3î î îUî!Âî$,î*ƒî-Õî0î3Yî7´î=õîBOîEuîFªîI@ï%ÍîâîeîêîMî Ðî& î(î+¾î/€ î8î9Ýî<`î@ÓîG,îHþï# îâîÙîOî¨î!\î&Ãî+ î-»î1Ìî7€î8äî?—îA>îC–îG§ï Jîâîaî:îæî!—î$î)ùî+µî/ î5cî<î?GîAöîHþï‰îâî—îp îîêî'pî,Xî/Pî5zî9qî-îB‡îD`îH�ïÇîâîÔî&îÍî·î¤î#î&.î(†î.ˆî/ìî44î5‚î9áî;ˆî=ÔîCîE´îGeïîâî8îœîcî ,î&î'�î*5î0Õî6@î7†î;XîAªîC3îG2îHþïDîâîüîPîµî dî""î#Qî%tî'2î,òî/mî4áî8Yî:¾î=D îC×îE ï‚îâî î�î©îªî"5 î+î.î2 î9’î:ûî<"î?PîBà îH�ïÁîâîƒîrîHî3î$P î*­î,Aî/7î0Ëî1Û î:£îA îB îDåï ÿîâî‘î îîÊî!î"nî#™ î*ùî-! î4>î6Ÿî<©îAîDŒîI@ï >îâîZîlîµîóîbîæî"ëî$Òî'Ùî)î.Ãî5î9nî=÷î@oîF½îH�ÿ �TVm$äCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES30objectcodeassociatedwithastatement,thedebuggeralsostoresthecurrentstatementnumberinternally.Althoughinvasivedebuggersaresimpleandpowerful,theytendtobeveryslow.Semi-invasivedebuggersexistprimarilytoovercomedifficultiesinthemachinearchitecturewithrespecttodebugging.Ifthemachinecannotdetermineanexceptionlocationafteranexceptionhandlerhasbeeninvoked,theobjectcodecorrespondingtoagivensourcestatementbeginswithinstructionstostorethestatementnumberinaknownlocation.Ifthemachine'strapinstructionrequiresmorethantheminimumnumberofinstructionbytes,orifitwouldbedifficulttoexecutetheoriginalinstructionincontextwhenresumingtheprogram'sexecution,theobjectcodecorrespondingtoagivensourcestatementbeginswithanullinstruction.Inanon-invasivedebuggerimplementation,thecompilercreatesaseparatetablethatshowstherelativeprogramoffsetofthestartofthegeneratedobjectcodeforeachsourcestatement.Thistableiscalledastatementmap.Theinformationforastatementmapistypicallycollectedinthreemajorsteps.Thefirststeptakesplacewhilethecompilerisscanningandparsingthesourcetext:thecompilerrecordsastatement(orline)numberwiththesubtreeforeachstatementintheresultingabstractsyntaxtree.Thesecondstepoccurswhilethecompilerisgeneratingtheabstractcodestream(bywalkingthetree):thecompilerassociatesastatementnumberwiththefirstinstructiongeneratedforeachstatement.Thethirdsteptakesplacewhilethecompileriswritingthecompletedobjectcode(afterfinalobjectinstructionselectionandaddressassignment)totheoutputfile:foreachsourcereferenceintheobjectcode,thecompilerrecordsthecurrentrelativeprogramoffsetandthestatementnumberinthestatementmap.Nosourceinformationappearsintheexecutableobjectcodeoutputbythecompiler.[Theproceduredescribedherewouldobviouslybesimplifiedforaone-passcompiler.]Anon-invasivedebuggerusesastatementmapinastraightforwardmanner.Tosetabreakpointatagivensourcelocation,thedebuggersearchesthemap,findsthesourcelocation,andplacesthebreakpointatthecorrespondingobjectlocation,usuallybyreplacingtheexistinginstructionbyatrapinstruction.[Themachinearchitecturecanpermitothermethods:forinstance,somemachineshaveaspecialtrapbitineachinstructionoreachword.Thelatterallowsforefficientdatabreakpoints.]Ifthedebuggerreplacesanobjectlocationwithatrapinstruction,thedebuggermustsavetheoriginalinstructionandexecuteitwhentheuserresumesexecutionfromthebreakpoint.ToreportthecurrentrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâîî‰ îî Wî!¤ î(Uî*Øî1î3õî7ùî:|î?iîEÂï_gîâ îçîî!Gî'Õî*(î.�î1Eî7nî:~î=¤î?RîACîDRï[Òî¤ îsî!î$iî*�î,Lî2¦ î9‡î;Qî=ÌîCm ïYîâîÙî]îç î5î “î"Îî(/î,‡î2åî4±î:Âî?ÕîBíîD¹ïVOîâîôîpîÔîuî!Üî%üî)J î2Hî3ýî5.î8êî=@îC}îGÓïSŽîâ îIîÿîbîÉî$î):î*ïî,!î0®î6Ïî8Yî:ÀîA(îD ïPÌîâî"î¨îÁîî#\î({î*' î0õî4Ôî6‹î7ßî9(î=Iî?,îDWîEùïN îâî¡î îEî Sî%‡î)œî/ùî2¸î9ƒ î@pîC/îG§ïKIîâ îÙî‡î±îeî"µî(êî-9î0Tî1~î4V ïG´î¤î�î¸ îÊî"áî-%î/“î5\î9ñî;)î@�îDîFáïDòîâîhîlî!î î!òî$xî'®î)�î,î2„î6Ãî:1î<”î?ëîDa ïB1îâîüîdîÐîÇvîñïB1ïB1îuî"rî${ïB1ïB1ï>›î¤ît îöî+îMî%zî(�î)ðî/mî5!î6Çî:Hî>6îBjîE:îH ï;Úîâî‹îKî+î¶î"œî$4î*î,òî1ñî4|î8÷îßîDÅîIÅï9îâî î7îYîvî"‚î$Óî)™î+Çî.éî5î6¯î9î>—îCŸîGÕï6WîâîÁîYîDî�î!Jî#±î)rî*å î1¤î4 î9(îÍîELîG½ï0Ôîâ îFîGîÙîæî#Œî'Jî+'î-°î3”î5)î:î<�îCeîG§ï.îâîœîÐîî î Îî&xî)4î." î5²î7eî9Éî>@îA'îCiîFŸï+Pîâîî÷î‹îÙî!­î$Aî*1î/:î1Îî6Ìî;àîA£îE£îH�ï(�îâîîMîÿîcî$�î(�î+î/W î6æî;õî=¨î@ îFÕï%ÍîâîînîSîœsî!ï%Íï%Íî!Uî#Šî(­î-Šî/ôî3:î8î9š î>«î@cîA@îE© rï"8î¤î‚ îØî"3î%î&ûî-ƒî0ðî2ñî4mî>QîDÜîGUîIÅïwîâ îíî¡îåî´î!î&Éî)Cî/gî4åî7`î:íî>{î@õîE_ïµîâî³îåî^ îhî!î#“ î,£î0Õî6~î;Jî=_îCkîEäïóîâ î«î•î­î sî#ïóïóî#aî%šî)õ î/èî1ãî5bî8:î=î>¼îC2îFï2îâîkîCîÂîüî—îØîP î"µî$ î&€î)×î,î.Îî2î3Ãî7ôî:H rï2îA;îB¡îDåïpîâî&îî2îjî"‡î#²î&— î-Ìî0-î68î9¡î<§î?îD ï¯îâî™î�îåîšîúî óî&@î,uî/Üî2; î:î¨îB­îEIïPÌîâî�î=îÏî!zî"Å î)Øî+¨î,ô î4î6fî:–î=ÞîCšîDåïN îâîçî"îþî#zî%ðî*Xî-î0oî2K î¬îCîG²ï?oîâî îåî ùî# î%î&+î)ðî+¤î0î3D î:î?`îB)îG§ï<­îâî,îiî«îeî!~î'‡î)Bî,îî2‰ î9Oî<î=Íî?‡îAóîE´îH�ï9ìîâîBîxîQîÛî#Uî'> î/åî6�î9=î< î>àîB÷îDÐîHÜï7*îâî3îYî¦î!Éî%)î'î*ªî.çî3fî5î6´î:Vî<£îBÆîEÎï4iîâîÓî¯îîî·î"u î)9î-G î4-î8Oî>¼îBPîD‚ï1§îâîõîzî€îõî"<î$Ýï.î¤îYîýîOî¿î"¢î(Ïî*> î0äî4dî6cî9î=fî@óîGƒîIÅï+Pîâ îü î î&2î(éî* î2-î8bî;}î>4îBüøTVm$hCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES32nametypestorage loc1102111222118231222412825130261342714028objectsource21 y _ 5;22 FOR i IN [1..n] DO23 a _ b+c;24 b _ y/i;25 c _ d*2;26 a _ i-3;27 e _ y/i;28 ENDLOOP;110 y _ 5112 i _ 1114 top: if i>n goto out118 a _ b+c122 b _ y/i128 c _ d*2130 a _ i-3134 e _ y/i140 i _ i+1142 goto top144 out:ObjectSourceÁWïÁWïCÀ¼@¼ CÀÁWϼ@CÀCà¼@7ÁWï;ÁWïCÀ¼@¼ CÀ7ÁWϼ@CÀCà¼@Statement mapabcdeinINTEGERINTEGERINTEGERINTEGERINTEGERINTEGERINTEGER024681012environment 3: object loc 100-150outer environment ptr: 1inner environment ptr: 4Symbol tableÁ9ï!Á9ïCÀ¼@¼ CÀÁ9ϼ@CÀCà¼@!Ñ9ß!Ñ'ß¼@¼ CÀCÀ!±9ßCÀCà¼@¼@!Á'ÏÁ'ϼ@CÀCà¼@!Á'ïCÀ¼@¼ CÀ±'ß±9ßCÀCà¼@¼@Ñ'ß¼@¼ CÀCÀÁ8o!Á8oCÀ¼@¼ CÀÁ8O¼@CÀCà¼@Ñ9ßÑ'ß¼@¼ CÀCÀ±9ßCÀCà¼@¼@/Á2ïEÁ2ïCÀ¼@¼ CÀ/Á2ϼ@CÀCà¼@/Á1oEÁ1oCÀ¼@¼ CÀ/Á1O¼@CÀCà¼@INTEGERy14/Ñ9ß/Ñ ß¼@¼ CÀCÀ/±9ßCÀCà¼@¼@/Á ïEÁ ïCÀ¼@¼ CÀ/Á ϼ@CÀCà¼@E± ßE±9ßCÀCà¼@¼@EÑ ß¼@¼ CÀCÀEÁ9Ï/Á9ϼ@CÀCà¼@EÁ9ïCÀ¼@¼ CÀ6Ñ2ß6Ñ ß¼@¼ CÀCÀ6±2ßCÀCà¼@¼@>Ñ2ß>Ñ ß¼@¼ CÀCÀ>±2ßCÀCà¼@¼@Figure2-1.Unoptimizedcodegenerationwithmonotonicallyincreasingstatementmapandsimplesymboltable.rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓ|î1vï1Åî9¼ï1Åî@Aï1Å }îÁï6¢îÁï6¢îÁï4¢îÁï4¢îÁï2¢îÁï2¢îÁï0¢îÁï0¢îÁï.¢îÁï.¢îÁï,¢îÁï,¢îÁï*¢îÁï*¢îÁï(¢îÁï(¢|îRï8Åî=ï8Å}îÁïU¢îÁïS¢îÁïQ¢îÁïO¢îÁïM¢îÁïK¢îÁïI¢îÁïG¢î1ÁïU¢ î1ÁïS¢ î1ÁïQ¢î1ÁïO¢î1ÁïM¢î1ÁïK¢î1ÁïI¢î1ÁïG¢î1ÁïE¢î1ÁïC¢î1ÁïA¢~î7ËïX¢îºïX¢û#û#îPï:¢ }î2Áï/¢î2Áï-¢î2Áï+¢î2Áï)¢î2Áï'¢î2Áï%¢î2Áï#¢î7Áï/¢î7Áï-¢î7Áï+¢î7Áï)¢î7Áï'¢î7Áï%¢î7Áï#¢îAÁï/¢îAÁï-¢îAÁï+¢îAÁï)¢îAÁï'¢îAÁï%¢îAÁï#¢~î0Áï7¢ð!î4Áï5¢î4Áï3¢î5àï:¢ û#û#û#û#û#û#û#û#}î7Áï!¢î2Áï!¢îAÁï!¢û#û#û#û#û#û#zï üîî\îŒ î Žî#É î*‹î-Ž î6l î<ìîC5îF.ï ;î&™î*Üî/xÿTVm$sCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES332.4PropertiesforeffectivedebuggingofoptimizedprogramsThissectiondelineatesthepropertiesofaprogrammingenvironmentthatareessentialforeffectivedebuggingofoptimizedprograms,thepropertiesthataredesirable,andthepropertiesthatarerelativelyunimportantinthiscontext.2.4.1EssentialpropertiesTheprimaryobjectiveofthisresearchistoprovideeffectivedebuggingtoolsforoptimizedprograms.Anessentialpropertyofanyeffectivedebuggingtoolisthatitmustbeintelligibletoarelativelynaiveuser.Atoolthatcanonlybeunderstoodbycompilerandoptimizerexpertsisnotsufficient.Auserwillfinditeasiesttodebuganoptimizedprogramifthedebuggeralwaysrespondsexactlyasitwouldforanunoptimizedversionofthesameprogram.Icallthispropertyexpectedbehaviorforagivenoptimization.Adebuggerwithexpectedbehaviormustpresentarestructuredviewoftheactualstateoftheoptimizedprogramaviewthatconformstothesource-levelcomputationalmodel.Ithidesthechangescausedbytheoptimizationsfromtheuser,muchasasource-leveldebuggerhidesthedetailsofalower-levelimplementationofanexecutingprogram.Alessdesirablebutstillacceptablealternativeistoprovidetruthfulbehaviorforanoptimization.Thismeansthatthedebuggeravoidsmisleadingtheuser:eitheritdisplays(insourceprogramterms)howoptimizationshavechangedtheprogramportionunderconsideration,oritadmitsthatitcannotgiveacorrectresponse.Thusadebuggerwithtruthfulbehavioracknowledgesthatoptimizationshavealteredtheprogramanditscomputationalbehavior.Theusermustparticipateintherestructuringoftheprogramstate.Adebuggerthathasneitherexpectednortruthfulbehaviorislikelytogiveincorrectand/orconfusingresponsestoqueriesaboutanoptimizedprogram.Anexamplewillhelptocharacterizethedistinctionbetweenexpectedandtruthfulbehavior.Figure2-2isarepetitionofFigure1-1,inwhichthecodemotionoptimizationmovestheassignmentx_1atstatement18outsidetheloop,therebyreducingtheprogram'sexecutiontime.Thedeadstoreeliminationoptimizationthenremovestheunnecessaryassignmentx_0atstatement15.AsnotedinChapter1,iftheoptimizedprogramisstoppedatstatement17onthefirsttimethroughtheloop,aconventionaldebuggerwouldreportthatthevalueofxis1.Accordingtotheunoptimizedprogram,x'svalueatthatpointwouldbe0.Therefore,adebuggerwithexpectedrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓtïa¸îâî î>îQî%êî.ôî1Mî9ürï]–î¤îèî° î ;î"Æ î)hî+Kî,  î5] î=–î@�îC îH±ïZÕîâîˆîbî=î#Êî*Vî,× î3oî6^î8Ó î?îAöîDw ïXîâî°î îö î!åî#“î&4uïRIîâîÏîÖ rïN'î¤î•îæîÑî!¤î$_î)Üî+bî-*î2Oî7íî>ÀîB+îD‚ïKeîâîÊîîŽî#%î$Ûî'xî,ùî3¯î6xî7àî:«î;ýî?bîAO îHîIÅïH¤îâ îÌîmî2î¶î {î#Aî%Äî(Õî*¾ î1éî3Ýî9�îÍî@ÀîCd ï7Gîâ îèîîî"!î$„î)´î.4î03î2– î;î>�î@äîD9îHîIÅï4…îâ î{î’î ?î"­î' î(Òî* î1 î; î<Ñî>ÐîEï1Äîâîxîîóî~î) î$â î+¦î-î.Óvî3èï1Äï1Äî4Xï1Äî8ãrï1Äî>\î@¤îBž ï/îâî!î‰î{îÿî"-î&• î-žî0"î3¹î7Êî9Eî> î@ìîE`ï,@îâîî î‘î!Ðî'7î)�î/î3îî7é î@¬îBhîC·îH ï)îâîoî#îGî¨îrî%aî)î*wî0·î4 î9Xî?@ îH ï&½îâ îXî˜î#î!|î'î)µî+‰ î4…î;î=Õî@ÇîD) ï#üîâîÈî_ î²î£î :î&î*}î,Bî2‚î5‰î85î= îCîE×ï!:îâîÏîwîsî^îˆî%€î*dî0áî7Gî92î>7îBUîD‚ïyîâïãî¤îÿî€î4îWî! î(¡î+ î1Ëî7Bî=î?ÇîDçï"îâî.îhî¯îµ îÑîfî#±î&Dî'Îî+·î-òî1î5® î=ƒîA¢îCÝ xï`îârîºï`xï`îjrîBï`xï`îórî¢ï`ï`îHî)îMî!î!Ùî$'î'’î,�î2!î4oî:Éî@ìîDËîG‘ïŸîâîC î… î!ƒî$®î*!î,… î4+ xïŸî<rî<ñïŸxïŸî=¡rî>yïŸxïŸî?*rî@ÚïŸïŸîAîBwîH²ïÝîâî"î3îîŽîJîÛî"jî)î.Ãî0^î5»î7ƒî=èî?ýîB2îDÁîGÉï îâî(î•î îX î#€î)—î-Óî2î4àî7Nî;xï î=rî>Âï ï î?%xî@;ï rï îAîB�îI@ï Zîâî' îxï ZîArî ï Zï Zî qî!`î$ïî&mî)!î,¦î0ºxî2‘ï Zrï Zî3iî4” î;3îî( xïb)î+Ârî,šïb)ïb)î,òî.:î2#xî3Îïb)rïb)î4¦î5Áî9Gxïb)î>Nrî?&ïb)ïb)î?~î@ÆîE·ï_gîâxî[ï_grï_gî3î¾îKî/îÝ î&î+î,²î2þî5Qî7Æî;…xï_gî=’rî?Bï_gï_gî?¥î@ÃîC8îFËîH�ï\¦îâîZî î #î%¾î+þî.2î3(î8ñî?îAqîG†ïYäîâî&îßî*î¾xïYäîËrîzïYäïYäîÞî Ñî&xî)}î.î/ªî1ôî6.î;¨î=™î?ãîB¦îE¶ïW#îâîWî îwîõî×îÞî!íî#±î))î,œî/î2ÑxïW#î4Ýrî6�ïW#ïW#î7î;î>îC½îIƒïTaîâîhî' îîÚî"§î)Uî+bî0©î3³î5/î6jî;éî?î@ÞîD®ïQ îâîNîTî\îf î#ý î+“î.nî1~î4î5ýî9fî:Éî=aîBWîEîH îIÅïNÞîâîFîàî¬îsî!…î$ÿî'qî-Úî3î4Åî78î= îCŒîEnîI5ïLîâ îYîƒî#î)î*Íî/äî6 wïH‡îerïI[îÉî)îÒxïI[îßrî�ïI[ïI[îòî úwïEÆîerïF™î÷î…î\xïF™îirî ïF™ïF™î |î!³î$äî&Ÿî)Nî+ÜxïF™î2eî4î5Årî7uïF™ïF™î8î9;î?ŸîA²îDŒîI@ïDeîeî‡î¼wï@ÐîerïA£îÉî)îÒxïA£îßrî�ïA£ïA£îòî úî$çî&î'ßîâï;·þÀî¢ï;·þÀîcï;·þÀî&#ï;·þÀî-äï;·þÀî5¤ï;·þÀî=dï;·þÀîE%ï;·þ`îE…ï;·þ`îEåï;·þ`îFFï;·þ`îF¦ï;·þ`îGï;·þ`îGgï;·þ`îGÇï;·þ`îH(ï;·þ`îHˆï;·þ`îHèï;·þ`îIIï;·þ`îI©ï;·þ`îJ ï;·þ`ï< ï< î¤ï8¯þ„î¤ï9î(ï8¯þ»î(ï9îãï8¯þÇîãï9îªï8¯þ„îªï9î.ï8¯þ›î.ï9îÉï8¯þ¥îÉï9îoï8¯þ„îóï8¯þÇîóï9îºï8¯þ„îºï9î>ï8¯þ»î>ï9îúï8¯þ°îúï9îªï8¯þ„îªï9î.ï8¯þ¥î.ï9îÔï8¯þ*îÔï9îþï8¯þ„î‚ï8¯þyî‚ï9îûï8¯þ„îûï9îï8¯þ¥îï9î%ï8¯þ°î%ï9îÕï8¯þ*îÕï9îÿï8¯þ¥îÿï9î¤ï8¯þÇî¤ï9î kï8¯þoî kï9ï9î*ñï8¯þ¥rî*ñï9î+–ï8¯þyî+–ï9î,ï8¯þoî,ï9î,~ï8¯þ¥î,~ï9î-$ï8¯þ„î-$ï9î-¨ï8¯þ„î.,ï8¯þ›î.,ï9î.Çï8¯þ»î.Çï9î/‚ï8¯þÇî/‚ï9î0Iï8¯þ¥î0Iï9î0ïï8¯þ„î1sï8¯þ*î1sï9î2�ï8¯þ»î2�ï9î3Xï8¯þoî3Xï9î3Çï8¯þcî3Çï9î4*ï8¯þ»î4*ï9î4åï8¯þÇî4åï9î5¬ï8¯þ„î60ï8¯þî60ï9î7Dï8¯þ„î7Èï8¯þÇî7Èï9î8�ï8¯þ¥î8�ï9î95ï8¯þ¥î95ï9î9Úï8¯þÇî9Úï9î:¡ï8¯þ„î;%ï8¯þ„î;%ï9î;ªï8¯þoî;ªï9î<ï8¯þ»î<ï9î<Ôï8¯þ„î<Ôï9î=Xï8¯þ¥î=Xï9î=ýï8¯þ„î>‚ï8¯þ¥î>‚ï9î?'ï8¯þcî?'ï9î?Šï8¯þcî?Šï9î?íï8¯þ*î?íï9îAï8¯þcîAï9îAzï8¯þÇîAzï9îBAï8¯þ¥îBAï9îBæï8¯þoîBæï9îCUï8¯þcîCUï9îC¸ï8¯þ»îC¸ï9îDtï8¯þÇîDtï9ï9ï9xï5Êî¤î+îÛî‹ï4"î*ñî, î.Pï2{î¤î+î‹î;îÂî!ªï2{î*ñî.Pî0î2ˆî8oï0Ôî¤î³ ï0Ôî-x ï/,î¤î³îcîï-…î¤î³ï-…î-xzï)ðî&î ÿúTVm$pî#+ï)ðï)ðî#ƒî'<î(”î,ÿúTVm$zï)ðî/(î3Äî5rî8¬îâï' þÀî¢ï' þÀîcï' þÀî&#ï' þÀî-äï' þÀî5¤ï' þÀî=dï' þÀîE%ï' þ`îE…ï' þ`îEåï' þ`îFFï' þ`îF¦ï' þ`îGï' þ`îGgï' þ`îGÇï' þ`îH(ï' þ`îHˆï' þ`îHèï' þ`îIIï' þ`îI©ï' þ`îJ ï' þ`rï'uï'uï Jî¤îmî î!î#Ü î+„î-³î3æî:dî@–îBºîDZîI5ï‰îâ îƒî?îÃî!k î)î,{î0¬î3öî5³î86î=é îGPïÇîâîíî›îæîÇî!Î î)² î2î4A î;ÌsîB…ïÇïÇîBÕ rîHÌïÇïÇï“î‰î-îïî!Dî$î&‚î,“î/•î5 î7sî;Ëî>ŠîB«îHþïëî‰î<îÞî‘î/î §î# î&åî+{î0(î1åî4îî6î;°îA.îBžîF„îH�ïDî‰îJîvîkïDïDîïrïDîžî$‰î'î)fî/'î0ãî3Gî7dî<öî>¨î@îEï�î‰î9îÆ îåî"î'uî*î. î4•î7þ î@îBôîHóïõî‰ îx î îäî!óî%¦ î-² î3Ãî66î9›î;gî@îB‰îHMïNî‰îwî}îÝ ªTVm$•CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES35Apracticalimplementationofasystemforprovidingexpecteddebuggingofoptimizedprogramsmusthavetwoadditionalproperties.First,anoptimizedprogramthatiscapableofbeingdebuggedshouldnotbelargerorslowerthananunoptimizedversionofthesameprogram(althoughlargerbutfastermightbetolerableonalargemachine,andslowerbutsmallermightbetolerableonasmallmachine).Ideally,addingdebuggingcapabilitiesforoptimizedprogramsshouldnotcostanyextraexecutiontimeorspaceunlessthedebuggerisactivelyrespondingtoauserrequest.Second,themodifiedcompileranddebuggershouldstillbereasonablyefficientintheiruseoftimeandspace.2.4.2DesirablepropertiesTobeabletoexploitthecontextofaprogramexception,asdiscussedinChapter1,thedebuggermustbeavailableatanytimeduringanyexecutionofaprogram.Therefore,ifaprogramexceptionissignalled,oriftheusersimplydecidestomonitortheprogressofthecomputation,thedebuggercandisplayinformationaboutanypieceoftheexecutingprogram.Thisphilosophyisparticularlyimportantinanexperimentalprogrammingenvironment(suchastheCedarprogrammingenvironmentatXeroxPARC),inwhichausertypicallycallsuponseveralpackagesdevelopedbyotherprogrammers.Suchpackagesfailfrequentlyenoughtowarrantinstantavailabilityofthedebuggertoexploretheprogramstate,butinfrequentlyenoughthatimplementorswouldnotenableexpensiveprearrangeddebuggingfeatures.Usingthedebuggertomonitoraprogram'suseofsuchapackagecanalsobeavaluabletoolforlearningaboutthepackage.2.4.3UnimportantpropertiesTheprimaryconcernofthisresearchistheachievementofcertainlevelsofdebuggerfunctionalityinanoptimizedsetting.Severalfeaturesofthedebuggingenvironmentarerelativelyunimportanttothiswork;theymayaffecttheimplementationofadebuggerforoptimizedprograms,buttheydonotaffectthebasicconceptsdiscussedhere:9thephilosophyoftheprogrammingenvironment(suchaswhetherthecomponentsarehighlyintegrated[Teitelbaum79,Alberga+81]),9theparticularuserinterfacetothedebugger(suchaswhetheraprogramstatementisspecifiedtothedebuggerbypointingatitinthesourcetextwithamouseorbytypinginastatementnumber),andrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)î¤î‹îk î#¤î%·î'<î,î.©î5Cî;[îBoîD‚ï_gîâî î³î$îû î%� î-Fî1î3*î9Áî?zîBsîD îI5ï\¦îâî¯îüîzîñî!ãî%Ðî'–î+æî/î1 î8ûî=Åî?îAáîE`ïYäîâîîðîgîî# î$óî*šî,–î-·î1î6çî9•î=Úî@RîEîHþïW#îâîËî îlîBî#�î(¯î-yî4k î;Áî>7îDÛïTaîâîfîâî¸î`îÚî%î(Dî*î-Íî1øî4_î:pî;ãî@ê îHîIÅïQ îâîæî«îâîLî%2î*øî-¹î3Íî8Sî:þî<ù îCÝîI@ïNÞîâî)îžîWî|î4uïIîâîÏî& rïDòî¤îýî îLî-îñî"ƒî'Šî)uî*Ñî0’ î7Rî93î?oîAOîFÏîH�ïB0îâîÐîîñî�î! î#“î&œî*ñî-wî3�î5.î6<îTî@%îBœ ï<­îâî@îHîÒîƒ î& î)ìî,‹î0î1Õî43î:\î@ÄîCÝ ï9ìîâîº îpî>î!Yî#¶ î,] î5] î=ØîAïîD îFÖï7*îâ îw îˆî!"î%Gî*î,/î0?î1kî4gî9íî<ÿî@•îE(ï4iîâîÔî)î! î&î)äî0î2Æ î9Ãî?îAîFrï1§îâ î¹îOîŠîpî ûî%Àî'üî-gî0Íî3* î:Ôî?šîBE ï.åîâî3îËîTî Á î(�î/mî5»î9àî¥îBÎîDåïvîâ îßî…îmî Ðvïvrî&ïvïvî&Éî*Íî/ñî1¢î3ùî:« îB±îDü ï´îâ î#î#îî ]î#¿î'î+2î-ã î8î:î;™îAóîD‚ïóîâîMîÎîÞîåîZî#%î%…î(øî.“î4�wïŠî¤rï^îAîÛ î&îî!² î* î2Çî6¬î8”î>î@µ îH›ïœî¤îÝ sîTïœïœî¤ rî#(ïœïœsî$ïœïœî$Ø rî*Jïœïœî*Ãwï3î¤rïîJîë îbîžî%…î'vî*î0bî4Oî6?î;Ïî=:îC îIƒï Eî¤îfîî‚î!“î#•î)î*µî,î-Çî0.î4„î7Cî:eî;•î?öîAÁîCÄîHîIÅï „î¤îÙî×ðTVm$nCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES369thelow-leveldebuggerimplementation(suchaswhetherthedebuggerresidesinthesameaddressspaceastheexecutingprogram).2.5HistoricalconnectionsThissectionconnectsthepresentworktootherdebuggingresearchbypresentingabriefhistoryofdebuggersanddiscussingrecentresearchdirectionsindebugging.2.5.1BriefhistoryofdebuggersProgrammershavelongrealizedthebenefitsofdebuggingaprograminteractivelyusingthelanguageinwhichitwaswritten.However,partiallybecauseofexcessiveoptimismabouterrorrates,debuggershavetendedtotrailbehindadvancesinotherpartsofprogrammingenvironments.Interactivesource-leveldebuggersformachinelanguages.Thefirstprogrammersdebuggedtheirprogramsattheconsoleofthecomputer.Theywatchedconsolelightsforabinaryrepresentationofthecurrentprogramcounterandregistercontents,andtheysetconsoleswitchestoexaminememorylocationsortoalterregisterormemorycontents.Theycouldstart,stop,orsingle-stepthemachinedirectly.Non-interactivelow-leveldebuggersforassemblylanguages.Afteratime,programmerswerebannedfromthemachineroom.Bythistime,programswerecommonlywritteninanassemblylanguage.Ifaprogramhaltedwithanerror,theprogrammerwasgivenanoctaldumpofregistersandmemorytoporeoverinsolitude.(Infact,thisdebuggingmethodhassurviveduntiltodayonsomemachines,evenfordebugginghigh-levellanguageslikeFortranorC[Thompson+75].)Interactivesource-leveldebuggersforassemblylanguages.Withtheadventoftime-sharingmachines,userscouldagaindebugtheirprograms(writteninassemblylanguage)interactively.TwoimportantdebuggingfeatureswereintroducedwiththeFLITdebuggeratMITin1959:theuser-controlledbreakpoint,andsymbolicvariableandprocedurenames[Evans+66].Contentsofregistersandmemorycouldbeprintedinavarietyofformats:instructionformat,characters,andoctalanddecimalnumericrepresentations;afterselectingtheproperformat,theprogrammercouldexamineprograminstructionsordatainthesameformastheyappearedinthesourceprogram.Userscouldalsomodifyvaluesofvariablesandpatchtheprogram.Tomaintainthecorrespondencebetweenthesourceandobjectversionsoftheprogram,advanceddebuggersofthistimecopiedrïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓwïaMî¤rïb!îî€îhî!~ î+iî/!î0Ûî66î8¢î>¸îCJîEîGqï__î¤îŽîCîñîPî${tïXÁîâî î rïTžî¤îóîÆî–î"+î'5î*èî,Ìî0 î7�î=(î?Z îF=îG�ïQÝîâîsî,îºîq î$èî) î.p î4»î6i uïLîâîÏîòîlîprïGðî¤ î'îî «î%Ýî(Nî-�î/Wî6#î7_î<ÿ îDÓîH�ïE.îâî¿î„î©îîÚî$—î*ãî0]î5–î7fî=YîCƒîG|ïBlîâînîéîî �î"9î% î) î/_î0ûî4ˆî7Ýî9„ îB vï>×î¤ î˜ î î&î(Úî.l rï>×î5òî8ýî< îD¢ï<îâî†îöîëî§î"îî%î'Àî/€î3eî9&î>mîB~îEîFŸï9Tîâ îÛî–î÷î Âî&Rî+Uî.î2îî8·î;pî>�î@ îE‹ï6’îâî î(î¥î!pî#Cî%î(6î-$î.÷î4tî:Þî>vîBQîEÉîI*ï3Ñîâ î¦îîŠvï0;î¤îAî éî'Bî)�î/A rï0;î6‘î:Gî;‰î? îG�ï-yîâîÙîMîºîKî#êî&î(Áî,Lî2lî5Êî<šîAZîCîEï*¸îâîkîàîýîî!¢î$°î&“î*Qî,¤ î4yî7î:Àî<¤î?éîCßîEŒï'öîâî‘îöîœîÄîÖî |î&sî(³î+°î.Iî4ûî9þî#î?ÄîCîDÈîH�ïZîâîw îäî"Àî(ªî.î0áî7ˆsî;ðïZïZî8î@¨îEïTîâî”î=îæî�î!‹î#!î(¹î+Mî.ìî1(î7Mî9Qî>éîA% ï “îâîhîÞîDîî"Bî'¥î)uî+ëî1éî8î>¹î@‰îCAîF}ÿTVm$BCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES37patchescreatedduringthedebuggingprocessintothesourcerepresentationoftheprogram[Lampson65].Non-interactivesource-levelorinteractivelow-leveldebuggingforhigh-levellanguages.Withthedevelopmentofhigh-levellanguages,thereweremorealternatives.Theeasiestmethodwastoinsertstatementstoprintvaluesofvariablesorindicationsofcontrolflow.Thismethodrequirednoknowledgeofdebuggercommands(indeed,itworksevenwhenthereisnodebugger),butwasnotinteractive.Anothernon-interactivemethodwasexemplifiedbytheAlgolWdebugger.Whenaruntimeerrorwasencountered,thisdebuggershowedtheprogramstatementinwhichtheerroroccurredandprovidedasymbolicmemorydump:variableswereidentifiedbynameandtheirvalueswereformattedaccordingtotheirdeclaredtypes.TheAlgolWdebuggeralsoallowedcontextualtracingofsourcestatementexecutions,anideabasedonproofbyinduction[Satterthwaite75].[Note:Satterthwaite'sdissertationiswellworthreading.Itgivesanextraordinarilycarefulexplanationofhisimplementationanditstheoreticalandhistoricalunderpinnings.]Userswhoinsistedoninteractivedebuggingcapabilitieswereforcedtouseamachine-languagedebugger.Theseadventuroususershadtounderstandcompilationtechniquestolocatestatementboundariesortoaccessarrayelementsorfieldswithinrecords.Interactivesource-leveldebuggersforhigh-levellanguages.Ashigh-levellanguagesmatured,interactivesource-leveldebuggersforhigh-levellanguagesbecameavailable.Bysuppressingextraneousdetailsandbyinterpretinglow-levelinformationfromthehigh-levelviewpoint,thesedebuggerstranslatedtheusefultechniquesthatwereavailableinearlierassemblylanguagedebuggersintohigh-levellanguageterms.Thesetechniquesincludebreakpoints,displaysofvariablevalues,single-stepping,andtraces.Therearenowmanyexamplesofinteractivesource-leveldebuggersforhigh-levellanguages,suchasBAIL(adebuggerfortheSAILlanguage)[Reiser75],andpdx(adebuggerforPascal)[Linton81].2.5.2RecentdebuggingresearchMuchofdebuggingresearchoverthepastfifteenyearshasaddressedthefollowingfundamentaldebuggingproblem:anerrormaybedetectedmuchlaterintheprogram'sexecutionthanthetimeatwhichtheprogrambegantodivergefromitsintendedbehavior.Thisresearchcenteredonprovidingsophisticatedmonitoringcapabilitiesandreverseexecution.Severalsystemswerebasedontheideaofcollectingatotalhistoryofasinglecomputation;rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâîî:îüî ®î'¹î,Þî0î2ºî7[ î@¤îB®îE`sï_gîâ rîï_gï_gvï[Òî¤îL î"¯î$‹ î+7î0éî7|î9Æ î@ rï[ÒîGpïYîâî< îfî î!t î(î+”î.ßî2l î:yî=KîA•îFšîI@ïVOîâî­ îgîî~î"­î$fî*!î+å î2Öî4�î9Bî=8î@SîE^ïS�îâîåîÆî{î�î&cî+¸î- î1 î4Kî7ýî;ƒî<ëî>î îEÅîHCïPÌîâîD îªîî'cî,\î.õ î6bî8Kî:˜î>Dî@îFÖïN îâî îEî·îd î#–î&8î,Bî18î3˜î9(î?^îA îEîG|ïKIîâî»î™î’îãî$Ðî*eî/î4êî8c î>¿î@âîDÉîG§ïH‡îâî@îÂîIî#¹î%˜î)î.Åî3–î6žî:�î<¢îBÜîEÙïEÅîâ î_îÊî\î„î%“ î,}î.Gî1î4Óî6³î:Kî< sîB#ïEÅïEÅîBsrîJïEÅsïCîâî@îy î5î Aî"�î%–î*î+"î-Ìî/Bî6”î:$ î?ûîADîBï ï@Bîâî$î¶ î-îo î>rï@Bî'ðî+áî/î4î62 î<üîCÑ ï=�îâî^îÍî¦îEî™î(î/>î3j î;bî? îAíîCÆ ï:¿îâ îq îQîî#î): î0Pî2î3Ëî7Üî;iîA)îBñîFªï7þîâvï4hî¤ î€ îÜî&8î({ î.¸ rï4hî6î8: î>¶îEï1¦îâ îä îÂî$¢î'3 î-çî4„î9Ø îAîC„ ï.åîâ îÜî@î î î&°î,  î4>î7ºî:. î@£ îGeï,#îâî× îŠîQî#Ñ î+î.Iî2î8$î::î>åîE(ï)bîâî¾îå î”î%¨î*ìî/< î6fî;” îC°îI5ï& îâîòîRî!èî$yî(éî,Åî.òî1Ïî5sî;Iî<Ü îCd ï#ßîâî�îí în î%1î(‚î*Qî.Pî0î6=î8›î;î>úsîEYï#ßï#ßîE©rîJï#ßï!îâî™î\îÿîîEsî"âï!ï!î#1vî'Ïï!ï!uïSîâîÏîdî $rï0î¤î~îîŸî"Úî%Ëî(î*½î.ïî2Oî4›î:Éî=îBé ïoîâîŽî}î_î Ãî#¹î%œî+ î.Òî1éî3‰î5Ûî<8îB_îEwîGÉï­îâî¡îÕî[îî!Dî#î(î+«î-¬î3Žî:gî=¨îC1îHèïìîâî! îH î$d î+�î.8î2ê ï Vî¤î†î”îõî"åî$úî'iî*qî,9 î2rî3«î6ßî;€î=Hî>€îB{ ÿäTVm$bCHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES38insuchasystem,thedebuggerisapost-processorthatmanipulatesthecompleted"historytape".Thesesystemsfreedusersfromexaminingacomputationcloselyjustincaseanerrormightoccur.However,thisapproachdoeshavedrawbacks:apost-processingdebuggerisnecessarilyread-only;itcannotmodifyacomputation.Balzer'sEXDAMSsystemworkedbymodifyingsourceprogramstocollecthistoryinformation[Balzer69].Executingtheprogramcreatedahistorytape,whichrecordedstatementexecutionsandchangestovariablevalues(similartoourcomputationalmodel).Thedebuggeranswereduserqueriesbyexaminingthecompletedhistorytape.Becauseitdealtonlywiththehistorytape,theEXDAMSdebuggerwaslanguage-independentandextendable.Thehistorytapecouldbeplayedbackwardandforwardatwill.Asaresult,thedebuggercouldperformcomplexanalysesthatwereimpossibleforaconventionaldebugger,suchasperformingflowbackanalysistodeterminewhatstatementgaveavariableitsvalue.Itcouldalsopresentthesuccessionofvaluesofagivenvariable.Pattisproposedamoreambitioushistory-basedsystem[Pattis81].Itincludedatime-orientedlangaugeforconstructingcomplexqueriesaboutacompletedcomputation,suchas:"IsClearLineevercalledtwiceinarowwithoutaninterveningcalltoFillLine?"Italsoproposedanefficientwaytogatherandmanagethelargeamountsofhistorydata,includingbackgroundprocessingduringuserinteractionsandlazyevaluation.TheHELPERsystemcouldlistthelastseveral(50)assignmentstatementsexecuted[Kulsrud69].TheAIDSsystemallowedretreatingsomenumberofinstructionsinacomputation;acommonuseofthissystemwastospecifythatwhenevertheprogramterminatedabnormally,thedebuggershouldretreatandthentraceforwardtotheerrorpoint[Grishman70].Zelkowitzextendedtheseideas,providinganon-interactivesystemforreversibleexecutioninCornell'sPL/Cenvironment[Zelkowitz71].Thesystemstoredthelast200source-levelstepsofthecomputationtoallowforreverseexecution.TheprogramminglanguagewasextendedtoincludeaRETRACEstatement,whichcouldreversetheprogram'sexecution1)toaspecifiedlabel,2)foracertainnumberofsteps,or3)untilsomeconditionheld.TheRETRACEstatementalsospecifiedanewstatementtoexecuteatthatpoint;thestatementcouldtrytogetthecomputationbackontrackoritcouldenabletracingorotherdebuggingactions.ThecomputationwouldthencontinuerïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâî–îÎîþîØî=î"Mî#¿î$ï î-÷î0Ì î8~î:äîA™îFáï_gîâîÝîÕîbîÙî"9î(ßî* î1õî6iî9î:ªî=’î?{îBæîFÖï\¦îâîî±î«î Øî$ î+Jî,pî6 î<î=v îDL ïYäîâî8î´îqî› ïVOî¤î¢îDî!©î&|î(aî.âî3î9î:°î>éîCd sïSŽîâ rî‘ïSŽïSŽîþîpîÖî#kî(:î)jî.î1eî5yî;;îAw îH7ïPÌîâî8îîqîÉî$òî&Êî) î2¬î8�î;�îAÃîGõïN îâî®î­î^îÁî%sî*î-ðî36î4�î7ûî;î>6î@™îE.îH�ïKIîâî—î�îEî+ìî.Ÿ î6eî99î=Çî@ÉîD‘îF~ïH‡îâîî­îÇîOî!´î#³î$Ìî(ßî+-î1%î4àî:&î?šîDàîG�ïEÆîâ îÅîîU î!ƒî'ùî+>î- vî4GïEÆïEÆî4¶î: rïEÆî?8î@ûîG‘ïCîâîMî³îî~î!Žî&~î(+î,,î/.î48î6Í î=šî?‰îCìîEÛîG:ï@Cîâï<­î¤î{î�îÑî |î&é î/hsî3ûï<­ï<­î4Jrî8Jï<­ï<­î9Øî;gîA%îBf ï9ìîâî‚îš î7î#–î(9î+õî,øî3‚ î;®î>ºî@»xîBÓï9ìï9ìîC«rï7*îâîÕî»î>îÛîôî¥î# î% î,«î/%xî0Âï7*ï7*î1šrî7‚ï7*ï7*î8î9¨î;î=ÊîC¶îE–ï4iîâîåî¿î$îî Hî"Óî&eî, î.î2Áî6Jî<‰ îD@ ï1§îâîSîL î«î bî#: ï.î¤îpî˜îî"Çî$øî'Kî)¿î.Dî1 î8 î>ÂsîDrï.ï.îD rîJï.ï+Pîâî×îëî„î¶ î&î)¹î/î0Ø î8Uî: î;g îC÷îE>ï(�îâîVî î­î'îÑî~î#î%æî,î.wî4 î:ô îB‡îDåï%Íîâî^î¹îpî–î óî&î'Íî*-î-Ÿsî1>ï%Íï%Íî1� rî7¸ï%Íï%Íï"8î¤îøîßî!hî%=î+|î,¦î6î:�î<Í îC îI@ïwîâî¼î² sî Êïwïwî! rî'*ïwïwî(žî+€î0î43î6œî9&î;Å îCZîFÌîH�ïµîâ îäî›îLî‘î#K î*lî-L î5æî;µî>hîDXîFïóîâsîïóïóîÜrïóîû î…î �î$Wî)î+bî1Éî7ûî9¦î;Qî îB-îEHÿžTVm$¼CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES39forwardfromthatpoint.Incasetheerroroccurredagaininthere-executionofthecomputation,theRETRACEstatementcouldincludeseveralreversalconditionsandnewstatements;eachwouldbetriedinturn.Davisimplementedaknowledge-baseddebuggerforthePLATOsystemattheUniversityofIllinois[Davis75].Targetedatintroductorycomputersciencestudents,thesystemexecutedprogramsinterpretively.Whenaprogramexceptionwasencountered,thesystemusedreversibleexecutionandadatabaseofcommonprogrammingmisconceptionstodiagnosethesourceoftheerrorandsuggestacorrection.Flowbackanalysiswasamajorpartofthissystemalso.Severalresearchersbuiltsystemstodisplaythevaluesofvariablesgraphically.Earlierdisplay-basedsystems,suchastheRAIDsystematStanford[Petit75],hadbeenabletomonitorthevaluesofasetofvariablescontinuouslywithoutchangingtheirlocationsonthedisplayscreen.Yarwood'snon-interactivesystemdrewpicturesofarraysassequencesofvaluesinabox.Variablesusedasarrayindiceswereshownasflagsmarkingtheircurrentpositioninthearray[Yarwood77].TheIncensesystem,implementedbyMyersatXeroxPARC[Myers80],coulddisplaycomplexstructuresbuiltupofrecordswithembeddedpointers.TheusercouldalsoprogramIncensetodisplaythevaluesofcertainvariabletypesanalogically,suchasbyapiechartorbarchart.Forinstance,avariableoftypeTimecouldbedisplayedasthefaceofaclock.Otherrecentdebuggingresearchhasattemptedtoprovidedebuggingcapabilitiesinnewenvironments,suchasprogrammingenvironmentsforrobotarmsandmultiprocessorenvironments.Theseprojectshavegenerallyfocuseduponprovidingtheconventionaldebuggingcapabilities.MitchellL.Modeladdressedtheproblemofprovidinginteractivesource-leveldebuggingforsophisticatedartificialintelligencelanguages[Model79].Asanexampleofthekindofnewproblemstheselanguagesraise,displayingthechanginglocusofcontrolisdifficultforsuchlanguagesbecausecontrolisde-centralized.TheproblemfacedbyModelisquitesimilartotheoneaddressedinthisdissertation:howtopresentahigh-levelviewofaprogram'sexecutionthatisnotasimplemappingfromitsactualimplementation.Thefirsthalfofhisdissertation,inwhichhestronglymotivatestheneedforanexpectedhigh-levelview,isbothinterestingandenjoyabletoread.Goldmanimplementedadebuggingenvironmentforprogrammingrobotarms[Goldman82].Itincludedspecial-purposedatadisplays,suchasagraphicalpresentationoftheforcesexperiencedbyagivenjointduringamotion.rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)îâî îsîAî»î ‰î#wî%Öî)Gî.øî2¡î4Nî6­ î>…î@=îBœ ï_gîâsîIï_gï_gîrï_gîFî‚î!Uî&;î*Óî/ï î6šî9Xîsî@îB~ îI5ïVOîâsîkïVOïVOîºrîÔïVOïVOîîÂî H î(î.2î2Òî8|î:Éî?1îDÛïSŽîâî>î\î�î#"î)^î, î4Iî6¯î;1î>s îD¹ïPÌîâî¦îÝî…îKî  î(§ î2Eî4î9½î<*î@†îBLîD¸îH7ïN îâî«îÕ î(î"rî'‡î*3î+]î/Sî27î3ïî6‘î; ïJuî¤îÓ îAî!åî'Aî)Lî.[î1î5¡î7¶î=Î îFiïG´îâ îiî¾îíî!˜î#õî(,î,¥î.;sî3ÞïG´ïG´î4-rî7ÄïG´ïG´î8žî;Sî>­îA¤îCPîH�ïDòîâî0îîRîŽîgî B î(|î-¨î3¤î7 î<æî? îA‹îF^ïB1îâî–îìî#Nî&¦î+¹î-Xî1Jî2Þî91î:Ðî>äî@xîAˆîDæï?oîâî2îõî’îCî¨î$ î%Îî)î. î1ûî6Ùî‡îD+îI@ï7*îâî î îFî î �î%ßî) î1bî4Ÿî6Yî8aî9–î;öî?€îAPîCÑîHCï4iîâîˆî±îèî¡î±î#Oî'î) î/*î0Øî38î6î7Ôî8þï0Ôî¤îàîIî!Hî&ðî)«î0hî2\î7¬î>« îF îHï.îâ î²îÉî\ î$Ô î-Lî/nî3î6Iî8æ îB ï+PîâîäîîLî!2î&>î)Òî0î2q î:‹îAE ï'»î¤î$îíîYî#µî&î+¦î-eî3« î:` îAñîH±ï$úîâ îü îR î#�sî)Ëï$úï$úî*rî.žï$úï$úî/äî1èî3Ëî97î:ãî=5î@YîBîDæï"8îâîNî|îò î"aî$¤î*dî-Ïî/kî4î5Pî:kî<‹î?ŸîEÍïwîâî®î4îî" î'©î+mî-ƒî2î3‡î7*î;Éî=‘î@ îBÐîI@ïµîâî� îyî—î_î#Mî$� î+ î.`î02î1vî7ûî>JîA2îB·îEFîF‰ïóîâîµî3î$î>î)'î,î/î1éî3¹î6 î=»î?€îC¥îE­ï2îâî îkîÈîîöî$² î+î.¦î0î3N î:î<¾îBóîD¡ï�î¤îË î î!Bî'ù î0î2A î:Òî>„sîAÞï�ï�îB. rîHï�ï�îIwïÛîâî•îUî!gî'î*Aî+üî-2î32 î; î<Òî?>îCM ïîâîÞîî¼î÷îhî‘ TVm$×CHAPTER2:DEBUGGERSFORALGOL-LIKELANGUAGES40Researchershaverecentlybeguntotackletheproblemsinvolvedindebuggingmultipleprocessesanddistributedsystems,suchasnondeterministicchoices(thatdependuponinterprocesscommunication)andtheinabilitytodiscovertherelativeexecutionorderofstatementsinseparateprocessors[Baiardi+83,Bates+83,Smith83].Severalproposedsolutionsinvolverecordinginterprocessevents.Anotherareaofrecentresearchinvolvesunifiedprogramdevelopmentenvironmentsthathavenoseparable"debugger"[Archer81,Feiler82].Instead,debuggingcommandsareaddedtothesourcelanguage.Theseenvironmentstypicallysupportincrementalprogramconstructionwiththeabilitytomodifyaprogramandresumeitsexecution.Afewresearchershaveconsideredtheproblemofdebuggingoptimizedprograms.TheirworkissurveyedinSection3.4.2.6SummaryThischapterhasdiscusseddebuggingfeaturesandtheirimplementation.Ithasalsodefinedasource-levelmodeloftheexecutionofaprogramandhastiedtheexpectedbehaviorofasource-leveldebuggertothatmodel.Thenextchapterpresentsabroadrangeofexamplesofwaysinwhichcommonoptimizationscancauseadebuggertorespondinneithertheexpectednortheless-desirabletruthfulmanner.rïgîPsîNïgïgî4rî#_ïgsïgî$rî%Eïgsïgî&dî-.rî0ïgsïgî1 rî7Ôïgsïgî8¼pïgîMÓrïb)î¤ î‹î#î"¬î',î),î-tî0%î6îjîEuï_gîâîÕî‚ îjî#¸î&ßî(‚î2òî7±î:îî?ÎîCX ï\¦îâ îîºîî#qî%î*vî,Ðî1¨î7Øî;‡î=: îCîîE–ïYäîâ sî‹ïYäïYäîÚ î6î!­rî%ëïYäïYäî'nî,Sî2bî89î=îCX ïW#îâïSŽî¤îþîãîˆî™î$èî*,î.Öî4Q îpîB“îD@îFŸïN îâîvîq î!ýî'{î,€ î3ùî9� îAHîD\îFµïKIîâî�îNîwîî½î#†î%` ïG´î¤îî§ î¤îÖ î&§î(òî.aî0î6ªî=îCÇîGqïDòîâîNîîÂî¢tï>Uîâîrï:2î¤îÆîºî7î"Jî) î.Aî1î4Pî?î@›îCîEîï7qîâîH îîƒîyî!î'†î){î*áî0«î3Ÿî6Pî9Oî;êîAãîGÏîIÅï4¯îâ î]îVîõî ´î%©î(qî+qî0Mî5•î6°î:—î>Rî?ûîEéîG’ï1îîâî–îªî_ î"âî%tî)/î*^î0mî2"î7jî9î=×î@<îEþîH�ï/,îâ î>îUÿhTVm$Óÿ TIMESROMANþæÿLAURELþŸÿ TIMESROMAN  ÿGACHA  ÿ TIMESROMAN ÿ TIMESROMANþ ÿ TIMESROMANþŸ ÿGACHAþæÿGACHAþŸÿMATHþÿ TIMESROMANþŸÿ TIMESROMANþYÿ TIMESROMANþÿ TIMESROMANþæÿ TIMESROMANþŸÿ TIMESROMANý…ÿ HELVETICAþŸ/ Ú , ! é*Š2 á;3C ‡M 6V &_ Ihp‚w ›€ ͉ »’ S› †¤›ªý° Û¹ äę̶Ô+Ü ôå œîøój/÷õœÇ¨ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ[]<>NewerChap2Monday, May 7, 1984 9:33 pm PDT