HP 3000 Manuals

D (display) [ System Debug Reference Manual ] MPE/iX 5.0 Documentation


System Debug Reference Manual

D (display) 

Privileged Mode:  DA, DCS, DCA, DZ, DSEC 

Displays the contents of the specified address.

Syntax 

     DA   offset   [count] [base] [recw] [bytew]       ABS relative
     DD   dst.off  [count] [base] [recw] [bytew]       CM data segment
     DDB  offset   [count] [base] [recw] [bytew]       DB relative
     DS   offset   [count] [base] [recw] [bytew]       S relative
     DQ   offset   [count] [base] [recw] [bytew]       Q relative

     DC   logaddr  [count] [base] [recw] [bytew]       Program file
     DCG  logaddr  [count] [base] [recw] [bytew]       Group library
     DCP  logaddr  [count] [base] [recw] [bytew]       Account library
     DCLG logaddr  [count] [base] [recw] [bytew]       Logon group lib
     DCLP logaddr  [count] [base] [recw] [bytew]       Logon account lib
     DCS  logaddr  [count] [base] [recw] [bytew]       System library
     DCU  fname logaddr [count] [base] [recw] [bytew]  User library

     DCA  cmabsaddr [count] [base] [recw] [bytew]     Absolute CST
     DCAX cmabsaddr [count] [base] [recw] [bytew]     Absolute CSTX

     DV   virtaddr [count] [base] [recw] [bytew]       Virtual
     DZ   realaddr [count] [base] [recw] [bytew]       Real memory

     DSEC ldev.off [count] [base] [recw] [bytew]        Secondary store

Parameters 

offset           DA, DDB, DQ, DS only.

                 The CM word offset that specifies the relative starting
                 location of the area to be displayed.

dst.off          DD only.

                 The data segment number and CM word offset that
                 specifies the starting location of the area to be
                 displayed.

logaddr          DC, DCG, DCP, DCLG, DCLP, DCS, DCU only.

                 A full logical code address (LCPTR) specifies three
                 necessary items:

                  *  the logical code file (PROG, GRP, SYS, and so on)

                  *  NM: the virtual space ID number (SID)
                     CM: the logical segment number

                  *  NM: the virtual byte offset within the space.
                     CM: the word offset within the code segment.

                 Logical code addresses can be specified in various
                 levels of detail:

                  *  as a full logical code pointer (LCPTR)

                     DC procname+20      procedure name lookups return
                                         LCPTRs
                     DC pw+4             predefined ENV variables of type
                                         LCPTR
                     DC SYS(2.200)       explicit coercion to a LCPTR
                                         type

                  *  as a long pointer (LPTR)

                     DC 23.2644       sid.offset or seg.offset 

                     The logical file is determined based on the command
                     suffix, for example:
                       DC implies PROG
                       DCG implies GRP
                       DCS implies SYS

                  *  as a short pointer (SPTR)

                     DC 1024          offset only

                 For NM, the short pointer offset is converted to a long
                 pointer using the function STOLOG, which looks up the
                 SID of the loaded logical file.  This is different from
                 the standard short to long pointer conversion, STOL,
                 which is based on the current space registers (SRs).

                 For CM, the current executing logical segment number and
                 the current executing logical file are used to build an
                 LCPTR.

                 The search path used for procedure name lookups is based
                 on the command suffix letter:

                 DC      Full search path:
                           NM: PROG, GRP, PUB, USER(s), SYS
                           CM: PROG, GRP, PUB, LGRP, LPUB, SYS
                 DCG     Search GRP, the group library.
                 DCP     Search PUB, the account library.
                 DCLG    Search LGRP, the logon group library.
                 DCLP    Search LPUB, the logon account library.
                 DCS     Search SYS, the system library.
                 DCU     Search USER, the user library.

                 For a full description of logical code addresses, refer
                 to the section "Logical Code Addresses" in chapter 2.

