MallocDebug and GDB with 10.5.5
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