The following commands have been extended to accept Objective-C method names as line specifications:
* `info line'
A fully qualified Objective-C method name is specified as
where the minus sign is used to indicate an instance method and a plus sign (not shown) is used to indicate a class method. The class name CLASS and method name METHODNAME are enclosed in brackets, similar to the way messages are specified in Objective-C source code. For example, to set a breakpoint at the `create' instance method of class `Fruit' in the program currently being debugged, enter:
break -[Fruit create]
To list ten program lines around the `initialize' class method, enter:
list +[NSText initialize]
In the current version of GDB, the plus or minus sign is required. In future versions of GDB, the plus or minus sign will be optional, but you can use it to narrow the search. It is also possible to specify just a method name:
You must specify the complete method name, including any colons. If your program's source files contain more than one `create' method, you'll be presented with a numbered list of classes that implement that method. Indicate your choice by number, or type `0' to exit if none apply.
As another example, to clear a breakpoint established at the `makeKeyAndOrderFront:' method of the `NSWindow' class, enter:
clear -[NSWindow makeKeyAndOrderFront:]Created Mon Nov 8 17:42:38 2004 on tillpc with info_to_html version 0.9.6.