

; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE DBGTBK (		! performs symbolic traceback from a PC

;	0002			ADDRESSING_MODE (EXTERNAL = LONG_RELATIVE),

;	0003			IDENT = '000011') =

;	0004	BEGIN

;	0005	

;	0006	!

;	0007	!			  COPYRIGHT (c) 1977 BY

;	0008	!	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

;	0009	!

;	0010	! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED

;	0011	! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE

;	0012	! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER

;	0013	! COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY

;	0014	! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY

;	0015	! TRANSFERRED.

;	0016	!

;	0017	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE

;	0018	! AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT

;	0019	! CORPORATION.

;	0020	!

;	0021	! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS

;	0022	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

;	0023	!

;	0024	

;	0025	!++

;	0026	! FACILITY:	DEBUG (DBG)

;	0027	!

;	0028	! ABSTRACT:	traces program back from an error. Called from DEBUG,

;	0029	!		COMMON OTS.

;	0030	!

;	0031	! Version:	11

;	0032	!

;	0033	! ENVIRONMENT:	Runs in user mode, ASTs enabled, reentrant, shared

;	0034	!

;	0035	! AUTHOR:	Carol Peters, CREATION DATE: September 20, 1977

;	0036	!

;	0037	! MODIFIED BY:

;	0038	!		Dale Roedger, 27 April 1978:	11

;	0039	!

;	0040	! 02	05-10-77	CP	SIGNAL errors.

;	0041	! 03	07-11-77	CP	Find user registers in current run frame.

;	0042	! 04	21-11-77	CP	Add an argument to the val_to_sym call.

;	0043	!				Add an argument in pc_to_line call.

;	0044	! 05	29-12-77	CP	Fix traceback to give correct relative

;	0045	!				PC from a global record name.

;	0046	! 06	6-jan-77	KGP	-Put in Carol's fix for SHOW CALLS

;	0047	!				 when there are no call frames left

;	0048	!				 because the program has run to exit.

;	0049	! 07	02-MAR-78	DAR	Removed leading CRLF directives from FAO

;	0050	!				control strings.

;	0051	! 08	3-mar-78	KGP	-Made SHOW CALLS output more like TRACEback.

;	0052	!				 This is a complete re-write of OUT_TRACEBACK.

;	0053	! 09	24-MAR-78	DAR	Turned on SIGNAL for "no call frames" message.

;	0054	! 10	13-apr-78	KGP	-SHOW CALLS N is now handled properly in

;	0055	!				 dbg$traceback



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 1-1

; Digital Equipment Corporation

;

;	0056	! 11	227-APR-78	DAR	Modified the require and library directives

;	0057	!				for the native build.

;	0058	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 2

; Digital Equipment Corporation

;

;	0059	! TABLE OF CONTENTS:

;	0060	!

;	0061	

;	0062	FORWARD ROUTINE

;	0063		dbg$traceback,				! traces calls through the stack

;	0064		out_traceback : NOVALUE;		! outputs a single line of traceback information

;	0065	

;	0066	!

;	0067	! INCLUDE FILES:

;	0068	!

;	0069	%IF %VARIANT		! True for TEN.

;     L 0070	%THEN

;     U 0071	LIBRARY 'NEW:STARLE';

;     U 0072	

;     U 0073	REQUIRE 'DBGPCT.REQ';		! PSECT declarations

;     U 0074	REQUIRE 'DBGGEN.REQ';		! general DEBUG  definitions

;     U 0075	REQUIRE 'VXSMAC.REQ';		! standard VAX BLISS macros

;     U 0076	REQUIRE 'DBGRST.REQ';		! RST definitions

;     U 0077	REQUIRE 'DBGMSG.REQ';

;     U 0078	REQUIRE 'SYSLIT.REQ';

;     U 0079	REQUIRE 'SYSSER.REQ';		! I/O and FAO definitions

;     U 0080	%ELSE

;	0081	LIBRARY 'SYS$LIBRARY:STARLET.L32';

;	0082	

;	0083	REQUIRE 'SRC$:DBGPCT.REQ';	! PSECT declarations

;	0095	REQUIRE 'SRC$:DBGGEN.REQ';	! general DEBUG  definitions

;	0345	REQUIRE 'SRC$:VXSMAC.REQ';	! standard VAX BLISS macros

;	0385	REQUIRE 'SRC$:DBGRST.REQ';	! RST definitions

;	1532	REQUIRE 'LIB$:DBGMSG.REQ';

;	1811	REQUIRE 'SRC$:SYSLIT.REQ';

;	1834	REQUIRE 'SRC$:SYSSER.REQ';	! I/O and FAO definitions

;      R1837	SWITCHES LIST (SOURCE);

;      R1838	

;      R1839	EXTERNAL ROUTINE

;      R1840		dbg$fao_out;				! formats a line and outputs to the terminal

;      R1841	