fname            DCU only.

                 The file name of the NM USER library.  Since multiple NM
                 libraries can be bound with the XL= option on a RUN
                 command,

                      :run nmprog; xl=lib1,lib2.testgrp,lib3 

                 it is necessary to specify the desired NM user library.
                 For example,

                      DCU lib1 204c
                      DCU lib2.testgrp test20+1c0

                 If the file name is not fully qualified, then the
                 following defaults are used:
                   Default account:  the account of the program file.
                   Default group:  the group of the program file.

 cmabsadr        DCA, DCAX only.

                 A full CM absolute code address specifies three
                 necessary items:
                  *  Either the CST or the CSTX
                  *  The absolute code segment number
                  *  The CM word offset within the code segment.

                 Absolute code addresses can be specified in two ways:

                  *  As a long pointer (LPTR)

                     DCA  23.2644        Implicit CST 23.2644
                     DCAX 5.3204         Implicit CSTX 5.3204

                  *  As a full absolute code pointer (ACPTR)

                     DCA  CST(2.200)                 Explicit CST
                                                     coercion
                     DCAX CSTX(2.200)                Explicit CSTX'
                                                     coercion \DCAX log-
                                                     toabs(prog(1.20))\Explicit
                                                     absolute conversion

                 The search path used for procedure name lookups is based
                 on the command suffix letter:

                 DCA              GRP, PUB, LGRP, LPUB, SYS
                 DCAX             PROG

 virtaddr        DV only.  The virtual address to be displayed.

                 Virtaddr can be a short pointer, a long pointer, or a
                 full logical code pointer.

 realaddr        DZ only.

                 The real mode HP Precision Architecture memory address
                 to be displayed.

 ldev.off        DSEC only.

                 The logical device number (LDEV) and offset (in bytes)
                 of the data on disk to be displayed.

 count           DA, DC@ (CM), DD, DDB, DS, DQ: The number of CM 16-bit
                 words to be displayed.

                 DC@ (NM), DV, DZ, DSEC: The number of NM 32-bit words to
                 be displayed.  If omitted, then a single value is
                 displayed.

 base            The desired representation mode for output values:

                 % or OCTAL          Octal representation
                 # or DECIMAL        Decimal representation
                 $ or HEXADECIMAL    Hexadecimal representation
                 ASCII               ASCII representation
                 BOTH                Numeric and ASCII together
                 CODE                Disassembled code representation
                 STRING              Packed ASCII representation

                 This parameter can be abbreviated to as a single
                 character.

                 By default, and for the numeric portion of B[OTH], the
                 current output base is used.

                 Display code commands (DC@) automatically set the base
                 to CODE, unless another base is explicitly specified.

                 Note that the address portion of the display is always
                 formatted using the current output base (see ENV OUTBASE
                 and the SET command), not the specified base parameter.

 recw            The number of words to be displayed per line.  Large
                 requests may cause lines to wrap around on the terminal,
                 but may be appropriate for offline listings, based on
                 the ENV variable LIST_WIDTH.

                 By default, either 4 or 8 words will be displayed per
                 line, based on the command, count, and base.

                 When the base CODE is selected, disassembled code is
                 always displayed one word per line.

 bytew           The width in bytes of the displayed values.  Values can
                 be displayed as

                 1 byte           Single bytes (8 bits)
                 2 bytes          CM (16-bit words)
                 4 bytes          NM (32-bit words) / CM double-words

                 If omitted, values are displayed as CM words (2) or NM
                 words (4), based on the current mode (CM/NM) and the
                 specified command.

                 This parameter is ignored for display code commands
                 (DC@).

Examples 

     %cmdebug > dd 77.0 
     DST %77.0      % 000655

Display DST 77.0.  By default, one word is displayed in the current
output base, octal.

     %cmdebug > dd 77.0,20 
     DST %77.0
     %0      % 000655 000012 000000 000000 000000 000000 000000 000000
     %10     % 000000 000000 041515 023511 047111 052111 040514 020040

Display DST 77.0 for %20 words.  By default, the data is displayed in the
current output base, octal, at eight words per line.

     %cmdebug > dd 77.0,20,a 
     DST %77.0
     %0      ASCII .. .. .. .. .. .. .. ..
     %10     ASCII .. .. CM 'I NI TI AL

Display DST 77.0 for %20 words in ASCII. The two character ASCII
representations for each word are displayed, separated by blanks.  Dots
(".") are displayed for nonprintable characters.

     %cmdebug > dd 77.0,20,b 
     DST %77.0
     %0      % 000655 000012 000000 000000  .. .. .. ..
     %4      % 000000 000000 000000 000000  .. .. .. ..
     %10     % 000000 000000 041515 023511  .. .. CM 'I
     %14     % 047111 052111 040514 020040  NI TI AL

