|
From: Phillip B. <phi...@um...> - 2025-10-25 04:01:28
|
More digging - this article seems to bear something of a partial explanation: https://stackoverflow.com/questions/33587130/why-doesnt-lldb-forward-my-environment-variable-anymore Though the article is about 10 years old. The article mentions that this restriction only occurs under certain circumstances, but I can't find any that it doesn't happen for. I finally got down to this short program. It is running as me, on my home directory (not a network share, not a mounted external volume, it's just my "Macintosh HD" home directory just as originally set up by Apple: % cat hello.c #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main() { int mypid = getpid(); printf( "PID=%d\n", mypid ); char* var_value = getenv( "DYLD_IMAGE_SUFFIX" ); if ( var_value ) { printf( "DYLD_IMAGE_SUFFIX is set to: %s\n", var_value ); } else { printf( "DYLD_IMAGE_SUFFIX is not set\n" ); } } pbrooks@Drakblar ~ % cc -g hello.c pbrooks@Drakblar ~ % ./a.out PID=37336 DYLD_IMAGE_SUFFIX is set to: _debug pbrooks@Drakblar ~ % lldb ./a.out (lldb) target create "./a.out" Current executable set to '/Users/pbrooks/a.out' (arm64). (lldb) run Process 37339 launched: '/Users/pbrooks/a.out' (arm64) PID=37339 DYLD_IMAGE_SUFFIX is not set Process 37339 exited with status = 0 (0x00000000) (lldb) So I can't find a case where lldb does not hide DYLD_IMAGE_SUFFIX. It seems like we should have a "debug" build of tclsh that links to Tcl_debug directly rather than relying on this environment variable. |