On Sat, Feb 20, 2010 at 3:46 PM, [email protected] <
[email protected]> wrote:
>
> So, how should this problem be addressed cleanly? Should the registers be
> renumbered (via UNW_REG_* enums in libunwind-x86.h)? Or should _Unwind_SetGR
> and _Unwind_GetGR be patched to renumber the registers? Or do you have any
> other idea?
>
>
Renumbering doesn't work.
include/libunwind-x86.h:
It would have been nice to use the same register numbering as
DWARF, but that doesn't work because the libunwind requires
that the exception argument registers be consecutive, which they
wouldn't be with the DWARF numbering. */
I think a patch along the lines of:
#ifdef __i386__
unw_index = dwarf_to_unw_regnum_map[index];
#endif
// Use unw_index instead of index
might be better. Such a table exists in:
src/x86/Gglobal.c
-Arun
_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel