148103Sbostic /*- 2*62122Sbostic * Copyright (c) 1980, 1993 3*62122Sbostic * The Regents of the University of California. All rights reserved. 448103Sbostic * 548103Sbostic * %sccs.include.redist.c% 622278Sdist */ 75466Slinton 822278Sdist #ifndef lint 9*62122Sbostic static char sccsid[] = "@(#)printnews.c 8.1 (Berkeley) 06/06/93"; 1048103Sbostic #endif /* not lint */ 115466Slinton 125466Slinton /* 135760Slinton * Print out news during single step tracing. 145466Slinton * 155466Slinton * We have to handle all the single stepping possibilities, 165466Slinton * including combinations. A combination of single stepping 175466Slinton * by line and by instruction causes "curline" to be 0 but 185466Slinton * "ss_lines" to be TRUE. We avoid trying to print lines in this case. 195466Slinton */ 205466Slinton 215466Slinton #include "defs.h" 225466Slinton #include "breakpoint.h" 235466Slinton #include "sym.h" 245466Slinton #include "source.h" 255466Slinton #include "object.h" 265466Slinton #include "mappings.h" 275466Slinton #include "machine.h" 285466Slinton printnews()295466Slintonprintnews() 305466Slinton { 315760Slinton if (ss_variables) { 325760Slinton prvarnews(); 335760Slinton } 345760Slinton if (trcond()) { 355760Slinton if (ss_lines && curline > 0) { 365760Slinton skimsource(srcfilename(pc)); 375760Slinton printf("trace: "); 385760Slinton printlines(curline, curline); 395466Slinton } 405760Slinton if (ss_instructions) { 415760Slinton printf("inst trace: "); 425760Slinton printinst(pc, pc); 435466Slinton } 445760Slinton } 455760Slinton bpact(); 465760Slinton if (stopcond()) { 475760Slinton isstopped = TRUE; 485466Slinton curline = srcline(pc); 495760Slinton printstatus(); 505760Slinton } 515466Slinton } 52