If you try to leave the debug environment with the wrong subcommand you
receive the message:
INCORRECT DEBUG EXIT and you have to enter the proper USING SYMBOLS WITH DEBUG To simplify the process of debugging in the CMS debug environment, you
can use the ORIGIN and DEFINE subcommands. The ORIGIN command allows
you to set an instruction location to serve as the base for all the
addresses you specify. For if you specify:
origin 20000 then, to refer to your virtual storage location 201BC, you only need to
enter:
x 1bc
By setting the DEBUG origin at your program's base address, you can
refer to locations in your program by the virtual storage numbers in the
listing, rather than having to compute the actual virtual storage
address each time. The current DEBUG origin stays in effect until you
set it to a different value or until you reload CMS (with the IPL command) You can use the DEFINE subcommand to assign symbolic names to storage
locations so that you can reference those locations by symbol, rather
than by storage address. For example, suppose that during a DEBUG session you will repeatedly be examining three particular storage
locations labeled in your program NAME1, NAME2, and They are at
locations 20EFO, 20EFA, and 20F04. Enter:
load nameprog
debug
origin 20000 define name1
define name2
define name3
break
return
start
1 a04 EFO 10 EFA 10 F04 10 When the specified breakpoint is encountered, you can examine these
storage areas by entering:
x namel x name2
x name3 You can also refer to these symbols by name when you use the STORE subcommand:
store name2 c4c5c3c5c1e4e5d6c9d9
The names you specify do not have to be the same as the labels in the
program; you can define any name up to eight characters.
Figure 17 summarizes the DEBUG subcommands.
214 IBM VM/370 CMS User's Guide
Subcomaand Format
BReak id {SymbOl} hexloc CAW CSW r ,
DEFine symbol hexloc Ibytecountl I I L .J
Function IStops progra. execution at the Ispecified breakpoint. IDisplays the contents of the Ichannel address word. IDisplays the contents of the Ichannel status word. IAssigns a symbolic name to the Ivirtual storage address. I I r r , , IDumps the contents of specified DUmp Isymbol1 Isymbol21 [ident] I Ivirtual storage locations to the Ihexloc1 Ihexloc21 I Ivirtual spooled printer. I .Q I * I I I L L 11.J .JI r , GO Isymboll Ihexlocl L .J GPR reg1 [reg2]
HI r , ORigin Isymboll Ihexlocl I Q I L .J PSi RETurn
SET {CAi hexinfo } CSi hexinfo [hexinfo] PSi hexinfo [hexinfo] GPR reg hexinfo [hexinfo]
STore {symbol} hexinfo [hexinfo]
{hexloc} r , X symbol I n I L .J r ,
hexloc I n I I I L .J IReturns control to your program land starts execution at the Ispecified location. I IDisplays the contents of the Ispecified general registers. IHalts execution and returns to Ithe CftS command environment. ISpecifies the base address to be
ladded to locations specified in
lother DEBUG subcommands. I I IDisplays the contents of the old Iprogram status word.
!Exits from debug environment to Ithe CMS command environment. IChanges the contents of specified Icontrol words or registers. I I IStores up to 12 bytes of informa­ Ition starting at the specified Ivirtual storage location. IExamines virtual storage
Ilocations. I I I I I I Figure 17. Summary of DEBUG Subcommands
Section 11. How VM/370 Can Help You Debug Your Programs 215
Previous Page Next Page