;      R1842	SWITCHES LIST (NOSOURCE);

;	1887	%FI

;	1888	

;	1889	!

;	1890	! MACROS:

;	1891	!

;	1892	

;	1893	MACRO

;	1894		cfp$l_handler	= 0, 0, 32, 0%,		! handler address

;	1895		cfp$l_old_fp	= 12, 0, 32, 0%,	! address of previous FP

;	1896		cfp$l_return_pc	= 16, 0, 32, 0%;	! return address of caller

;	1897	

;	1898	!

;	1899	! EQUATED SYMBOLS:

;	1900	!

;	1901	

;	1902	!

;	1903	! OWN STORAGE:

;	1904	!



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 2-1

; Digital Equipment Corporation

;

;	1905	

;	1906	!

;	1907	! EXTERNAL REFERENCES:

;	1908	!

;	1909	

;	1910	EXTERNAL ROUTINE

;	1911		dbg$fao_put : novalue,			! format output lines.

;	1912		dbg$out_put : novalue,			! flush output lines.

;	1913		dbg$get_dst_rec,			! returns the address of a DST record

;	1914		dbg$pc_to_line,				! translates a PC to a line number

;	1915		dbg$val_to_sym;				! translates a value to an NT pointer.

;	1916	

;	1917	EXTERNAL

;	1918		dbg$cp_out_str : vector[,byte],		! points to current output buffer.

;	1919		dbg$gl_buf_siz,				! size of output buffer.

;	1920		dbg$gl_runframe : REF BLOCK [, BYTE],	! pointer to current user registers

;	1921		dbg$user_exit;				! point in DEBUG to which control returns

;	1922							! at end of user program execution

;	1923	

;	1924	LITERAL

;	1925		dbg_tbk		= FALSE,		! for diagnostics

;	1926		dbg_tbk1	= FALSE;		! ditto



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3

; Digital Equipment Corporation

;

;	1927	GLOBAL ROUTINE dbg$traceback (current_pc,

;	1928			       fp_pointer,

;	1929			       exception_name,

;	1930			       num_levels) =		! traces calls on user stack

;	1931	

;	1932	!++

;	1933	! Functional description:

;	1934	!

;	1935	!	This routine collects the symbolic information describing each

;	1936	!	stack frame starting at the stack frame pointed to by the user's

;	1937	!	FP, and proceeding through the frame with which the user program

;	1938	!	was called by CLI, by the OTS, or by DEBUG.

;	1939	!

;	1940	!	Once the symbolic information for a frame is collected, a routine

;	1941	!	is called to output this information to DBG$OUTPUT.

;	1942	!

;	1943	!	The num_levels parameter is either -1, or it is the

;	1944	!	number of call frames which the uses has specifically

;	1945	!	requested (via SHOW CALLS N).

;	1946	!

;	1947	! Formal parameters:

;	1948	!

;	1949	!	current_pc	- PC of user program when traceback occurs

;	1950	!	fp_pointer	- FP of user program when traceback occurs

;	1951	!	exception_name	- type of exception where

;	1952	!			  1 - trap type exception

;	1953	!			  2 - fault or abort type exception

;	1954	!	num_levels	-The number of frames the user wants to see,

;	1955	!			 or -1 which implies "show them all".

;	1956	!

;	1957	! Implicit inputs:

;	1958	!

;	1959	!	The contents of the RST and the DST.

;	1960	!

;	1961	! Implicit outputs:

;	1962	!

;	1963	!	none

;	1964	!

;	1965	! Routine value:

;	1966	!

;	1967	!	true or false

;	1968	!

;	1969	! Side effects:

;	1970	!

;	1971	!	none

;	1972	!

;	1973	!--

;	1974	

;	1975		BEGIN

;	1976	

;	1977		LOCAL

;	1978			current_fp : REF BLOCK [, BYTE],! value of FP of working stack frame

;	1979			current_level,			! number of lines left to output

;	1980			exc_type,			! type of exception

;	1981			dst_entry : REF dst_record,	! pointer to DST entry for routine name



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3-1

; Digital Equipment Corporation

;

;	1982			line_number,			! matching line number

;	1983			line_number_2,			! secondary matching line number

;	1984			pc_value,			! current PC in writable variable

;	1985			module_ptr : REF nt_record,	! pointer to NT entry for outermost scope

;	1986			relative_pc,			! offset of return PC from routine start

;	1987			label_ptr : REF nt_record;	! pointer to NT entry for routine name

;	1988	

;	1989		! If the user doesn't want to see any frames,

;	1990		! we're done already.

;	1991	

;	1992		IF( .num_levels eql 0 )

;	1993		then

;	1994			return;

;	1995	

;	1996		!++

;	1997		! Collect the user's current FP and PC and the number of frames

;	1998		! to traceback. Store exception_name in exc_type.  Make sure

;	1999		! that there are some call frames left or we forget it.

;	2000		!--

