mirror of
https://github.com/FEX-Emu/libunwind.git
synced 2024-11-23 22:39:39 +00:00
mips: support MIPS64 n32 mode
The attached patch fixes a problem with Xorg on MIPS64 n32 which is explained here: https://bugs.freedesktop.org/show_bug.cgi?id=79939 Basically, libunwind is using a word size of 64-bit for all MIPS variants. Then, Xorg does a casting to (void *) of a 64-bit variable provided by libunwind. Given that the size of the pointers in MIPS64 n32 is 32-bit wide, that casting causes an error like this one: backtrace.c:90:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
This commit is contained in:
parent
2a5d1a6296
commit
d9a8b23a35
@ -51,10 +51,13 @@ extern "C" {
|
||||
#define UNW_TDEP_CURSOR_LEN 4096
|
||||
|
||||
/* The size of a "word" varies on MIPS. This type is used for memory
|
||||
addresses and register values. To allow a single library to support
|
||||
multiple ABIs, and to support N32 at all, we must use a 64-bit type
|
||||
even when addresses are only 32 bits. */
|
||||
addresses and register values, which are 32-bit wide for O32 and N32
|
||||
ABIs, and 64-bit wide for N64 ABI. */
|
||||
#if _MIPS_SIM == _ABI64
|
||||
typedef uint64_t unw_word_t;
|
||||
#else
|
||||
typedef uint32_t unw_word_t;
|
||||
#endif
|
||||
typedef int32_t unw_sword_t;
|
||||
|
||||
/* FIXME: MIPS ABIs. */
|
||||
|
Loading…
Reference in New Issue
Block a user