The Print Command with Objective-C - Debugging with GDB
Description: Debugging with GDB

Previous: Method Names in Commands, Up: Objective-C

##### 15.4.4.2 The Print Command With Objective-C

The print command has also been extended to accept methods. For example:

         print -[object hash]

will tell gdb to send the `hash` message to object and print the result. Also, an additional command has been added, `print-object` or `po` for short, which is meant to print the description of an object. However, this command may only work with certain Objective-C libraries that have a particular hook function, `_NSPrintForDebugger`, defined.