;	2001		current_fp = .fp_pointer;

;	2002		pc_value = .current_pc;

;	2003	

;	2004		IF( (.PC_VALUE EQL DBG$USER_EXIT) OR (.PC_VALUE EQL 0) )

;	2005		THEN

;	2006			BEGIN

;	2007			SIGNAL (DBG$_NOCALLS);

;	2008			! no return

;	2009			END;

;	2010	

;	2011		! If simply "SHOW CALLS" was given, then

;	2012		! num_levels was passed as -1.  In this

;	2013		! case we set current_level to a 'large number'

;	2014		! so that we can then loop printing out all the

;	2015		! frames that there are.

;	2016	

;	2017		IF( (current_level = .num_levels) LSS 0 )

;	2018		then

;	2019			current_level = 1000;

;	2020	

;	2021		exc_type = .exception_name;

;	2022		$fao_tt_out('module name     routine name     line   relative PC  absolute PC!/');

;	2023	

;	2024		!++

;	2025		! The following loop translates the current PC into a symbol name,

;	2026		! and then outputs the name of the surrounding module, the name

;	2027		! of the symbol (will often be a routine name, but can

;	2028		! also be just a label or a PSECT name), the corresponding

;	2029		! line number, the relative PC from the symbol's value,

;	2030		! and the absolute address for each user stack frame.

;	2031		!--

;	2032		WHILE .current_level GTR 0 DO

;	2033			BEGIN

;	2034	

;	2035			!++

;	2036			! First, translate the address into a symbolic name of



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3-2

; Digital Equipment Corporation

;

;	2037			! the routine that encompasses the address.

;	2038			!--

;	2039			label_ptr = 0;			! necessary because the

;	2040							! pointer returned is only a word.

;	2041			IF NOT dbg$val_to_sym (.pc_value, label_ptr, FALSE)

;	2042			THEN

;	2043				BEGIN

;	2044	

;	2045	%IF dbg_tbk

;     L 2046	%THEN

;     U 2047				$fao_tt_out ('!/after val_to_sym, type is !UB, name is !AC',

;     U 2048					.label_ptr [nt_type], label_ptr [nt_name_cs]);

;     U 2049	%FI

;	2050	

;	2051				out_traceback (

;	2052					0,

;	2053					0,

;	2054					0,

;	2055					0,

;	2056					.pc_value);

;	2057				END

;	2058	

;	2059			!++

;	2060			! Found the symbol record in the name table of the RST.

;	2061			! See if the symbol is both global and not associated with

;	2062			! a DST record. If so, compute the relative PC and output

;	2063			! everthing known (namely global name, relative PC, and

;	2064			! absolute PC).

;	2065			!--

;	2066			ELSE IF (.label_ptr [nt_is_global]) AND (.label_ptr [nt_up_scope] EQL 0)

;	2067			THEN

;	2068				BEGIN

;	2069				out_traceback (

;	2070					0,

;	2071					label_ptr [nt_name_cs],

;	2072					0,

;	2073					(.pc_value - .label_ptr [nt_gbl_value]),

;	2074					.pc_value);

;	2075				END

;	2076			ELSE

;	2077				BEGIN

;	2078	

;	2079				!++

;	2080				! Now get the corresponding DST record and confirm that

;	2081				! the symbol has such a DST record.

;	2082				!--

;	2083				dst_entry = dbg$get_dst_rec (.label_ptr [nt_dst_ptr]);

;	2084	

;	2085	%IF dbg_tbk

;     L 2086	%THEN

;     U 2087				$fao_tt_out ('!/after get_dst_rec, type is !UB, value is !XL, name is !AC',

;     U 2088					.dst_entry [dstr_type], .dst_entry [dstr_value], dst_entry [dstr_name]);

;     U 2089	%FI

;	2090	

;	2091				IF .dst_entry EQL 0



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3-3

; Digital Equipment Corporation

;

;	2092				THEN

;	2093					BEGIN

;	2094					SIGNAL (dbg$_rsterr);

;	2095					RETURN FALSE

;	2096					END;

;	2097	

;	2098				!++

;	2099				! Store the relative PC offset of the return address

;	2100				! from the symbol found in the val_to_sym.

;	2101				!--

;	2102				relative_pc = .pc_value - .dst_entry [dstr_value];

;	2103	

;	2104				!++

;	2105				! Now see whether the symbol has any upward scope

;	2106				! pointer. If it does, loop up through that pointer

;	2107				! and any further pointer in the parent scope until

;	2108				! the outermost containing module is seen.

;	2109				!--

;	2110				module_ptr = .label_ptr;

;	2111				WHILE .module_ptr [nt_type] NEQ dsc$k_dtype_mod DO

;	2112					IF .module_ptr [nt_up_scope] EQL 0

;	2113					THEN EXITLOOP

;	2114					ELSE module_ptr = .module_ptr [nt_up_scope];

;	2115		

;	2116				!++

