[mod.computers.vax] Mixed Language Debugging

msr@bunker.UUCP (11/13/86)

Did anybody out there ever use the debugger with 2 languages ?  In my case,
I'm running mainly 'C' code with several Macro subroutines.  The C stuff works
just fine.  I've tried everything I can think of to step through the macro 
junk and correlate it with the source, but no can do.  Any pointers would be 
appreciated.  By the way, this is under VMS 4.4.

					Thanks in advance.

Mike Romaniw - Bunker Ramo/Olivetti, Trumbull CT - (203)386-2564 
uucp address: ...decvax!ittatc!bunker!msr

LEICHTER-JERRY@YALE.ARPA (11/15/86)

In-Reply-To: decvax!bunker!msr@ucbvax.Berkeley.EDU, Wed, 12 Nov 86 17:37:10 est

    Did anybody out there ever use the debugger with 2 languages?  In my
    case, I'm running mainly 'C' code with several Macro subroutines.  The C
    stuff works just fine.  I've tried everything I can think of to step
    through the macro junk and correlate it with the source, but no can do.
    Any pointers would be appreciated.  By the way, this is under VMS 4.4.
I do this all the time - using exactly the configuration you describe:  C plus
a couple of MACRO support routines.

	a)  MACRO does not provide source-debugging support (at present?).
		There is no way to have the debugger refer back to the
		original source, as it does for C source.

	b)  Nevertheless, you can get PART of the way there - usually enough -
		using the debugger's ability to disassemble code.  Your
		comments won't be there, of course, but it's usually not
		hard to correlate a listing with the actual code.  (Of course,
		if you use a LOT of macros....)

		When you are debugging MACRO code, you will want to set the
		language to MACRO.  This will also SET STEP INSTRUCTION, so
		that you will be walking through the code an instruction at
		a time, rather than a line at a time (since there are no
		"lines".)  Then the only thing missing is the ability to
		see the code.  That's easy:  Do a DISPLAY INST AT H1, and
		the INST(ruction) display will replace the SRC (source)
		display at the top half of the screen.  (DISPLAY SRC will
		bring it back.)  (Note:  GOLD 7 puts INST AT H1, OUT AT H2;
		BLUE MINUS puts SRC AT H1, OUT AT H2.  The REG(ister) display
		is also useful for MACRO debugging; a simple way to get it
		on screen is BLUE 7, which puts it a Q3 and OUT at Q4, split-
		ting the bottom half window.)  With experience, you'll no
		doubt find the configuration that works best for you.

							-- Jerry
-------