CFShow

Header: CFString.h Carbon status: Supported

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

void CFShow (
    CFTypeRef obj
);
Parameter descriptions
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.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)