Using Values, Symbols and Expressions

Where the debugger commands require a value, you can enter the value in decimal or hexadecimal. The default number base is decimal, but it can be changed to hexadecimal via the set base command. Hexadecimal values must be prefixed by "0x" unless the current number base is hexadecimal. For example, 257 can be entered as 0x101. Even if when the current number base is hexadecimal, numbers must start with a digit, so 0AC must be entered for the value X'AC'. When the current number base is hexadecimal, decimal values must be prefixed by "0t".

When the emulator is running at architecture level 2, all expressions are evaluated as 64-bit numbers and unsigned values up to 0xFFFFFFFFFFFFFFFF may be entered. Otherwise, all expressions are evaluated as 32-bit numbers and unsigned values up to 0xFFFFFFFF may be used.

For most commands, you can specify an expression whenever a value is required. Where the value is an address expression, the value will be anded with 0x00FFFFFF if the current addressing mode in the PSW is 24 bit or 0x7FFFFFFF if it is 31 bit. This means that it is not possible to dump storage addresses above 16 megabytes when the PSW is set for 24-bit mode or storage above 2 gigabytes when the PSW is set for 31-bit mode without first changing the addressing mode.

Expressions can include the + and - operators, register references and symbol names. Symbol names include all external symbols and any symbols in SYM records of linked object files. Expressions can be surrounded by parentheses - ( and ) - to alter the order of expression evaluation. You can also include expressions within square brackets - [ and ] - to indicate that the expression is to be used as a pointer to a 4 byte value in memory. When the emulator is running at architecture level 2, you can include expressions within curly braces - { and } - to indicate that the expression is to be used as a pointer to an 8 byte value in memory. The value within the brackets or braces is an address expression and is subject to the current addressing mode.

The general, access and control registers and the PSW address values can be referenced within expressions. You can use a single period (.) to obtain the value of the next instruction pointer from the PSW. You can also use the notation .Xnn to obtain the value of a register. In this case the X must be one of: r, a or c which represent the general, access or control registers. The nn value is the decimal number of the register, which must be a number from 0 to 15. When the emulator is running at architecture level 2, the value of the entire 64-bit general or control register is used. You can append the letter h or l to the register number to specify that only the value in the upper or lower 32-bit word of the register is to be used.

Symbol names can be entered in upper or lower case. The debugger will first attempt to locate the symbol using the name as entered. If it is not found, the debugger will attempt to locate the symbol using a case insensitive match. Unique symbols do not need to be qualified. For symbols that are not unique, you should prefix the symbol with the name of the CSECT containing the symbol, followed by a '.'. To explicitly reference a CSECT when a symbol by the same name is defined in a different control section, you should add a '.' to the end of the CSECT name. You can display information about a symbol using the show symbol command. For example: show symbol mycsect.symbol. In addition to symbols in your programs, you can create your own symbols and assign them values using the set equ command. You can list or delete user-defined symbols using the show equ and drop equ commands.

DSECTs and the symbols within them cannot be used in expressions until they have been associated with an address. You can use the set using command to establish these associations and you can list or delete them using the show using and drop using commands.

For example: dis XXX.YYY+[.r10+0x20] 10 will disassemble the next 10 instructions from the sum of the location of symbol YYY within CSECT XXX and the address constant loaded from the location specified by 32 more than the contents of general register 10. For another example: set using DFA [[0x10]+0x4C0] will associate the DFA DSECT with the proper address word loaded from the z/OS CVT.


Frames No Frames Previous Next Contents
Introduction Setup Programs Files Running Testing Compatibility Customization Messages Codes

© Copyright 1998-2002, Tachyon Software® LLC.
Last modified on May 12, 2002