libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?


From: Dave Watson
Subject: Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?
Date: Thu, 30 Mar 2017 08:20:26 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On 03/29/17 04:51 PM, Doug Moore wrote:
> Can’t we fix this whole problem by having getcontext subtract from the pc to 
> start with, so that nobody ever has to decrement the pc on the first call to 
> unw_step?

That would assume that the ucontext is usually from a signal frame
(third argument from a sigaction handler), which is probably pretty
common.  It would break anyone that grabbed it outside a handler using
getcontext() instead of unw_getcontext() though.

The current documentation says:

```
On IA-64, unw_context_t has a layout that is compatible with that of
ucontext_t and such structures can be initialized with getcontext()
instead of unw_getcontext()
```

so it might be a somewhat interface breaking change.  

Conversely, for your use case you might just be able to bump the ip by
one in the ucontext before the first unw_step()?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]