CFShowHeader: CFString.h

Prints a description of a Core Foundation object. This function can be called in debuggers that support function calls.

void CFShow (
    const void *obj
);
obj

A pointer (or reference) to any Core Foundation object. If obj does not point to a Core Foundation object an assertion is raised.

DISCUSSION

The CFShow function is useful as a debugging aid for Core Foundation objects in your code. Because these objects are based on opaque types, it is difficult to examine their contents directly. To bypass this restriction, the opaque types implement description function callbacks that return descriptions of their objects. The CFShow function invokes these callbacks.

SPECIAL CONSIDERATIONS

You can use CFShow in one of two general ways. If your debugger supports function calls (such as gdb does), call CFShow in the debugger:

(gdb) call CFShow(string)
Hello World
$1 = 0 
(gdb)

You can also incorporate calls to CFShow in a test version of your code to print out "snapshots" of Core Foundation objects to the console.


© 1999 Apple Computer, Inc. — (Last Updated 9/15/99)