Library /sys$common/syshlp/dbg$help.hlb
DEBUG, Language Support, CC, Character Strings

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Character strings are implemented in C as null-terminated ASCII
    strings (ASCIZ strings). To examine and deposit data in an entire
    string, use the /ASCIZ (or /AZ) qualifier so that the debugger
    can interpret the end of the string properly. You can examine
    and deposit individual characters in the string using the C
    array subscripting operators ([ ]). When you examine and deposit
    individual characters, use the /ASCII qualifier.

    Assume the following declarations and assignments:

    static char *s = "vaxie";
    static char **t = &s;

    The EXAMINE/AZ command displays the contents of the character
    string pointed to by *s and **t:

    DBG> EXAMINE/AZ  *s
    *STRING\main\s: "vaxie"
    DBG> EXAMINE/AZ  **t
    **STRING\main\t:        "vaxie"

    The DEPOSIT/AZ command deposits a new ASCIZ string in the
    variable pointed to by *s. The EXAMINE/AZ command displays the
    new contents of the string:

    DBG> DEPOSIT/AZ  *s = "DEC C"
    DBG> EXAMINE/AZ  *s,  **t
    *STRING\main\s: "DEC C"
    **STRING\main\t:         "DEC C"

    You can use array subscripting to examine individual characters
    in the string and deposit new ASCII values at specific locations
    within the string. When accessing individual members of a string,
    use the /ASCII qualifier. A subsequent EXAMINE/AZ command shows
    the entire string containing the deposited value:

    DBG> EXAMINE/ASCII s[3]
    [3]:    " "
    DBG> DEPOSIT/ASCII s[3] = "-"
    DBG> EXAMINE/AZ *s, **t
    *STRING\main\s:    "VAX-C"
    **STRING\main\t:   "VAX-C"
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.