Re: Why am I breaking into gdb?
Re: Why am I breaking into gdb?
- Subject: Re: Why am I breaking into gdb?
- From: Jens Alfke <email@hidden>
- Date: Mon, 30 Nov 2009 08:59:35 -0800
On Nov 29, 2009, at 4:50 PM, Ben Haller wrote:
> Hi all. I have a really, really dumb question for you. I run my app, do a particular thing in it, and after chugging away calculating for sixty seconds or so, the debugger console suddenly comes alive, and there I am in gdb. The problem is, it's not clear to me why I'm there.
I run [sic] into this too. What's going on is that the crash occurred on another thread, but for some reason gdb starts off with thread 1 selected, not the thread that crashed. Generally I do a "t a a bt" to dump all thread backtraces, and from those it's usually clear which one is a crash. But looking at your "info threads" dump, all of the threads seem to be waiting in one way or another; none is obviously crashed. Weird.
On Nov 30, 2009, at 8:01 AM, Scott Ribe wrote:
> FWIW, when you break like that where you're about to throw, you can just
> continue the app, then the throw will be logged and you can see what the
> exception was--usually.
The app's not throwing an exception in this case, but crashing. Xcode won't auto-attach gdb if an exception's thrown; you have to be pre-attached (with a breakpoint on throw/raise) for that.
Also, even in the case of an Obj-C or C++ exception, it won't necessarily be logged after being thrown. That depends on who catches the exception and how they handle it.
—Jens _______________________________________________
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