;	2117				! If the symbol was not a routine name, just output the

;	2118				! module name (if we have it; for globals, we might

;	2119				! not), the symbol name, the offset from that symbol, and

;	2120				! the return PC on the stack.

;	2121				!--

;	2122				IF .label_ptr [nt_type] NEQ dsc$k_dtype_rtn

;	2123				THEN

;	2124					BEGIN

;	2125					out_traceback (

;	2126						(IF .module_ptr [nt_type] NEQ dsc$k_dtype_mod

;	2127						 THEN 0

;	2128						 ELSE module_ptr [nt_name_cs]),

;	2129						label_ptr [nt_name_cs],

;	2130						0,

;	2131						.relative_pc,

;	2132						.pc_value);

;	2133					END

;	2134				ELSE

;	2135					BEGIN

;	2136	

;	2137					!++

;	2138					! If the highest scope is module, and that

;	2139					! module is FORTRAN, do special processing

;	2140					! to obtain line number correspondence.

;	2141					!--

;	2142					MAP

;	2143						module_ptr : REF mc_record;

;	2144	

;	2145					IF .module_ptr [mc_type] EQL dsc$k_dtype_mod

;	2146					THEN



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3-4

; Digital Equipment Corporation

;

;	2147						BEGIN

;	2148						IF .module_ptr [mc_language] EQL fortran_module

;	2149						THEN

;	2150							BEGIN

;	2151	

;	2152							!++

;	2153							! Initialize the line number variables,

;	2154							! and match the current PC address with

;	2155							! one or two line numbers.

;	2156							!--

;	2157							line_number = 0;

;	2158							line_number_2 = 0;

;	2159							IF NOT dbg$pc_to_line (

;	2160								pc_value,

;	2161								.dst_entry [dstr_value],

;	2162								exc_type,

;	2163								line_number,

;	2164								line_number_2)

;	2165							THEN out_traceback (

;	2166								module_ptr [mc_name_cs],

;	2167								label_ptr [nt_name_cs],

;	2168								0,

;	2169								.relative_pc,

;	2170								.pc_value)

;	2171							ELSE out_traceback (

;	2172								module_ptr [mc_name_cs],

;	2173								label_ptr [nt_name_cs],

;	2174								.line_number,

;	2175								.relative_pc,

;	2176								.pc_value);

;	2177							END

;	2178						ELSE out_traceback (

;	2179							module_ptr [mc_name_cs],

;	2180							label_ptr [nt_name_cs],

;	2181							0,

;	2182							.relative_pc,

;	2183							.pc_value)

;	2184						END

;	2185					ELSE out_traceback (

;	2186						0,

;	2187						label_ptr [nt_name_cs],

;	2188						0,

;	2189						.relative_pc,

;	2190						.pc_value);

;	2191					END;

;	2192				END;

;	2193	

;	2194			!++

;	2195			! Update pc_value and current_fp to the previous frame,

;	2196			! decrement the level number, and try to loop through

;	2197			! again. If the new return address is the instruction

;	2198			! after DEBUG called the user, then stop here.

;	2199			!--

;	2200			pc_value = .current_fp [cfp$l_return_pc];

;	2201			IF .pc_value EQL dbg$user_exit



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3-5

; Digital Equipment Corporation

;

;	2202			THEN RETURN;

;	2203			current_fp = .current_fp [cfp$l_old_fp];

;	2204			current_level = .current_level - 1;

;	2205			END;

