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

Re: MallocDebug and GDB with 10.5.5


  • Subject: Re: MallocDebug and GDB with 10.5.5
  • From: Jerry <email@hidden>
  • Date: Wed, 12 Nov 2008 13:40:59 +0000

I don't know if this is related, but I get a similar thing all the time: if my application crashes, Xcode always spends a minute or two loading it into the debugger and then the application just quits so you never get to see which line it crashed on. If you try to abort the "loading" phase with the red stop button, the application becomes a zombie process and the only way to make it go away is to quit Xcode. My solution is to always run in the debugger from the start. I'm not using MallocDebug though.

Jerry

On 12 Nov 2008, at 12:22, Thierry Faucounau wrote:

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:
@huxtable.com


This email sent to email@hidden



_______________________________________________ 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
References: 
 >MallocDebug and GDB with 10.5.5 (From: Thierry Faucounau <email@hidden>)

  • Prev by Date: Re: Xcode 3.0 and new SCM features
  • Next by Date: Re: C++ STL question
  • Previous by thread: MallocDebug and GDB with 10.5.5
  • Next by thread: Re: MallocDebug and GDB with 10.5.5
  • Index(es):
    • Date
    • Thread