Re: Debugging a process that received Signal
Re: Debugging a process that received Signal
- Subject: Re: Debugging a process that received Signal
- From: Ken Thomases <email@hidden>
- Date: Sat, 31 Jan 2009 09:14:40 -0600
On Jan 31, 2009, at 6:40 AM, Arnab Ganguly wrote:
I want to compare the stack trace generated by program matches with
the Crashreporter.app or not.Now in successful case there is no
crash log generated for the app so I am trying forcibly the
segmentation fault just to compare the stack traces generated by my
app and with the Crashreporter. But when the segmentation fault
happens, as you said earlier I am not able to proceed with my code
to see how the trace comes up in my app.Is there any workaround for
this?
I'm not sure I understand what you're trying to do. My impression is
that you have a signal handler installed and you want that signal
handler to fire, and you also want to debug that signal handler in gdb.
You can use the "handle" command of gdb to tell gdb to allow the
signal to reach your program, thus triggering your signal handler.
You can also set a breakpoint in the signal handler itself.
For example:
handle SIGSEGV nostop print pass
handle EXC_BAD_ACCESS nostop print pass
Alternatively, you can let gdb stop your process due to the signal,
which is its default. Then, you can use gdb's "signal" command to
resume your process with the specified signal raised.
Or, as others have advised, you can run your program independently --
don't start it with gdb. In your signal handler, put a call to
sleep(). When the program is sleeping, attach to it with gdb (gdb -
pid <pid>).
Regards,
Ken
_______________________________________________
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