How do I interpret the pointer reference graph in the list file generated by the XC8 compiler?

The MPLAB® XC8 compiler's pointer reference graph is generated in the list file that is generated for the project after a successful build. This graph shows every pointer in the program, along with each target the pointer references.

For a code as:

This is the pointer reference graph generated in the list file:

Pointer List with Targets:
    main@stobj    PTR struct st size(1) Largest target is 3
         -> main@obj(COMRAM[3]), 

    val    PTR FTN(int ,int ,)int [4] size(3) Largest target is 2
         -> foo(),

main@stobj    PTR struct st size(1) Largest target is 3
         -> main@obj(COMRAM[3]),

This indicates that stobj is local to function main. stobj is a pointer to a struct st, and it is one byte wide. This target variable resides in the COMRAM class and is three bytes wide.

The top line shows the pointer’s name and type. The size of the pointer is also indicated. Remember that this size is determined by how the pointer is used, not from its definition. The largest target is also shown. The name of each target is printed along with the memory class in which it is located and its size.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.