Search code examples
macosresourcesmacos-carbon

How can one print the current state of the resource chain?


The Resource Manager Reference says:

The Resource Manager keeps track of resources in memory and provides functions for the proper management of the resource chain.

Is there a way to inspect the resource chain from GDB- to print it's current state, etc.? If so, how?


Solution

  • Eric Schlegel answered the question on the Carbon-Dev mailing list in this message

    It was:

    (gdb) call (void)PrintResourceChain(0)
    The parameter should be 0 or 1: 0 for walking the resource map data structures directly, 1 for using API to walk the resource chain.
    

    He also notes that it may not be documented anywhere.