Display DST 77.0 for %20 words.  Display both numeric and ASCII data
together.  By default, four words are displayed per line.

     %cmdebug > dd 77.0,100,a,12 
     DST %77.0
     %0      ASCII .. .. .. .. .. .. .. .. .. ..
     %12     ASCII CM 'I NI TI AL        . .. ..
     %24     ASCII MI X' PA RM           . .. ..
     %36     ASCII LO AD                 . .. ..
     %50     ASCII GE TS IR              . .. ..
     %62     ASCII RE LS IR              . .. ..
     %74     ASCII FR EE 'P RI

Display DST 77.0, for %100 words, in ASCII, in a width of %12 words per
line.

     %cmdebug > dd 77.0,100,s,12 
     DST %77.0      "...................."
     DST %77.12     "CM'INITIAL     ....."
     DST %77.24     "MIX'PARM       ....."
     DST %77.36     "LOAD           ....."
     DST %77.50     "GETSIR         ....."
     DST %77.62     "RELSIR         ....."
     DST %77.74     "FREE'PRI"

Display DST 77.0 for %100 words, as a string, in a width of %12 CM words
= #10 CM words = 20 characters per line.

     %cmdebug > dd 77.0,20,h,6,1 
     DST %77.0
     %0      $ 01 ad 00 0a 00 00 00 00 00 00 00 00
     %6      $ 00 00 00 00 00 00 00 00 43 4d 27 49
     %14     $ 4e 49 54 49 41 4c 20 20

     %cmdebug > dd 77.0,20,h,6,2 
     DST %77.0
     %0      $ 01ad 000a 0000 0000 0000 0000
     %6      $ 0000 0000 0000 0000 434d 2749
     %14     $ 4e49 5449 414c 2020

     %cmdebug > dd 77.0,20,h,6,4 
     DST %77.0
     %0      $ 01ad000a 00000000 00000000 00000000 00000000 434d2749
     %14     $ 4e495449 414c2020 20202000 930c0000 4d495827 5041524d
     %30     $ 20202020 20202000 00000000 4c4f4144

Display DST 77.0, for 20 words, in hexadecimal.

Display the data as bytes (1), CM 16-bit words (2), and NM 32-bit words
(4).

Note that the offset addresses are displayed in octal (the current output
base), while the data is displayed in hexadecimal, as requested.

     $nmdebug > dsec 1.0,4,a 
     SEC $1.0        ASCII ..HP ESYS ..]@ ....

Display secondary storage at the disk address 1.0 (LDEV=1, byteoffset=0).
Display four words in ASCII. This example displays a portion of the
volume label.

     %cmdebug > da %1114,3,a 
     ABS+%1114   ASCII 82 04  9

     %cmdebug > da %1474,3,a 
     ABS+%1474   ASCII  9 82 04

Two examples that display CM ABS relative.  Both examples display three
words in ASCII.

ABS is CM Bank 0 low core memory.  CM SYSGLOB starts at ABS+%1000.

The first example displays the SEL release ID in the form:  uu ff vv.

The second example displays the MPE XL system version ID in the form:  vv 
uu ff.

     $nmdat > wl pc 
     SYS $a.728304
     $nmdat > wl vtor(pc) 
     $c18304
     $nmdat > dz tr0+((vtor(pc)>>$b)*$10),4 
     REAL $00603500 $ 80000000 0000000a 00728000 02400000

The logical code address of PC is SYS $a.728304, which translates to real
memory address c18304.

This example displays the 4-word PDIR entry in real memory for the page
that contains PC.

Display real memory (DZ) at the address TR0 (start of PDIR) plus the
offset to entry, which is calculated by right-shifting the real address
of PC by $b (to determine page number), and then multiplying by $10 since
each 4-word PDIR entry is $10=#16 bytes long.

Examples of Code Displays 

     $nmdebug > dcs sendio+18,7 
     SYS $a.219f08
     00219f08  sendio+$18  6bd83d69  STW      24,-332(0,30)
     00219f0c  sendio+$1c  4bda3d51  LDW      -344(0,30),26
     00219f10  sendio+$20  081a0241  OR       26,0,1
     00219f14  sendio+$24  081e025f  OR       30,0,31
     00219f18  sendio+$28  34180050  LDO      40(0),24
     00219f1c  sendio+$2c  ebfe174d  BL       ?ldm_completion+$1e4,31
     00219f20  sendio+$30  37d93dc1  LDO      -288(30),25

