graphical-debugging icon indicating copy to clipboard operation
graphical-debugging copied to clipboard

Add support for user linked lists without size specifier in xml

Open ariaci opened this issue 1 year ago • 0 comments

This is the second implementation not using mreader in ForEachElement - see closed pull request #67 for more ...

In some legacy C++-code linked lists are implemented without having a size-member or -field. That's why it's very difficult to display these polygons - sometimes impossible because graphical debugger doesn't know something about the number of nodes or polygons.

This commit adds support for linked lists without specifiying the Size-trait in LinkedList-node. With this modification Graphical Debugger stops iterating at last element. The last node is determined by a null-node or the initial head-element. In this way you are also able to iterate through circular linked lists.

<Ring Id="MyRing">
  <Points>
    <LinkedList>
      <Size>???????</Size>
      <HeadPointer>&amp;head</HeadPointer>
      <NextPointer>next</NextPointer>
      <Value>*this</Value>
    </LinkedList>
  </Points>
</Ring>

The above shown example using MyRing without a size member could be displayed in graphical debugger by the following code:

<Ring Id="MyRing">
  <Points>
    <LinkedList>
      <HeadPointer>&amp;head</HeadPointer>
      <NextPointer>next</NextPointer>
      <Value>*this</Value>
    </LinkedList>
  </Points>
</Ring>

ariaci avatar Jan 21 '25 08:01 ariaci