Debugger : Resolving Name Ambiguity : Referencing Records and Unions in the Rational Statemate Debugger (Pdb)

Referencing Records and Unions in the Rational Statemate Debugger (Pdb)

User-Defined Types can be referenced in generated code debug using the standard form of naming conventions described earlier in this section. Use of partial names is allowed. For example, if an array of 20 invoices was defined, where invoice is a record, the command:

SHOW data INVOICE(0..2)
 
 

might produce the output

(array of INVOICE_TYPE) USAGE_TEST:INVOICE(0) .NAME = ’Fred B’
.ITEM = ’Biscuit’
.AMOUNT = 2.45
(1) .NAME = ’Joe M’
.ITEM = ’Milk’
.AMOUNT = 0.69
(2) .NAME = ’Jim M’
.ITEM = ’Toothpaste’
.AMOUNT = 1.55
 

and the command:

SHOW data INVOICE(0).NAME

 

might produce the result

(array of INVOICE_TYPE) USAGE_TEST:INVOICE(0).NAME = ’Fred B’
 

Union structures are displayed in the same way, but fields that are not current may show unusual values. It is only the field that had its value assigned most recently that shows a valid result.

The command interface has been extended to allow types to be shown, so using the previous example, the command...

SHOW TYPE INVOICE
 
 

would give the result:

USAGE_TEST:INVOICE is array (0..19) of Record
INVOICE_TYPE
end of record

 

 

and the command...

LIST TYPE INVOICE_TYPE

 

 

will give the result:

INVOICE_TYPE record
NAME is string(80)
ITEM is string(80)
AMOUNT is real
end of record