/sys$common/syshlp/DBG$HELP.HLB  —  DEBUG  DEPOSIT
    Changes the value of a program variable. More generally, deposits
    a new value at the location denoted by an address expression.

    Format

      DEPOSIT  address-expression = language-expression

1  –  Parameters

 address-expression

    Specifies the location into which the value of the language
    expression is to be deposited. With high-level languages, this
    is typically the name of a variable and can include a path name
    to specify the variable uniquely. More generally, an address
    expression can also be a memory address or a register and can
    be composed of numbers (offsets) and symbols, as well as one or
    more operators, operands, or delimiters. For information about
    the debugger symbols for the registers and about the operators
    you can use in address expressions, see the Built_in_Symbols and
    Address_Expressions help topics.

    You cannot specify an entire aggregate variable (a composite data
    structure such as an array or a record). To specify an individual
    array element or a record component, follow the syntax of the
    current language.

 language-expression

    Specifies the value to be deposited. You can specify any language
    expression that is valid in the current language. For most
    languages, the expression can include the names of simple
    (noncomposite, single-valued) variables but not the names
    of aggregate variables (such as arrays or records). If the
    expression contains symbols with different compiler-generated
    types, the debugger uses the rules of the current language to
    evaluate the expression.

    If the expression is an ASCII string or an assembly-language
    instruction, you must enclose it in quotation marks (")  or
    apostrophes ('). If the string contains quotation marks or
    apostrophes, use the other delimiter to enclose the string.

    If the string has more characters (1-byte ASCII) than can fit
    into the program location denoted by the address expression,
    the debugger truncates the extra characters from the right. If
    the string has fewer characters, the debugger pads the remaining
    characters to the right of the string by inserting ASCII space
    characters.

2  –  Qualifiers

2.1    /ASCIC

       /ASCIC
       /AC

    Deposits a counted ASCII string into the specified location. You
    must specify a quoted string on the right-hand side of the equal
    sign. The deposited string is preceded by a 1-byte count field
    that gives the length of the string.

2.2    /ASCID

       /ASCID
       /AD

    Deposits an ASCII string into the address given by a string
    descriptor that is at the specified location. You must specify
    a quoted string on the right-hand side of the equal sign. The
    specified location must contain a string descriptor. If the
    string lengths do not match, the string is either truncated on
    the right or padded with space characters on the right.

2.3    /ASCII

       /ASCII:n

    Deposits n bytes of an ASCII string into the specified location.
    You must specify a quoted string on the right-hand side of the
    equal sign. If its length is not n, the string is truncated or
    padded with space characters on the right. If you omit n, the
    actual length of the data item at the specified location is used.

2.4    /ASCIW

       /ASCIW
       /AW

    Deposits a counted ASCII string into the specified location. You
    must specify a quoted string on the right-hand side of the equal
    sign. The deposited string is preceded by a 2-byte count field
    that gives the length of the string.

2.5    /ASCIZ

       /ASCIZ
       /AZ

    Deposits a zero-terminated ASCII string into the specified
    location. You must specify a quoted string on the right-hand
    side of the equal sign. The deposited string is terminated by a
    zero byte that indicates the end of the string.

2.6    /BYTE

    Deposits a 1-byte integer into the specified location.

2.7    /D_FLOAT

    Converts the expression on the right-hand side of the equal sign
    to the D_floating type (length 8 bytes) and deposits the result
    into the specified location.

2.8    /DATE_TIME

    Converts a string representing a date and time (for example,
    21-DEC-1988 21:08:47.15) to the internal format for date and
    time and deposits that value (length 8 bytes) into the specified
    location. Specify an absolute date and time in the following
    format:

    [dd-mmm-yyyy[:]] [hh:mm:ss.cc]

2.9    /EXTENDED_FLOAT

       /EXTENDED_FLOAT
       /X_FLOAT

    (Alpha only) Converts the expression on the right-hand side of
    the equal sign to the IEEE X_floating type (length 16 bytes) and
    deposits the result into the specified location.

2.10    /FLOAT

    On Alpha processors, converts the expression on the right-hand
    side of the equal sign to the IEEE T_floating type (double
    precision, length 8 bytes) and deposits the result into the
    specified location.

2.11    /G_FLOAT

    Converts the expression on the right-hand side of the equal sign
    to the G_floating type (length 8 bytes) and deposits the result
    into the specified location.

2.12    /LONG_FLOAT

       /LONG_FLOAT
       /S_FLOAT

    (Alpha and Integrity servers only) Converts the expression on
    the right-hand side of the equal sign to the IEEE S_floating type
    (single precision, length 4 bytes) and deposits the result into
    the specified location.

2.13    /LONG_LONG_FLOAT

    (Alpha and Integrity servers only) Converts the expression on
    the right-hand side of the equal sign to the IEEE T_floating type
    (double precision, length 8 bytes) and deposits the result into
    the specified location.

2.14    /LONGWORD

    Deposits a longword integer (length 4 bytes) into the specified
    location.

2.15    /OCTAWORD

    Deposits an octaword integer (length 16 bytes) into the specified
    location.

2.16    /PACKED

       /PACKED:n

    Converts the expression on the right-hand side of the equal sign
    to a packed decimal representation and deposits the resulting
    value into the specified location. The value of n is the number
    of decimal digits. Each digit occupies one nibble (4 bits).

2.17    /QUADWORD

    Deposits a quadword integer (length 8 bytes) into the specified
    location.

2.18    /TASK

    Applies to tasking (multithread) programs. Deposits a task value
    (a task name or a task ID such as %TASK 3) into the specified
    location. The deposited value must be a valid task value.

2.19    /TYPE

       /TYPE=(name)

    Converts the expression to be deposited to the type denoted by
    name (which must be the name of a variable or data type declared
    in the program), then deposits the resulting value into the
    specified location. This enables you to specify a user-declared
    type. You must use parentheses around the type expression.

2.20    /WCHAR_T

       /WCHAR_T[:n]

    Deposits up to n longwords (n characters) of a converted
    multibyte file code sequence into the specified location. The
    default is 1 longword. You must specify a string on the right-
    hand side of the equal sign.

    When converting the specified string, the debugger uses the
    locale database of the process in which the debugger runs. The
    default is C locale.

2.21    /WORD

    Deposits a word integer (length 2 bytes) into the specified
    location.

3  –  Description

    You can use the DEPOSIT command to change the contents of any
    memory location or register that is accessible in your program.
    For high-level languages the command is used mostly to change the
    value of a variable (an integer, real, string, array, record, and
    so on).

    The DEPOSIT command is like an assignment statement in most
    programming languages. The value of the expression specified to
    the right of the equal sign is assigned to the variable or other
    location specified to the left of the equal sign. For Ada and
    Pascal, you can use ":=" instead of "=" in the command syntax.

    The debugger recognizes the compiler-generated types associated
    with symbolic address expressions (symbolic names declared in
    your program). Symbolic address expressions include the following
    entities:

    o  Variable names. When specifying a variable with the DEPOSIT
       command, use the same syntax that is used in the source code.

    o  Routine names, labels, and line numbers.

    In general, when you enter a DEPOSIT command, the debugger takes
    the following actions:

    o  It evaluates the address expression specified to the left of
       the equal sign, to yield a program location.

    o  If the program location has a symbolic name, the debugger
       associates the location with the symbol's compiler-generated
       type. If the location does not have a symbolic name (and,
       therefore, no associated compiler-generated type) the debugger
       associates the location with the type longword integer by
       default. This means that, by default, you can deposit integer
       values that do not exceed 4 bytes into these locations.

    o  It evaluates the language expression specified to the right of
       the equal sign, in the syntax of the current language and in
       the current radix, to yield a value. The current language is
       the language last established with the SET LANGUAGE command.
       By default, if you did not enter a SET LANGUAGE command, the
       current language is the language of the module containing the
       main program.

    o  It checks that the value and type of the language expression
       is consistent with the type of the address expression. If
       you try to deposit a value that is incompatible with the type
       of the address expression, the debugger issues a diagnostic
       message. If the value is compatible, the debugger deposits the
       value into the location denoted by the address expression.

4  –  Description, Continued...

    The debugger might do type conversion during a deposit operation
    if the language rules allow it. For example, a real value
    specified to the right of the equal sign might be converted to
    an integer value if it is being deposited into a location with
    an integer type. In general, the debugger tries to follow the
    assignment rules for the current language.

    There are several ways of changing the type associated with a
    program location so that you can deposit data of a different type
    into that location:

    o  To change the default type for all locations that do not have
       a symbolic name, you can specify a new type with the SET TYPE
       command.

    o  To change the default type for all locations (both those that
       do and do not have a symbolic name), you can specify a new
       type with the SET TYPE/OVERRIDE command.

    o  To override the type currently associated with a particular
       location for the duration of a single DEPOSIT command, you
       can specify a new type by using a qualifier (/ASCII:n, /BYTE,
       /TYPE=(name), and so on).

    When debugging a C program, or a program in any case-specific
    language, you cannot use the DEPOSIT/TYPE command if the type
    specified is a mixed or lowercase name. For example, suppose the
    program has a function like the following:

    xyzzy_type foo ()
    {
    xyzzy_type     z;
    z = get_z ();
    return (z);
    }

    If you try to enter the following command, the debugger issues a
    message that it cannot find the type "xyzzy_type":

    DBG> DEPOSIT/TYPE=(xyzzy_type) z="whatever"

    The debugger can interpret and display integer data in any one of
    four radixes: binary, decimal, hexadecimal, and octal.

    The default radix for both data entry and display is decimal for
    most languages. The exceptions are BLISS and MACRO, which have a
    default radix of hexadecimal.

    You can use the SET RADIX and SET RADIX/OVERRIDE commands to
    change the default radix.

    The DEPOSIT command sets the current entity built-in symbols
    %CURLOC and period (.)  to the location denoted by the address
    expression specified. Logical predecessors (%PREVLOC or the
    circumflex character (^))  and successors (%NEXTLOC) are based
    on the value of the current entity.

    Related commands:

       CANCEL TYPE/OVERRIDE
       EVALUATE
       EXAMINE
       MONITOR
       (SET,SHOW,CANCEL) RADIX
       (SET,SHOW) TYPE

5  –  Examples

    1.DBG> DEPOSIT I = 7

      This command deposits the value 7 into the integer variable I.

    2.DBG> DEPOSIT WIDTH = CURRENT_WIDTH + 24.80

      This command deposits the value of the expression CURRENT_WIDTH
      + 24.80 into the real variable WIDTH.

    3.DBG> DEPOSIT STATUS = FALSE

      This command deposits the value FALSE into the Boolean variable
      STATUS.

    4.DBG> DEPOSIT PART_NUMBER = "WG-7619.3-84"

      This command deposits the string WG-7619.3-84 into the string
      variable PART_NUMBER.

    5.DBG> DEPOSIT EMPLOYEE.ZIPCODE = 02172

      This command deposits the value 02172 into component ZIPCODE of
      record EMPLOYEE.

    6.DBG> DEPOSIT ARR(8) = 35
      DBG> DEPOSIT ^ = 14

      In this example, the first DEPOSIT command deposits the value
      35 into element 8 of array ARR. As a result, element 8 becomes
      the current entity. The second command deposits the value 14
      into the logical predecessor of element 8, namely element 7.

    7.DBG> FOR I = 1 TO 4 DO (DEPOSIT ARR(I) = 0)

      This command deposits the value 0 into elements 1 to 4 of array
      ARR.

    8.DBG> DEPOSIT COLOR = 3
      %DEBUG-E-OPTNOTALLOW, operator "DEPOSIT" not allowed on
           given data type

      The debugger alerts you when you try to deposit data of the
      wrong type into a variable (in this case, if you try to deposit
      an integer value into an enumerated type variable). The E
      (error) message severity indicates that the debugger does not
      make the assignment.

    9.DBG> DEPOSIT VOLUME = - 100
      %DEBUG-I-IVALOUTBNDS, value assigned is out of bounds
           at or near '-'

      The debugger alerts you when you try to deposit an out-of-
      bounds value into a variable (in this case a negative value).
      The I (informational) message severity indicates that the
      debugger does make the assignment.

    10DBG> DEPOSIT/OCTAWORD BIGINT = 111222333444555

      This command deposits the expression 111222333444555 into
      location BIGINT and converts it to an octaword integer.

    11DBG> DEPOSIT/FLOAT BIGFLT = 1.11949*10**35

      This command converts 1.11949*10**35 to an F_floating type
      value and deposits it into location BIGFLT.
Close Help