• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor


  • Subject: Re: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
  • From: Greg Parker <email@hidden>
  • Date: Wed, 15 Jul 2009 12:17:42 -0700


On Jul 15, 2009, at 12:07 PM, Jeff Johnson wrote:

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:

$ 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.

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.



-- Greg Parker email@hidden Runtime Wrangler


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
      • From: Jeff Johnson <email@hidden>
References: 
 >gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor (From: Jeff Johnson <email@hidden>)

  • Prev by Date: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
  • Next by Date: Re: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
  • Previous by thread: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
  • Next by thread: Re: gdb problem with DYLD_INSERT_LIBRARIES and pthread in dylib constructor
  • Index(es):
    • Date
    • Thread