;	2206		END;





							    .TITLE  DBGTBK

							    .IDENT  \000011\



							    .PSECT  DBG$PLIT,NOWRT,  SHR,  PIC,0



					      00000 P.AAA:  .BYTE   66							      ;

					      00001 	    .ASCII  \module name     routine name     line   relative PC  a\  ;

					      00037 	    .ASCII  \bsolute PC!/\					      ;

					      00043	    .BLKB   1



							    .GLOBL  DBG$_RST_BEGIN, DBG$FAO_OUT, DBG$FAO_PUT, DBG$OUT_PUT

							    .GLOBL  DBG$GET_DST_REC, DBG$PC_TO_LINE, DBG$VAL_TO_SYM

							    .GLOBL  DBG$CP_OUT_STR, DBG$GL_BUF_SIZ, DBG$GL_RUNFRAME

							    .GLOBL  DBG$USER_EXIT



							    .PSECT  DBG$CODE,NOWRT,  SHR,  PIC,0



					 0FFC 00000 	    .ENTRY  DBG$TRACEBACK, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11       ; 1927

		         5A 00000000G  EF  9E 00002 	    MOVAB   DBG$USER_EXIT, R10					      ;

		         5B 00000000G  00  9E 00009 	    MOVAB   LIB$SIGNAL, R11					      ;

		         5E	       14  C2 00010 	    SUBL2   #20, SP						      ;

				  10   AC  D5 00013 	    TSTL    NUM_LEVELS						      ; 1992

				       3E  13 00016 	    BEQL    5$							      ;

		         56	  08   AC  D0 00018 	    MOVL    FP_POINTER, CURRENT_FP				      ; 2001

		         6E	  04   AC  D0 0001C 	    MOVL    CURRENT_PC, PC_VALUE				      ; 2002

		         50	       6A  9E 00020 	    MOVAB   DBG$USER_EXIT, R0					      ; 2004

		         50	       6E  D1 00023 	    CMPL    PC_VALUE, R0					      ;

				       04  13 00026 	    BEQL    1$							      ;

				       6E  D5 00028 	    TSTL    PC_VALUE						      ;

				       09  12 0002A 	    BNEQ    2$							      ;

			    000281E0   8F  DD 0002C 1$:     PUSHL   #164320						      ; 2007

		         6B	       01  FB 00032 	    CALLS   #1, LIB$SIGNAL					      ;

		         59	  10   AC  D0 00035 2$:     MOVL    NUM_LEVELS, CURRENT_LEVEL				      ; 2017

				       05  18 00039 	    BGEQ    3$							      ;

		         59	03E8   8F  3C 0003B 	    MOVZWL  #1000, CURRENT_LEVEL				      ; 2019

		    04   AE	  0C   AC  D0 00040 3$:     MOVL    EXCEPTION_NAME, EXC_TYPE				      ; 2021

				       7E  D4 00045 	    CLRL    -(SP)						      ; 2022

			    00000000'  EF  9F 00047 	    PUSHAB  P.AAA						      ;

	      00000000G  EF	       02  FB 0004D 	    CALLS   #2, DBG$FAO_OUT					      ;

				       59  D5 00054 4$:     TSTL    CURRENT_LEVEL					      ; 2032

				       55  15 00056 5$:     BLEQ    8$							      ;

				  10   AE  D4 00058 	    CLRL    LABEL_PTR						      ; 2039

				       7E  D4 0005B 	    CLRL    -(SP)						      ; 2041

				  14   AE  9F 0005D 	    PUSHAB  LABEL_PTR						      ;

		         54	  08   AE  D0 00060 	    MOVL    PC_VALUE, R4					      ;

				       54  DD 00064 	    PUSHL   R4							      ;

	      00000000G  EF	       03  FB 00066 	    CALLS   #3, DBG$VAL_TO_SYM					      ;

		         09	       50  E8 0006D 	    BLBS    R0, 6$						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3-6

; Digital Equipment Corporation

