Event Recorder  Version 1.0.0
MDK Debugger Views for Status and Event Information
 All Files Functions Macros Groups Pages
/component_viewer/objects/object/.../readlist

Creates a list of structured elements from memory that can be used in Expressions or out elements. The list of structured elements may contain temporary variables. The maximum number of list items is limited to 1024.

<readlist> is able to read:

  • number of scalar items; count specifies the number of items
  • number of structured elements; count specifies the number of elements
  • linked list of structured elements; next specifies the link pointer address

<readlist> can be used sequentially (multiple times) to add structured elements to a list. When <readlist> is used in a nested loop, then set init="1" to clear the list from the data collected on the previous iteration.

Depending on based, <readlist> uses symbol or offset to specify the:

  • memory address (based="0") of structured elements.
    When count is specified, then count items of the specified type are read from consecutive memory addresses.
  • pointer (based="1") to structure elements.
    First read the address value from the target. If address is not NULL, then use that address to read the item from memory.
    When count is specified, a temporary read of count addresses is executed first, then for each non-zero address, read the item from memory as specified by the type (max. items is 1024).

<readlist> manages two member variables with the following names:

  • name._count — number of list elements (0 .. n-1)
  • name[index]._addr — memory address of list item
Todo:
add example Example
 
Parent Element Element Chain
object /component_viewer/objects/object
list /component_viewer/objects/object/.../list
Attributes Description Type Use
name Name of variable for usage in Expressions. xs:string required
type Can be the following: xs:string required
count Number of items to read. Can be scalar or structured items or a liked list of structured elements. The maximum number of list items is limited to 1024. Default value is 1. xs:string optional
next Linked list pointer to next structure. <readlist> stops on NULL pointer. The maximum number of list items is limited to 1024. xs:string optional
symbol Symbol name obtained from target image used to calculate an address. xs:string optional
offset Offset to the symbol address. In case symbol is not specified, then it is the offset to the memory address. Default value is 0. xs:string optional
const When const is set to 1 then memory is read only once after debugger start. Default value is 0. xs:int optional
info Descriptive text with additional information (comment). xs:string optional
cond Conditional execution: element is executed when expression result is not 0. Default value is 1. xs:string optional
init If init is set to 1, then reset list and read new elements. If init is set to 0, then add elements to existing list. Default value is 0. xs:boolean optional
based If based is set to 1, then symbol and offset specifies a pointer (or pointer array) to a structure. If based is set to 0, then symbol and offset specifies the address of a structure. Default value is 0. xs:boolean optional
while When evaluated to 0, it terminates the reading of structured elements. Default value is 1. xs:string optional