1# REQUIRES: system-darwin 2 3# Test that we can set a breakpoint in a method of a class extension. 4# This requires us to parse the method into an AST type, and the context 5# too (which in DWARF is just a forward declaration). 6# 7# RUN: split-file %s %t 8# RUN: %clangxx_host %t/lib.m -c -g -gmodules -fmodules -o %t/lib.o 9# RUN: %clangxx_host %t/main.m -g -gmodules -fmodules %t/lib.o -o %t/a.out -framework Foundation 10# 11# RUN: %lldb %t/a.out -o "breakpoint set -f lib.m -l 6" -o exit | FileCheck %s 12 13# CHECK: (lldb) breakpoint set -f lib.m -l 6 14# CHECK: Breakpoint 1: where = a.out`-[NSObject(Foo) func] 15 16#--- main.m 17int main() { 18 return 0; 19} 20 21#--- lib.m 22#import <Foundation/Foundation.h> 23 24@implementation NSObject (Foo) 25- (NSError *)func { 26 NSLog(@"Hello, World!"); 27 return 0; 28} 29@end 30