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