;

				       54  DD 00070 	    PUSHL   R4							      ; 2051

				       7E  7C 00072 	    CLRQ    -(SP)						      ;

				       7E  D4 00074 	    CLRL    -(SP)						      ;

				     00CE  31 00076 	    BRW     19$							      ;

	   52	    10   AE 00000000G  8F  C1 00079 6$:     ADDL3   #DBG$_RST_BEGIN, LABEL_PTR, R2			      ; 2066

		         0F	  03   A2  E9 00082 	    BLBC    3(R2), 7$						      ;

				  08   A2  B5 00086 	    TSTW    8(R2)						      ;

				       0A  12 00089 	    BNEQ    7$							      ;

				       54  DD 0008B 	    PUSHL   R4							      ; 2069

	   7E	         54	  04   A2  C3 0008D 	    SUBL3   4(R2), R4, -(SP)					      ; 2073

				     00AD  31 00092 	    BRW     18$							      ; 2069

				  04   A2  DD 00095 7$:     PUSHL   4(R2)						      ; 2083

	      00000000G  EF	       01  FB 00098 	    CALLS   #1, DBG$GET_DST_REC					      ;

		         57	       50  D0 0009F 	    MOVL    R0, DST_ENTRY					      ;

				       0C  12 000A2 	    BNEQ    9$							      ; 2091

			    0002834A   8F  DD 000A4 	    PUSHL   #164682						      ; 2094

		         6B	       01  FB 000AA 	    CALLS   #1, LIB$SIGNAL					      ;

				     00B3  31 000AD 8$:     BRW     21$							      ; 2095

	   58	         54	  03   A7  C3 000B0 9$:     SUBL3   3(DST_ENTRY), R4, RELATIVE_PC			      ; 2102

		         55	  10   AE  D0 000B5 	    MOVL    LABEL_PTR, MODULE_PTR				      ; 2110

		         50 00000000G  E5  9E 000B9 10$:    MOVAB   DBG$_RST_BEGIN(MODULE_PTR), R0			      ; 2111

		    BC   8F	  02   A0  91 000C0 	    CMPB    2(R0), #188						      ;

				       0B  13 000C5 	    BEQL    11$							      ;

				  08   A0  B5 000C7 	    TSTW    8(R0)						      ; 2112

				       06  13 000CA 	    BEQL    11$							      ;

		         55	  08   A0  3C 000CC 	    MOVZWL  8(R0), MODULE_PTR					      ; 2114

				       E7  11 000D0 	    BRB     10$							      ; 2111

		         53 00000000G  E5  9E 000D2 11$:    MOVAB   DBG$_RST_BEGIN(MODULE_PTR), R3			      ; 2126

		    BE   8F	  02   A2  91 000D9 	    CMPB    2(R2), #190						      ; 2122

				       18  13 000DE 	    BEQL    12$							      ;

				       54  DD 000E0 	    PUSHL   R4							      ; 2125

				       58  DD 000E2 	    PUSHL   RELATIVE_PC						      ;

				       7E  D4 000E4 	    CLRL    -(SP)						      ;

				  0C   A2  9F 000E6 	    PUSHAB  12(R2)						      ; 2129

		    BC   8F	  02   A3  91 000E9 	    CMPB    2(R3), #188						      ; 2126

				       57  12 000EE 	    BNEQ    19$							      ;

	   50	         53	       0C  C1 000F0 	    ADDL3   #12, R3, R0						      ; 2128

				       50  DD 000F4 	    PUSHL   R0							      ; 2126

				       51  11 000F6 	    BRB     20$							      ; 2125

		    BC   8F	  02   A3  91 000F8 12$:    CMPB    2(R3), #188						      ; 2145

				       3F  12 000FD 	    BNEQ    17$							      ;

      03   A3	         03	       03  ED 000FF 	    CMPZV   #3, #3, 3(R3), #1					      ; 2148

				       01     00104									      ;

				       29  12 00105 	    BNEQ    14$							      ;

				  08   AE  7C 00107 	    CLRQ    LINE_NUMBER						      ; 2157

				  0C   AE  9F 0010A 	    PUSHAB  LINE_NUMBER_2					      ; 2159

				  0C   AE  9F 0010D 	    PUSHAB  LINE_NUMBER						      ;

				  0C   AE  9F 00110 	    PUSHAB  EXC_TYPE						      ;

				  03   A7  DD 00113 	    PUSHL   3(DST_ENTRY)					      ;

				  10   AE  9F 00116 	    PUSHAB  PC_VALUE						      ;

	      00000000G  EF	       05  FB 00119 	    CALLS   #5, DBG$PC_TO_LINE					      ;

		         04	       50  E8 00120 	    BLBS    R0, 13$						      ;

				       6E  DD 00123 	    PUSHL   PC_VALUE						      ; 2165

				       0B  11 00125 	    BRB     15$							      ;

				       6E  DD 00127 13$:    PUSHL   PC_VALUE						      ; 2171



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 3-7

; Digital Equipment Corporation

;

				       58  DD 00129 	    PUSHL   RELATIVE_PC						      ;

				  10   AE  DD 0012B 	    PUSHL   LINE_NUMBER						      ;

				       06  11 0012E 	    BRB     16$							      ; 2173

				       54  DD 00130 14$:    PUSHL   R4							      ; 2178

				       58  DD 00132 15$:    PUSHL   RELATIVE_PC						      ;

				       7E  D4 00134 	    CLRL    -(SP)						      ;

				  0C   A2  9F 00136 16$:    PUSHAB  12(R2)						      ; 2180

				  0C   A3  9F 00139 	    PUSHAB  12(R3)						      ; 2179

				       0B  11 0013C 	    BRB     20$							      ; 2178

				       54  DD 0013E 17$:    PUSHL   R4							      ; 2185

				       58  DD 00140 	    PUSHL   RELATIVE_PC						      ;

				       7E  D4 00142 18$:    CLRL    -(SP)						      ;

				  0C   A2  9F 00144 	    PUSHAB  12(R2)						      ; 2187

				       7E  D4 00147 19$:    CLRL    -(SP)						      ; 2185

		  0000V  CF	       05  FB 00149 20$:    CALLS   #5, OUT_TRACEBACK					      ;

		         6E	  10   A6  D0 0014E 	    MOVL    16(CURRENT_FP), PC_VALUE				      ; 2200

		         50	       6A  9E 00152 	    MOVAB   DBG$USER_EXIT, R0					      ; 2201

		         50	       6E  D1 00155 	    CMPL    PC_VALUE, R0					      ;

				       09  13 00158 	    BEQL    21$							      ;

		         56	  0C   A6  D0 0015A 	    MOVL    12(CURRENT_FP), CURRENT_FP				      ; 2203

				       59  D7 0015E 	    DECL    CURRENT_LEVEL					      ; 2204

				     FEF1  31 00160 	    BRW     4$							      ; 2032

				       50  D4 00163 21$:    CLRL    R0							      ; 1927

					   04 00165 	    RET     							      ;



; Routine Size:  358 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 4

; Digital Equipment Corporation

;

;	2207	ROUTINE out_traceback (module_name_stg,

;	2208			      label_name_stg,

;	2209			      line_number,

;	2210			      relative_pc,

;	2211			      absolute_addr) : NOVALUE =	! outputs a line of traceback

