Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/comp/cadb.mac
There is 1 other file named cadb.mac in the archive. Click here to see a list.
	SALL
	SEARCH	SIMMAC,SIMMC2
	CTITLE	CADB
	IFE QDEBUG,<END>
	INTERN	CADB
	EXTERN	CGDB,DBDS,O2IV
	IFN QDEBUG,<EXTERN	O2DB,YCADB,YCGDB,DBDD,DBDR,DBDB>
	MACINIT
	TWOSEG
	RELOC	400K
;PURPOSE:	PROCESS DEBUG SYMBOLS IN IC1 BY DETERMINING THE COMPONENT REQUESTED
;		AND INTERPRETING THE DEBUG REQUEST.
;ENTRY:		CADB
;NORMAL EXIT:	RETURN
;ERROR EXITS:	RFAIL FOR UNSUPPLIED CODES AND INVALID MODULE NAMES.
;I/O PERFORMED:	NONE
;ERRORS GENERATED:	NO. DEBUG VERSION ONLY.
	SUBTTL	CADB	DEBUG CODE PROCESSING
CADB:	ASSERT<
		CAIE	XCUR,%DEBUG
		RFAIL	CADB ENTERED BUT XCUR NE DEBUG
	>
	EXEC	O2IV	; GET CODE TO X0
	IFE	QDEBUG,<RETURN>
	IFN	QDEBUG,<
	L	X1,	;CODE TO X1 AND X0
	ANDI	X1,7
	ANDI	X0,777700
	HRLZ		; SIXBIT COMPONENT NAME IN X0 WITH ZERO FILL
	CAMN	[SIXBIT/M2/]
	GOTO	M2DB
	CAMN	[SIXBIT/O2/]
	GOTO	O2DB
	CAMN	[SIXBIT/CA/]
	GOTO	CADBB
	CAMN	[SIXBIT/CG/]
	GOTO	CGDB
	CAMN	[SIXBIT/OD/]
	GOTO	ODDB
	CAMN	[SIXBIT/OR/]
	GOTO	ORDB
	; CHECK IF PISS OFF
	CAMN	[SIXBIT/I3/]
	GOTO	PASSON
	CAMN	[SIXBIT/M3/]
	GOTO	PASSON
	CAMN	[SIXBIT/E3/]
	GOTO	PASSON
	CAMN	[SIXBIT/T3/]
	GOTO	PASSON
	RFAIL	INVALID DEBUG COMPONENT
PASSON:	; PASS THE CODE TO IC2 IN ASPECIAL BLOCK IF THERE IS ONE
	; THERE ISN'T
	RETURN
ODDB:	RFAIL NO DEBUG CODES FOR OD
ORDB:	RFAIL NO DEBUG CODES FOR OR
COMMENT;
PURPOSE:	INTERPRET DEBUG CODES FOR CA

FUNCTION:	CA DEBUG CODES:
		0	NONE
		1	DUMP DECLARATION STACK
		2	DUMP DICTIONARY
		3	DUMP REDECLARATION STACK
		4	DUMP BLOCK STACK
		5	TRACE DISPLAY AND UNDISPLAY
;
CADBB:	JUMPE	X1,[RETURN]
	IF	CAIE	X1,1
		GOTO	FALSE
	THEN	; DECLARATION STACK DUMP
		EXEC	DBDS
	ELSE
	IF	CAIE	X1,2
		GOTO	FALSE
	THEN	; DICTIONARY DUMP
		EXEC	DBDD
	ELSE
	IF	CAIE	X1,3
		GOTO	FALSE
	THEN	; REDECLARATION STACK DUMP
		EXEC	DBDR
	ELSE	; BLOCK STACK DUMP
	IF	CAIE	X1,4
		GOTO	FALSE
	THEN
		EXEC	DBDB
	ELSE
		SETON	SCADB5
	FI
	FI FI	FI
	RETURN
COMMENT;
PURPOSE:	INTERPRET DEBUG CODES FOR M2 COMPONENT

FUNCTION:	M2 DEBUG CODES:
		0	RESET SWITCHES, STOP TRACE
		1	START TRACE
		2	ABORT WITH DUMP
		3	SET SM2DB3
;
M2DB:	JUMPE	X1,[		SETZM	YM2DB
		RETURN]
	IF
		CAIE	X1,1
		GOTO	FALSE
	THEN	; START TRACING PASS 2
		SETZ	X0
		SETUWP	X0,
		RFAIL	SHARED HIGH SEGMENT WHEN TRACE REQUESTED
REPEAT 0,<		EXEC	JTRC
		SETON	SM2DB1
	>
		RETURN
	FI
	IF
		CAIE	X1,2
		GOTO	FALSE
	THEN
		FATAL	0,DEBUG REQUESTED DUMP
	FI
	IF
		CAIE	X1,3
		GOTO	FALSE
	THEN
		SETON	SM2DB3
		RETURN
	FI
	RFAIL	INVALID DEBUG CODE TO M2
	>
	END