[comp.lang.asm370] Macro to dump a piece of core and the registers MVS/XA

FEATS@VTVM1.BITNET (Steve Greenfield) (12/14/89)

Under VSE there is a macro called JDUMP which is used to dump a piece of
core between two specified locations and dump the registers.  It is a
handy debugger for batch assembler programs.  Now that I'm working on
MVS/XA I have been pouring over the macro books and have not found an
equivalent.  Can anybody point me in the right direction?

Steve Greenfield
Virginia Tech Computing Center
Blacksburg, Virginia

K07@DHDURZ1.BITNET (Georg Jagoda) (12/14/89)

>Under VSE there is a macro called JDUMP which is used to dump a piece of
>core between two specified locations and dump the registers.  It is a
>handy debugger for batch assembler programs.  Now that I'm working on
>MVS/XA I have been pouring over the macro books and have not found an
>equivalent.  Can anybody point me in the right direction?
>
>Steve Greenfield
>Virginia Tech Computing Center
>Blacksburg, Virginia

Under MVS there is a macro called SNAP. I wrote a module that will dump
two areas. The two pairs of addresses are supplied by the main program:
K07SNAP  TITLE '                               K07SNAP'
K07SNAP  CSECT
         USING K07SNAP,R12
         STM   R14,R12,12(R13)    STORE CALLERS REGS
         LR    R12,R15
         LA    R2,SAVEAREA
         ST    R2,8(,R13)         PLAY THE
         ST    R13,4(,R2)          SAVEAREA GAME
         LR    R13,R2
         LA    R11,2048(R12)
         LA    R11,2048(R11)
         USING K07SNAP,R12,R11
         LR    R3,R1
         OPEN  MF=(E,OUTPUT)
         SNAP  DCB=DCB,                                                *
               LIST=(R3),                                              *
               STRHDR=STRHDR
         CLOSE (,FREE),MF=(E,OUTPUT)
         L     R13,4(,R13)        GET CALLERS SAVE AREA ADDR
         L     R14,12(,R13)       RESTORE REGS
         LM    R0,R12,20(R13)     RESTORE REGS
         BR    R14                AND RETURN
         SPACE 3
OUTPUT   OPEN  (DCB,(OUTPUT)),MF=L X'8F'
DCB      DCB   DSORG=PS,DDNAME=SYSSNAP,RECFM=VBA,MACRF=W,              *
               BLKSIZE=1632,LRECL=125
         SPACE
SAVEAREA DS    18F
STRHDR   DC    A(HDR1),X'80',AL3(HDR2)
HDR1     DC    AL1(HDR1TL)
HDR1T    DC    C'* ',6C'  XOPER  CSECT  ',C' *'
HDR1TL   EQU   *-HDR1T             MAXIMALLAENGE = 100
HDR2     DC    AL1(HDR2TL)
HDR2T    DC    C'* ',6C'  XOPER  DSECT  ',C' *'
HDR2TL   EQU   *-HDR2T             MAXIMALLAENGE = 100
         SPACE
         PRINT NOGEN
         EQUREG
         DCBD  DSORG=(PS),DEVD=(DA)
         END
Georg Jagoda, K07 at DHDURZ1 (Rechenzentrum der Universitaet Heidelberg)
Ich bin Mensch.                                 Irren bleibt menschlich.

dbc@FERRIS.CRAY.COM (Daryl Coulthart) (12/15/89)

MVS has a set of macros to use to dump registers and storage.
The main macro is snap.   It should be used in conjunction with
OPEN ... SNAP... CLOSE.  There must be a DCB to define the file, and
A JCL DD statement or a TSO allocate to define the snap file.


	OPEN (SNAP,OUTPUT)
	SNAP DBC=SNAP,id=001,pdata=(PSW,REGS),             X
	     STORAGE=(Start,end)
	CLOSE (SNAP)
NAP	DBC  DDNAME=SNAPPRT,LRECL=125,BLKSIZE=882,         X
	     DSORG=PS,MACRF=(W),RECFM=VBA

//SNAPPRT   dd sysout=X

jcallen@Encore.COM (Jerry Callen) (12/15/89)

>Under VSE there is a macro called JDUMP which is used to dump a piece of
>core between two specified locations and dump the registers.  It is a
>handy debugger for batch assembler programs.  Now that I'm working on
>MVS/XA I have been pouring over the macro books and have not found an
>equivalent.  Can anybody point me in the right direction?

Look at the SNAP macro. It is, unfortunately, somewhat cumbersome to
use; you also have to set up a DCB for the SNAP to use to write the
dump. The manuals you need are:

	Supervisor Services and Macros (for the SNAP macro)
	Data Administration Macro Reference (for DCB/OPEN/CLOSE macros)

If you are going to be doing any extensive assembler work on MVS/XA you
should get to know the TSO "TEST" command. TEST is an interactive debugger,
and it's actually pretty good (if somewhat limited). It's biggest problem
is that you can't simultaneously be debugging a program and looking at the
source code (unless you either print out the program or use a session 
manager). Ugh.

-- Jerry Callen
   jcallen@encore.encore.com

jcallen@CS.BU.EDU (Jerry Callen) (12/15/89)

>Under VSE there is a macro called JDUMP which is used to dump a piece of
>core between two specified locations and dump the registers.  It is a
>handy debugger for batch assembler programs.  Now that I'm working on
>MVS/XA I have been pouring over the macro books and have not found an
>equivalent.  Can anybody point me in the right direction?

Look at the SNAP macro. It is, unfortunately, somewhat cumbersome to
use; you also have to set up a DCB for the SNAP to use to write the
dump. The manuals you need are:

        Supervisor Services and Macros (for the SNAP macro)
        Data Administration Macro Reference (for DCB/OPEN/CLOSE macros)

If you are going to be doing any extensive assembler work on MVS/XA you
should get to know the TSO "TEST" command. TEST is an interactive debugger,
and it's actually pretty good (if somewhat limited). It's biggest problem
is that you can't simultaneously be debugging a program and looking at the
source code (unless you either print out the program or use a session
manager). Ugh.

-- Jerry Callen
   jcallen@encore.encore.com

kelly@UTS.AMDAHL.COM (Kelly Goen) (12/19/89)

In article <8912131906.AA11920@brazos.rice.edu> you write:
>Under VSE there is a macro called JDUMP which is used to dump a piece of
>core between two specified locations and dump the registers.  It is a
>handy debugger for batch assembler programs.  Now that I'm working on
>MVS/XA I have been pouring over the macro books and have not found an
>equivalent.  Can anybody point me in the right direction?
>
>Steve Greenfield
>Virginia Tech Computing Center
>Blacksburg, Virginia

 Try SNAP(MVS Sustem supervisor services and macros)

--
                                    Kelly Goen
                                    CSS Inc.

DISCLAIMER:   I Dont represent Amdahl Corp or Onsite consulting. Any statements
              ,opinions or additional data are solely my opinion and mine
 alone...

Seen in alt.sex recently   "SEX is FUN , Thats why there are so many of us!!"
My Opinion: Sex between Consenting Computers leads to Social Data Diseases!