* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)wheredump.c 5.1 (Berkeley) %G%";
* Print a list of currently active blocks starting with most recent.
error("program is not active");
for (frp
= curframe(); frp
!= NIL
; frp
= nextframe(frp
)) {
f
= whatblock(entry(frp
));
printwhere(line
, srcfilename(prevpc
));
printf("%s, ", name(program
));
printwhere(line
, srcfilename(prevpc
));
* Dump the world to the given file.
* Like "where", but variables are dumped also.
error("program is not active");
for (frp
= curframe(); frp
!= NIL
; frp
= nextframe(frp
)) {
f
= whatblock(entry(frp
));
printwhere(line
, srcfilename(prevpc
));
printf("%s, ", name(program
));
printwhere(line
, srcfilename(prevpc
));