15466Slinton /* Copyright (c) 1982 Regents of the University of California */ 25466Slinton 3*5760Slinton static char sccsid[] = "@(#)printnews.c 1.2 02/11/82"; 45466Slinton 55466Slinton /* 6*5760Slinton * Print out news during single step tracing. 75466Slinton * 85466Slinton * We have to handle all the single stepping possibilities, 95466Slinton * including combinations. A combination of single stepping 105466Slinton * by line and by instruction causes "curline" to be 0 but 115466Slinton * "ss_lines" to be TRUE. We avoid trying to print lines in this case. 125466Slinton */ 135466Slinton 145466Slinton #include "defs.h" 155466Slinton #include "breakpoint.h" 165466Slinton #include "sym.h" 175466Slinton #include "source.h" 185466Slinton #include "object.h" 195466Slinton #include "mappings.h" 205466Slinton #include "machine.h" 215466Slinton 225466Slinton printnews() 235466Slinton { 24*5760Slinton if (ss_variables) { 25*5760Slinton prvarnews(); 26*5760Slinton } 27*5760Slinton if (trcond()) { 28*5760Slinton if (ss_lines && curline > 0) { 29*5760Slinton skimsource(srcfilename(pc)); 30*5760Slinton printf("trace: "); 31*5760Slinton printlines(curline, curline); 325466Slinton } 33*5760Slinton if (ss_instructions) { 34*5760Slinton printf("inst trace: "); 35*5760Slinton printinst(pc, pc); 365466Slinton } 37*5760Slinton } 38*5760Slinton bpact(); 39*5760Slinton if (stopcond()) { 40*5760Slinton isstopped = TRUE; 415466Slinton curline = srcline(pc); 42*5760Slinton printstatus(); 43*5760Slinton } 445466Slinton } 45