Re: Why am I breaking into gdb?
Re: Why am I breaking into gdb?
- Subject: Re: Why am I breaking into gdb?
- From: Ben Haller <email@hidden>
- Date: Sun, 29 Nov 2009 21:31:05 -0500
On 29-Nov-09, at 8:31 PM, Ken Thomases wrote:
On Nov 29, 2009, at 6: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.
You are not launching your app under the debugger but are relying on
the "Auto-attach debugger on crash" setting. In particular, note:
Attaching to process 95884.
The debugger is attaching to a process that's already running, and
has already encountered a problem.
In this mode, it's pretty common for gdb not to know which thread
actually had the problem, nor have a way to report what it was.
You could check the preceding stuff (before what you quoted) in the
console for a hint. However, you'll have much better luck by
actually launching the app under the debugger from the get-go.
Select Debug from the Run menu.
There wasn't anything in the console before what I quoted. No
hints for me. :->
In any case, I ran it under the debugger, and the problem no longer
occurs. Tried it several times, no crash. Then I ran it not under
the debugger again, and the problem was 100% reproducible again; but
again, gdb gave me no useful information. It would appear that the
act of running it under the debugger causes the bug to disappear. So
it is quite unfortunate that gdb can't give me useful information in
the case where it attaches to the process.
At this point, however, I had an idea: run it not under gdb at all,
but from the Finder. Crash reporter gave me a good backtrace and a
proper diagnosis of the problem (division by zero, as it happens).
Too bad gdb couldn't do that...
Ben Haller
Stick Software
_______________________________________________
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