• 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
MallocDebug and GDB with 10.5.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MallocDebug and GDB with 10.5.5


  • Subject: MallocDebug and GDB with 10.5.5
  • From: Thierry Faucounau <email@hidden>
  • Date: Wed, 12 Nov 2008 13:22:31 +0100

Hi,

Since upgrading to 10.5.5 I have noticed that if I use MallocDebug (which I am in the habit of always doing for debug builds), when my program crashes instead of loading up the offending code line in gdb allowing me to debug the issue, it'll just abort. Everything worked fine in all of the systems previous to 10.5.5.

You can test this pretty easily with:

int main(void)
{
	char *thePtr = NULL;
	*thePtr = 0xDEADBEEF;

	return( 0 );
}

If you run this without using MallocDebug, everything is fine with the gdb console showing 'Program received signal: “EXC_BAD_ACCESS”.' and gdb loaded up at the offending line (*thePtr = 0xDEADBEEF;).

However if you enable MallocDebug via the environment variable DYLD_INSERT_LIBRARIES=/usr/lib/libMallocDebug.A.dylib, the gdb console shows:

exc_server failed.

Debugger stopped.
Program exited with status value:1.(gdb)

and the only thing you can do at that point is hit the big red Stop sign ending the debugging session. The offending line of code is never shown making using MallocDebug basically worse than useless at the moment.

For now I've just stopped using MallocDebug which is a real shame, anyone have a quick workaround?

Thierry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: MallocDebug and GDB with 10.5.5
      • From: "Sean McBride" <email@hidden>
    • Re: MallocDebug and GDB with 10.5.5
      • From: Jerry <email@hidden>
  • Prev by Date: Re: Xcode 3.0 and new SCM features
  • Next by Date: Re: Xcode 3.0 and new SCM features
  • Previous by thread: Re: Xcode 3.0 and new SCM features
  • Next by thread: Re: MallocDebug and GDB with 10.5.5
  • Index(es):
    • Date
    • Thread