1 /*- 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)printnews.c 8.1 (Berkeley) 06/06/93"; 10 #endif /* not lint */ 11 12 /* 13 * Print out news during single step tracing. 14 * 15 * We have to handle all the single stepping possibilities, 16 * including combinations. A combination of single stepping 17 * by line and by instruction causes "curline" to be 0 but 18 * "ss_lines" to be TRUE. We avoid trying to print lines in this case. 19 */ 20 21 #include "defs.h" 22 #include "breakpoint.h" 23 #include "sym.h" 24 #include "source.h" 25 #include "object.h" 26 #include "mappings.h" 27 #include "machine.h" 28 printnews()29printnews() 30 { 31 if (ss_variables) { 32 prvarnews(); 33 } 34 if (trcond()) { 35 if (ss_lines && curline > 0) { 36 skimsource(srcfilename(pc)); 37 printf("trace: "); 38 printlines(curline, curline); 39 } 40 if (ss_instructions) { 41 printf("inst trace: "); 42 printinst(pc, pc); 43 } 44 } 45 bpact(); 46 if (stopcond()) { 47 isstopped = TRUE; 48 curline = srcline(pc); 49 printstatus(); 50 } 51 } 52