Am 27.07.17 um 16:19 schrieb Brad Lanam:
> AFAIK gdb isn't going to work (I haven't checked very recently -- at the time I checked MacPorts did not have the necessary patches to gdb).
Ok good to know. (I hope they get it sorted out soon)
> lldb should work, but will ignore the DYLD_FRAMEWORK_PATH environment variable.
> You have to set this yourself within lldb. That should resolve the crash.
>
> (all one line:)
> settings set target.env-vars DYLD_FRAMEWORK_PATH="/Users/bll/tcl/build/tcl/Development:/Users/bll/tcl/build/tk/Development:${DYLD_FRAMEWORK_PATH}"'
>
Hm that didn't resolve it for me. I started lldb in the Terminal, then
typed exactly:
settings set target.env-vars
DYLD_FRAMEWORK_PATH="/Users/eckhard/Workspace/tcltk/build/tcl/Development:${DYLD_FRAMEWORK_PATH}"
and then
process attach --pid <tclsh-pid>
then one "continue" and tclsh crashes. It was started in the same
directory, "Development".
Or, maybe it is not even a crash. I get a message in lldb, saying
----
Process 21754 resuming
Process 21754 exited with status = 0 (0x00000000)
----
Maybe even a regular exit with code 0, but it should not happen...
I have the complete output of my (lldb) session here:
----
(lldb) settings set target.env-vars
DYLD_FRAMEWORK_PATH="/Users/eckhard/Workspace/tcltk/build/tcl/Development:${DYLD_FRAMEWORK_PATH}"
(lldb)
(lldb) process attach --pid 21827
Process 21827 stopped
* thread #1: tid = 0xe9b4, 0x00007fffc2dff246
libsystem_kernel.dylib`read + 10, queue = 'com.apple.main-thread', stop
reason = signal SIGSTOP
frame #0: 0x00007fffc2dff246 libsystem_kernel.dylib`read + 10
libsystem_kernel.dylib`read:
-> 0x7fffc2dff246 <+10>: jae 0x7fffc2dff250 ; <+20>
0x7fffc2dff248 <+12>: movq %rax, %rdi
0x7fffc2dff24b <+15>: jmp 0x7fffc2df6cd4 ; cerror
0x7fffc2dff250 <+20>: retq
Executable module set to
"/Users/eckhard/Workspace/tcltk/build/tcl/Development/./tclsh".
Architecture set to: x86_64h-apple-macosx.
(lldb) bt
* thread #1: tid = 0xe9b4, 0x00007fffc2dff246
libsystem_kernel.dylib`read + 10, queue = 'com.apple.main-thread', stop
reason = signal SIGSTOP
* frame #0: 0x00007fffc2dff246 libsystem_kernel.dylib`read + 10
frame #1: 0x000000010ccf26db Tcl`FileInputProc + 26
frame #2: 0x000000010cca912c Tcl`ChanRead + 102
frame #3: 0x000000010ccac6a1 Tcl`GetInput + 327
frame #4: 0x000000010cca8990 Tcl`FilterInputBytes + 124
frame #5: 0x000000010cca82a6 Tcl`Tcl_GetsObj + 881
frame #6: 0x000000010ccbd032 Tcl`Tcl_MainEx + 1102
frame #7: 0x000000010cbfaa0f tclsh`main(argc=1,
argv=0x00007fff530069f8) + 63 at tclAppInit.c:84
frame #8: 0x00007fffc2ccf235 libdyld.dylib`start + 1
frame #9: 0x00007fffc2ccf235 libdyld.dylib`start + 1
(lldb) c
Process 21827 resuming
Process 21827 exited with status = 0 (0x00000000)
(lldb)
----
--
EL