1# REQUIRES: lua 2# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o %t 3# RUN: %lldb -s %s --script-language lua %t 2>&1 | FileCheck %s 4b main 5script 6function abc(a, b, c, ...) 7print(c) 8if c then print(c:GetValueForKey("foo"):GetStringValue(32)) end 9end 10quit 11breakpoint command add -s lua -F abc 12r 13# CHECK: nil 14breakpoint command add -s lua -F abc -k foo -v 123pizza! 15r 16# CHECK: <userdata of type 'lldb::SBStructuredData *' at {{0x[[:xdigit:]]+}}> 17# CHECK: 123pizza! 18breakpoint command add -s lua -o "abc(frame, bp_loc, ...)" 19r 20# CHECK: nil 21breakpoint command add -s lua -F typo 22r 23# CHECK: attempt to call a nil value 24