[Top][All Lists]

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

Re: [libunwind] filling in unw_dyn_region_info_t

From: Todd L Miller
Subject: Re: [libunwind] filling in unw_dyn_region_info_t
Date: Wed, 3 Mar 2004 16:46:06 -0600 (CST)

> This looks fine, assuming the "adds" is the sixth instruction in the
> code (the exact location depends on the bundling, which you don't
> show).

        I omitted the nops padding out the bundles, which is why the
instruction counts seem high.

> However, note that Section 7 of the Software COnventions & Runtime
> Architecture Guide [1] ("SCRA") requires that the stack-pointer always
> be 16-byte aligned, so even though the unwind-directive itself looks
> reasonable, the code itself is incorrect.

        My understanding is that this requirement came from the unwinder,
which is why I'd been ignoring it.  I still have to change it, but does it
actually stem from something else?  (Does signal handling depend on it, or

> Yes, it generally is a good idea to update the stack pointer only once
> per procedure (that's not a requirement, but it will reduce the amount
> and complexity of unwind directives needed).

        I figured as much.  It shouldn't end up being too painful.

[snip many other good and informative answers]

        Thanks.  I'll be back if I run into trouble.

> Aah, that's a good point: it's the _remote_ processes responsibility
> to register the unwind info (via _U_dyn_register()).  That is, the
> process that generates the code is the one that must call _U_dyn_register().

        OK.  It'll be relatively easy to force libunwind into a remote
process; does it need any initialization before I make _U_dyn_register()

- Tdd L Miller

reply via email to

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