Display code in the NM system library, starting at sendio+18, for seven
words.  By default, the display code commands use the CODE radix and
display formatted lines of disassembled code.

     $nmdebug > dcs sendio+18,7,h 
     SYS $a.219f08   $ 6bd83d69 4bda3d51 081a0241 081e025f
     SYS $a.219f18   $ 34180050 ebfe174d 37d93dc1

Display code in the system library, starting at sendio+18, for seven
words in hexadecimal.  By default, four words are displayed per line.

     %cmdebug > dcs lsearch+11,10 
     SYS %12.20262
     %020262:  LSEARCH+%11             051401  S.  STOR  Q+1
     %020263:  LSEARCH+%12             000600  ..  ZERO, NOP
     %020264:  LSEARCH+%13             151607  ..  LDD   Q-7
     %020265:  LSEARCH+%14             041605  C.  LOAD  Q-5
     %020266:  LSEARCH+%15             041604  C.  LOAD  Q-4
     %020267:  LSEARCH+%16             031105  2E  PCAL ?LSEARCH'
     %020270:  LSEARCH+%17             013712  ..  BRE   P+%12
     %020271:  LSEARCH+%20             031107  2G  PCAL ?TRANS'XDST'TO'L

Display code starting at lsearch+11, for %10 words.  The procedure is
located in the CM system library, SL.PUB.SYS.

Listing Disassembled Code to a File 

The following example demonstrates how to dump disassembled code into a
file.  The example is explained command by command, based on the command
numbers that appear within the prompt lines.

Command %10 opens an offline list file with the name codedump.  All Debug
input and output is recorded into this file, including the code we intend
to display.

Command %11 sets the environment variable term_loud to FALSE. This
prevents subsequent Debug output from being displayed on the terminal.
We capture the output in the list file (codedump), but we do not want the
output on the terminal.

Command %12 contains the desired display code command.  We display %20
words of disassembled code, starting at the entry point address ?fopen.

Command %13 closes (and saves) the current list file (codedump).

Command %14 uses the SET DEFAULT command to effectively reset the
environment variable term_loud back to TRUE. Debug output once again is
displayed on the terminal.

Command %15 issues an MPE XL CI command PRINT CODEDUMP to display the
newly created list file with the disassembled code.  Note the additional
Debug commands that were captured in the list file.

     %10 (%53) cmdebug > list codedump 
     %11 (%53) cmdebug > env term_loud false 
     %12 (%53) cmdebug > dc ?fopen,20 
     %13 (%53) cmdebug > list close 
     %14 (%53) cmdebug > set def 
     %15 (%53) cmdebug > :print codedump 

     Page: 1     DEBUG/XL A.01.00    WED, FEB 23, 1987  11:42 AM

     %11 (%53) cmdebug > env term_loud false
     %12 (%53) cmdebug > dc ?fopen,20
     SYS %22.5000
     %005000:  ?FOPEN                   170404  ..  LRA   P-4
     %005001:  FOPEN+%5                 030400  1.  SCAL  0
     %005002:  FOPEN+%6                 000600  ..  ZERO, NOP
     %005003:  FOPEN+%7                 051451  S)  STOR  Q+%51
     %005004:  FOPEN+%10                140060  .0  BR    P+%60
     %005005:  FOPEN+%11                140003  ..  BR    P+3
     %005006:  ?FSOPEN                  170412  ..  LRA   P-%12
     %005007:  FOPEN+%13                030400  1.  SCAL  0
     %005010:  FOPEN+%14                021001  ".  LDI   1
     %005011:  FOPEN+%15                051451  S)  STOR  Q+%51
     %005012:  FOPEN+%16                140052  .*  BR    P+%52
     %005013:  FOPEN+%17                140003  ..  BR    P+3
     %005014:  ?FJOPEN                  170420  ..  LRA   P-%20
     %005015:  FOPEN+%21                030400  1.  SCAL  0
     %005016:  FOPEN+%22                021002  ".  LDI   2
     %005017:  FOPEN+%23                051451  S)  STOR  Q+%51
     %13 (%53) cmdebug > list close

Limitations, Restrictions 

none


CAUTION The output format of all System Debug commands is subject to change without notice. Programs that are developed to postprocess System Debug output should not depend on the exact format (spacing, alignment, number of lines, uppercase or lowercase, or spelling) of any System Debug command output.


MPE/iX 5.0 Documentation