This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Unwinding CFI for x86_64 signal frame (__restore_rt)

Hi Jakub,

On Mon, 27 Nov 2006 12:43:39 +0100, Jakub Jelinek wrote:
> I plan to change fix that on the gas side soon,

you plan to support DW_OP_* as pseudoinstructions for gas(1)? That would be
great. Sure I could code it into the `.eh_frame' section by hand but that's
ugly and currently this bug is not a stopper, signal frame unwinding came just
as logical related bugfix.

If it is a part of your planned CFI GCC extension it could be soon.
I'll try to propose something if the implementation would take too long.

> > +/* Define if CFI x86_64 rflags is available.  */
> I don't think this conditional is needed, we can use numbers instead
> of register names and they will work with any unwinder.

As missing CFI is not a showstopper I chose the better code readability.
OK, you would like more the commented numbers.

> > +/* sizeof (struct rt_sigframe)  */
> > +#define FRAME_SIZE 0x238
> I think you should use here (and in the offsets of the various registers)
> a *.sym file to precompute macros and use them.

I see now, thanks for the suggestion.

> Another, more important thing, you are assuming the size of signal
> frame is always 0x238 bytes.
> This can be represented in DWARF3 with DW_CFA_def_cfa_expression
> to define new CFA and DW_CFA_expression for all the registers

OK, thanks for pointing me this way is right.
 * I believed these glibc parts are tightly bound to the kernel to accept
   such ABI compatibility interdependencies.
 * I missed gas(1) .cfi_* pseudoinstructions for the *_expression types.

Best Regards,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]