;	2212	

;	2213	!++

;	2214	! Functional description:

;	2215	!

;	2216	!	This routine actually calls FAO and DEBUG's output routine to

;	2217	!	format and output a line of traceback information.

;	2218	!

;	2219	! Formal parameters:

;	2220	!

;	2221	!	module_name_stg	- address of counted string that is module name

;	2222	!	label_name_stg	- address of counted string that is label name

;	2223	!	line_number	- line number matching PC

;	2224	!	relative_pc	- relative PC value from beginning of label

;	2225	!	absolute_addr	- PC matching line number

;	2226	!

;	2227	! Implicit inputs:

;	2228	!

;	2229	!	An OPEN and CONNECT has been done on DBG$OUTPUT

;	2230	!

;	2231	! Implicit outputs:

;	2232	!

;	2233	!	none

;	2234	!

;	2235	! Routine value:

;	2236	!

;	2237	!	novalue

;	2238	!

;	2239	! Side effects:

;	2240	!

;	2241	!	a line is output to the output device associated with DBG$OUTPUT.

;	2242	!

;	2243	!--

;	2244	

;	2245		BEGIN

;	2246	

;	2247		MAP

;	2248			module_name_stg	: CS_POINTER,

;	2249			label_name_stg	: CS_POINTER;

;	2250	

;	2251		LOCAL

;	2252			output_cs : CS_POINTER,

;	2253			output_buffer : vector[tty_out_width+1,byte],

;	2254			blank : CS_POINTER;

;	2255	

;	2256		! Use 'blank' as a CS pointer to a single

;	2257		! blank character for printing when we don't

;	2258		! or can't print a 'real' character string.

;	2259	

;	2260		blank = uplit( %ascic ' ' );

;	2261		output_cs = uplit( %ascic '!15AC ' );



; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 4-1

; Digital Equipment Corporation

;

;	2262	

;	2263	%IF dbg_tbk1

;     L 2264	%THEN

;     U 2265		$fao_tt_out ('!/module name is !15AC, label name is !15AC',

;     U 2266			(IF .module_name_stg EQL 0

;     U 2267			then .blank

;     U 2268			 ELSE .module_name_stg),

;     U 2269			(IF .label_name_stg EQL 0

;     U 2270			then .blank

;     U 2271			 ELSE .label_name_stg));

;     U 2272	%FI

;	2273		! Set up for standard DEBUG I/O.

;	2274	

;	2275		dbg$gl_buf_siz = 0;

;	2276		dbg$cp_out_str = output_buffer+1;

;	2277	

;	2278		! The module name only gets printed if

;	2279		!	a) we've got one

;	2280		!    and

;	2281		!	b) there is a line number - i.e. in FORTRAN

;	2282		! 

;	2283		! The label name (p-sect name, ROUTINE, etc) is printed

;	2284		! as long as we've got one.  The line number field is

;	2285		! skipped for MARS and BLISS, and in FORTRAN when there

;	2286		! were no PC correlation records for the indicated module.

;	2287		! The 'relative PC' and 'absolute PC' are always 

;	2288		! printed.

;	2289	

;	2290		IF( .module_name_stg NEQ 0 AND .line_number EQL 0 )

;	2291		THEN

;	2292			dbg$fao_put(.output_cs,.module_name_stg)

;	2293		ELSE

;	2294			dbg$fao_put(.output_cs,.blank);

;	2295		IF( .label_name_stg NEQ 0 )

;	2296		THEN

;	2297			dbg$fao_put(.output_cs,.label_name_stg)

;	2298		ELSE

;	2299			dbg$fao_put(.output_cs,.blank);

;	2300		IF( .line_number NEQ 0 )

;	2301		THEN

;	2302			dbg$fao_put(uplit(%ascic '!5UL   '),.line_number)

;	2303		ELSE

;	2304			dbg$fao_put(uplit(%ascic '!8AC'),.blank);

;	2305	

;	2306		dbg$fao_put(uplit(%ascic '   !XL     !XL'),.relative_pc,.absolute_addr);

;	2307	

;	2308		! Cause the current buffer to be output.

;	2309	

;	2310		dbg$out_put(output_buffer);

;	2311	END;







							    .PSECT  DBG$PLIT,NOWRT,  SHR,  PIC,0





; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 4-2

; Digital Equipment Corporation

