Skip to content

Conversation

@ariaci
Copy link

@ariaci ariaci commented Jan 21, 2025

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>

…rating lists will end with defined head-element or nullptr-element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants