Re: gdb and mach exceptions
Re: gdb and mach exceptions
- Subject: Re: gdb and mach exceptions
- From: Jonas Maebe <email@hidden>
- Date: Wed, 24 May 2006 08:33:06 +0200
On 23 mei 2006, at 22:33, Brendan Creane wrote:
Hello All, I have a simple but still unsolved problem
involving the interaction of the EXC_BAD_ACCESS
exception and gdb: I can't figure out how to get gdb
to pass the exception to my signal handler.
In theory, I think it should work by playing with the "inferior-
handle-exceptions" setting (see "help obscure" and "show inferior-
handle-exceptions" for slightly more info). It's not clear to me
which kind of exceptions are deemed inferior though (mach or unix-
style), since "show inferior-handle-exceptions" prints:
"If GDB should handle exceptions or pass them to the UNIX handler is
on."
That's just as informative as "Are you running Mac OS X, Linux or
Windows" - "Yes"
In practice, all I ever managed to do by changing that setting was to
get gdb in an internal error state when a SIGSEGV occurs. Never got
around to file a bug against it though.
The way I debugged my signal handling code was by
a) adding a print to my signal handlers (so I could see when a signal
handler was entered) followed by a sleep(5)
b) keep a separate terminal window ready with "gdp -p <process id>"
typed on the command line (but not yet executed)
c) when the signal handler was entered, press enter so gdb attaches
Not ideal, but it works.
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden