0
最小腳本用於在Xcode要使用的XCode perl腳本
use strict;
use warnings;
## Conversion of one-liner into Script by perl -MO=Deparse
# Original command: perl -ne 'print unless /[0-5]/' input.txt > output.txt
# I got the following command from: perl -MO=Deparse -ne 'print unless /[0-5]/'
# but also the notice: -e syntax OK
while (defined($_ = <ARGV>)) {
print $_ unless
/[0-5]/;
} input.txt > output.txt
終於實踐終端腳本轉換成Perl和使用它們我設置設置爲大約在Xcode運行的Perl在此answer說明。 但是,我不確定我應該在這裏的參數。 我什麼都沒有設置。 我很困惑這句話:
轉到參數選項卡,並確保你的主腳本是第一 說法。根據需要添加更多參數和環境變量。
我運行該腳本,並在OSX約塞米蒂10.10.3,類似here但在Python
dyld`_dyld_start:
-> 0x7fff5fc01000 <+0>: popq %rdi
0x7fff5fc01001 <+1>: pushq $0x0
0x7fff5fc01003 <+3>: movq %rsp, %rbp
0x7fff5fc01006 <+6>: andq $-0x10, %rsp
0x7fff5fc0100a <+10>: subq $0x10, %rsp
0x7fff5fc0100e <+14>: movl 0x8(%rbp), %esi
0x7fff5fc01011 <+17>: leaq 0x10(%rbp), %rdx
0x7fff5fc01015 <+21>: movq 0x37aec(%rip), %r8 ; _dyld_start_static
0x7fff5fc0101c <+28>: leaq -0x23(%rip), %rcx ; <+0>
0x7fff5fc01023 <+35>: subq %r8, %rcx
0x7fff5fc01026 <+38>: leaq -0x102d(%rip), %r8
0x7fff5fc0102d <+45>: leaq -0x8(%rbp), %r9
0x7fff5fc01031 <+49>: callq 0x7fff5fc01076 ; dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*)
0x7fff5fc01036 <+54>: movq -0x8(%rbp), %rdi
0x7fff5fc0103a <+58>: cmpq $0x0, %rdi
0x7fff5fc0103e <+62>: jne 0x7fff5fc01050 ; <+80>
0x7fff5fc01040 <+64>: movq %rbp, %rsp
0x7fff5fc01043 <+67>: addq $0x8, %rsp
0x7fff5fc01047 <+71>: movq $0x0, %rbp
0x7fff5fc0104e <+78>: jmpq *%rax
0x7fff5fc01050 <+80>: addq $0x10, %rsp
0x7fff5fc01054 <+84>: pushq %rdi
0x7fff5fc01055 <+85>: movq 0x8(%rbp), %rdi
0x7fff5fc01059 <+89>: leaq 0x10(%rbp), %rsi
0x7fff5fc0105d <+93>: leaq 0x8(%rsi,%rdi,8), %rdx
0x7fff5fc01062 <+98>: movq %rdx, %rcx
0x7fff5fc01065 <+101>: movq (%rcx), %r8
0x7fff5fc01068 <+104>: addq $0x8, %rcx
0x7fff5fc0106c <+108>: testq %r8, %r8
0x7fff5fc0106f <+111>: jne 0x7fff5fc01065 ; <+101>
0x7fff5fc01071 <+113>: jmpq *%rax
0x7fff5fc01073 <+115>: nop
得到以下0_dyld_start
消息在信息,我設置/usr/bin/perl
如上面所描述的線程。 在產品>計劃中,我把禁用XPC Services
和View Debugging
(我認爲後者是用於OSX工具調試,所以禁用它)。
如何在XCode中爲Perl設置正確的設置? 最可能的錯誤是設置參數。