PING: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

H.J. Lu hjl.tools@gmail.com
Mon Mar 21 18:37:00 GMT 2011


On Mon, Mar 14, 2011 at 10:49 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>>>>>
>>>>>>> We shouldn't save call frame hard registers as "void *".  This patch
>>>>>>> changes the unwind library to save call frame hard registers as
>>>>>>> _Unwind_Word.  OK for 4.7?
>>>>>>
>>>>>> I think this will break the ABI for the MIPS N32 ABI.  Not to mention
>>>>>> the MIPS N32 ABI works fine with the unwinding part this way.  Does
>>>>>> someone use the unwinding library to look at the registers in previous
>>>>>> stack frames?
>>>>>
>>>>> It may be psABI/implementation specific.  X32 glibc force unwind calls
>>>>> _Unwind_SetGRValue to get a 64bit register value.
>>>>
>>>> So fix it on that side?
>>>>
>>>
>>> How? One function in question is
>>>
>>> /* Overwrite the saved value for register INDEX in CONTEXT with VAL.  */
>>>
>>> static inline void
>>> _Unwind_SetGRValue (struct _Unwind_Context *context, int index,
>>>                    _Unwind_Word val)
>>>
>>>
>>> Are you saying it shouldn't be called if UNITS_PER_WORD > sizeof (void *)?
>>>
>>
>> FWIW, the type of GR is _Unwind_Word, not void *.  They may not
>> have the same size.  Why does the DWARF unwind library use
>> void * to store GR? Can a target have an option to save a _Unwind_Word
>> value in _Unwind_Word, instead of void *?
>>
>
> From what I can tell, _Unwind_Context is internal to the unwind library
> and only one copy unwind library can be used in a process. I don't
> think changing _Unwind_Context will impact binary compatibility.
>
> Is my patch OK for 4.7?
>

PING:

http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00267.html


-- 
H.J.



More information about the Gcc-patches mailing list