Re: [DynInst_API:] How to use DyninstAPI to get thread/process call stack in case of a signal delivery


Date: Thu, 17 Apr 2014 23:01:00 +0800
From: JiangJie <yangtzj@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] How to use DyninstAPI to get thread/process call stack in case of a signal delivery
Hi Ray,

My platform is x86/Linux.

Unfortunately, registerSignalHandlerCallback() does not work on X86/Linux platform.
Even I have registered such a signal handler callback for SIGSEGV signal,
this registered callback function never gets called and executed.

In fact, in dyninstapi/src/hybridCallbacks.C,  the registerSignalHandlerCallback() method
does nothing, just returning true, for all non-windows platform.

And the DyninstAPI user guide also says that the registerSignalHandlerCallback() is only
fully implemented for windows platform.

So why does not dyninstAPI support registering a signal handler callback for Linux platform?
Is it possible to implement such callback mechanism for Linux?

Jie


> From: rchen@xxxxxxxxxx
> Date: Wed, 16 Apr 2014 11:43:53 -0400
> Subject: Re: [DynInst_API:] How to use DyninstAPI to get thread/process call stack in case of a signal delivery
> To: yangtzj@xxxxxxxxxxx
> CC: dyninst-api@xxxxxxxxxxx
>
> On Wed, Apr 16, 2014 at 9:30 AM, JiangJie <yangtzj@xxxxxxxxxxx> wrote:
> >
> > So my question is, how to collect the target process's call stack in case of
> > a signal delivery by using DynisntAPI?
> > A solution comes to me is to register a signal handler callback by invoking
> > registerSignalHandlerCallback.
> > Is this a correct solution? Or is there any other better solution in
> > DyninstAPI?
> >
> Hello Jie,
>
> Yes, installing a callback via registerSignalHandlerCallback() is the
> correct solution.
>
> Let us know how it works out!
> - Ray
[← Prev in Thread] Current Thread [Next in Thread→]