;

					      00044 P.AAB:  .ASCII  <1>\ \<0><0>					      ;

					      00048 P.AAC:  .ASCII  <6>\!15AC \<0>					      ;

					      00050 P.AAD:  .ASCII  <7>\!5UL   \					      ;

					      00058 P.AAE:  .ASCII  <4>\!8AC\<0><0><0>					      ;

					      00060 P.AAF:  .ASCII  <14>\   !XL     !XL\<0>				      ;







							    .PSECT  DBG$CODE,NOWRT,  SHR,  PIC,0



					 0C0C 00166 OUT_TRACEBACK:

							    .WORD   Save R2,R3,R10,R11					      ; 2207

		         5A 00000000G  EF  9E 00168 	    MOVAB   DBG$FAO_PUT, R10					      ;

		         5B 00000000'  EF  9E 0016F 	    MOVAB   P.AAB, R11						      ;

		         5E	FF78   CE  9E 00176 	    MOVAB   -136(SP), SP					      ;

		         53	       6B  9E 0017B 	    MOVAB   P.AAB, BLANK					      ; 2260

		         52	  04   AB  9E 0017E 	    MOVAB   P.AAC, OUTPUT_CS					      ; 2261

			    00000000G  EF  D4 00182 	    CLRL    DBG$GL_BUF_SIZ					      ; 2275

	      00000000G  EF	  01   AE  9E 00188 	    MOVAB   OUTPUT_BUFFER+1, DBG$CP_OUT_STR			      ; 2276

				  04   AC  D5 00190 	    TSTL    MODULE_NAME_STG					      ; 2290

				       0A  13 00193 	    BEQL    1$							      ;

				  0C   AC  D5 00195 	    TSTL    LINE_NUMBER						      ;

				       05  12 00198 	    BNEQ    1$							      ;

				  04   AC  DD 0019A 	    PUSHL   MODULE_NAME_STG					      ; 2292

				       02  11 0019D 	    BRB     2$							      ;

				       53  DD 0019F 1$:     PUSHL   BLANK						      ; 2294

				       52  DD 001A1 2$:     PUSHL   OUTPUT_CS						      ;

		         6A	       02  FB 001A3 	    CALLS   #2, DBG$FAO_PUT					      ;

				  08   AC  D5 001A6 	    TSTL    LABEL_NAME_STG					      ; 2295

				       05  13 001A9 	    BEQL    3$							      ;

				  08   AC  DD 001AB 	    PUSHL   LABEL_NAME_STG					      ; 2297

				       02  11 001AE 	    BRB     4$							      ;

				       53  DD 001B0 3$:     PUSHL   BLANK						      ; 2299

				       52  DD 001B2 4$:     PUSHL   OUTPUT_CS						      ;

		         6A	       02  FB 001B4 	    CALLS   #2, DBG$FAO_PUT					      ;

				  0C   AC  D5 001B7 	    TSTL    LINE_NUMBER						      ; 2300

				       08  13 001BA 	    BEQL    5$							      ;

				  0C   AC  DD 001BC 	    PUSHL   LINE_NUMBER						      ; 2302

				  0C   AB  9F 001BF 	    PUSHAB  P.AAD						      ;

				       05  11 001C2 	    BRB     6$							      ;

				       53  DD 001C4 5$:     PUSHL   BLANK						      ; 2304

				  14   AB  9F 001C6 	    PUSHAB  P.AAE						      ;

		         6A	       02  FB 001C9 6$:     CALLS   #2, DBG$FAO_PUT					      ;

		         7E	  10   AC  7D 001CC 	    MOVQ    RELATIVE_PC, -(SP)					      ; 2306

				  1C   AB  9F 001D0 	    PUSHAB  P.AAF						      ;

		         6A	       03  FB 001D3 	    CALLS   #3, DBG$FAO_PUT					      ;

				       5E  DD 001D6 	    PUSHL   SP							      ; 2310

	      00000000G  EF	       01  FB 001D8 	    CALLS   #1, DBG$OUT_PUT					      ;

					   04 001DF 	    RET     							      ; 2207



; Routine Size:  122 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 04:35:38	DBB3:[DEBUG.SRC]DBGTBK.B32;5					Page 5

; Digital Equipment Corporation

;

;	2312	END

;	2313	ELUDOM









							    .GLOBL  LIB$SIGNAL



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  DBG$PLIT       	   112  NOWRT,  RD ,  EXE,  SHR,  LCL,  REL,  CON,  PIC,ALIGN(0)

;  DBG$CODE       	   480  NOWRT,  RD ,  EXE,  SHR,  LCL,  REL,  CON,  PIC,ALIGN(0)

;  $CODE$         	     0  NOWRT,  RD ,  EXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]STARLET.L32;1		      2688         5         0       109













;			COMPILER INTERNAL TIMING



;	Phase	    Faults	Cpu-time      Elapsed-time

;	LEXSYN	      495	00:16.6		00:18.8

;	FLOWAN	       23	00:01.5		00:01.5

;	DELAY	       24	00:00.7		00:00.7

;	TNBIND	       41	00:01.3		00:01.3

;	CODE	       44	00:02.2		00:02.2

;	FINAL	      103	00:02.9		00:03.1

;	Total	      730	00:25.2		00:27.5



; Size:		480 code + 112 data bytes

; Run Time:	00:25.6

; Elapsed Time:	00:28.0

; Memory Used:	284 pages

; Compilation Complete

