Avatar
(lldb) breakpoint set -n setenv Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. (lldb) breakpoint set -r '^\$ss11CommandLine.*' Breakpoint 2: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. (lldb) run Process 8380 launched: '/empty-args-test/.build/debug/App' (aarch64) 17 locations added to breakpoint 2 1 location added to breakpoint 1 Process 8380 stopped * thread #1, name = 'App', stop reason = breakpoint 1.1 frame #0: 0x0000fffff58ac9f4 libc.so.6`__setenv(name="ZES_ENABLE_SYSMAN", value="1", replace=1) at setenv.c:255:6 (lldb) c Process 8380 resuming :smiling_imp: use 'setenv' in static constructor Process 8380 stopped * thread #1, name = 'App', stop reason = breakpoint 1.1 frame #0: 0x0000fffff58ac9f4 libc.so.6`__setenv(name="FOO", value="BAR", replace=1) at setenv.c:255:6 (lldb) c Process 8380 resuming a.cpp: ***GRABBING ARGV for 8380*** a.cpp: envp = 0xaaaaaafee220 a.cpp: envp = 0xaaaaaafee220, stack is from 0xfffffffdf000 to 0x1000000000000 ARGV is at (nil) with count 0 a.cpp: ***ARGV GRABBED*** Hello, World! Process 8380 stopped * thread #1, name = 'App', stop reason = breakpoint 2.10 frame #0: 0x0000fffff7c20dec libswiftCore.so`$ss11CommandLineO9argumentsSaySSGvgZ libswiftCore.so`$ss11CommandLineO9argumentsSaySSGvgZ: -> 0xfffff7c20dec <+0>: stp x29, x30, [sp, #-0x10]! 0xfffff7c20df0 <+4>: adrp x0, 795 0xfffff7c20df4 <+8>: add x0, x0, #0x60 0xfffff7c20df8 <+12>: adrp x1, 0 main.swiftの中が走るまでの間にCommandLineに誰も触ってないな・・・