30 lines · plain
1# REQUIRES: system-darwin2 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 context5# too (which in DWARF is just a forward declaration).6#7# RUN: split-file %s %t8# RUN: %clangxx_host %t/lib.m -c -g -gmodules -fmodules -o %t/lib.o9# RUN: %clangxx_host %t/main.m -g -gmodules -fmodules %t/lib.o -o %t/a.out -framework Foundation10#11# RUN: %lldb %t/a.out -o "breakpoint set -f lib.m -l 6" -o exit | FileCheck %s12 13# CHECK: (lldb) breakpoint set -f lib.m -l 614# CHECK: Breakpoint 1: where = a.out`-[NSObject(Foo) func]15 16#--- main.m17int main() {18 return 0;19}20 21#--- lib.m22#import <Foundation/Foundation.h>23 24@implementation NSObject (Foo)25- (NSError *)func {26 NSLog(@"Hello, World!");27 return 0;28}29@end30