Re: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jul 15, 2009, at 12:07 PM, Jeff Johnson wrote: $ DYLD_INSERT_LIBRARIES=/path/to/my.dylib /path/to/the/executable However, I'm unable to run it in gdb: $ gdb /path/to/the/executable (gdb) set environment DYLD_INSERT_LIBRARIES=/path/to/my.dylib (gdb) run When I do that, I always get the following: /bin/bash: /usr/bin/arch: Operation not supported /bin/bash: /usr/bin/arch: Unknown error: 0 Program exited with code 01. -- Greg Parker gparker@apple.com Runtime Wrangler _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Hi. I'm experiencing a strange problem with gdb. I'm testing a version of a dylib that has a long-running pthread created in the constructor. This can be simulated with the example code at the end. If I use DYLD_INSERT_LIBRARIES to load the dylib on the command line, it works fine: By default, gdb runs a shell and /usr/bin/arch in order to launch your program. DYLD_INSERT_LIBRARIES is inserting your dylib into those processes as well, which apparently confuses /usr/bin/arch. Try `set start-with-shell 0` in gdb before running your program. This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg Parker