I have started using the memory map function in the memory view of the
debugger.



I have two data structures



D RList DS Qualified
D based(CurrentRList)
D Type 10a
D Storage *
D FreeIndexes *
D ElementSize 10u 0
D ElementDestructor...
D * procptr
D NextIteratorIndex...
D 10U 0



And



D Array DS Qualified
D based(CurrentArray)
D Type 10a
D ElementSize 10U 0
D CurrentNumberOfElements...
D 10U 0
D CurrentMax 10u 0
D GrowthAmount 10u 0
D InitialAmount 10u 0
D IsSorted N
D CompareMethod * ProcPtr
D FindMethod * ProcPtr
D ElementDestructor...
D * ProcPtr
D Storage *
D NextIteratorIndex...
D 10U 0



The storage sub field in the RList DS points to a structure of type Array.



I have modelled the above two DS in the following two map XML files
respectively



<?xml version="1.0"?>
<!DOCTYPE LAYOUT SYSTEM "Layout.dtd" >
<LAYOUT Header="RLIST" length="84">
<FIELD Header="Type" Type="EBCDIC" length="10" />
<FIELD Header="" Type="PADDING" length="6" />
<FIELD Header="Storage" Type="MAP" length="16" layout =
"ARRAY.xml"/>
<FIELD Header="FreeIndexes" Type="HEX" length="16" />
<FIELD Header="ElementSize" Type="32_BIT_UINT" length="4" />
<FIELD Header="" Type="PADDING" length="12" />
<FIELD Header="Destructor" Type="HEX" length="16" />
<FIELD Header="NextIter" Type="32_BIT_UINT" length="4" />

</LAYOUT>





<?xml version="1.0"?>
<!DOCTYPE LAYOUT SYSTEM "Layout.dtd" >
<LAYOUT Header = "ARRAY" length="100">
<FIELD Header = "Type" Type = "EBCDIC" length = "10"/>
<FIELD Header = "ElementSize" Type = "32_BIT_UINT" length = "4" />
<FIELD Header = "CurrentNumberOfElements" Type = "32_BIT_UINT" length =
"4" />
<FIELD Header = "CurrentMax" Type = "32_BIT_UINT" length = "4" />
<FIELD Header = "GrowthAmount" Type = "32_BIT_UINT" length = "4" />
<FIELD Header = "InitialAmount" Type = "32_BIT_UINT" length = "4" />
<FIELD Header = "IsSorted" Type = "HEX" length = "1" />
<FIELD Header = "" Type="PADDING" length = "1" />
<FIELD Header = "CompareMethod" Type = "HEX" length = "16" />
<FIELD Header = "FindMethod" Type = "HEX" length = "16" />
<FIELD Header = "ElementDestructor" Type = "HEX" length = "16" />
<FIELD Header = "Storage" Type = "HEX" length = "16" />
<FIELD Header = "NextIter" Type = "32_BIT_UINT" length = "4" />
</LAYOUT>



When I stop in debug and do a monitor memory on a pointer pointing to RLIST
and choose the RLIST map XML file all of the fields are correct except the
storage one, which shows the ARRAY structure as I would expect but has
????????? for all of the sub fields.



Has anybody got a working example of the memory maps working with pointers
and RPGLE datastructures?



There's not much out there is google land, the best I could find was.



http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.
ibm.debug.memorymap.doc/tasks/tbmismrv.htm



which seems to be some kind of z/OS reference.



Here's hoping someone knows how this works J



Neill


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.