Bug #18121 ยป ruby-addr2line-endianness.patch
| addr2line.c | ||
|---|---|---|
|
int type;
|
||
|
} DebugInfoValue;
|
||
|
/* TODO: Big Endian */
|
||
|
#ifdef WORDS_BIGENDIAN
|
||
|
#define MERGE_2INTS(a,b,sz) (((uint64_t)(a)<<sz)|(b))
|
||
|
#else
|
||
|
#define MERGE_2INTS(a,b,sz) (((uint64_t)(b)<<sz)|(a))
|
||
|
#endif
|
||
|
static uint16_t
|
||
|
get_uint16(const uint8_t *p)
|
||
| ... | ... | |
|
{
|
||
|
const char *p = *ptr;
|
||
|
*ptr = (p + 3);
|
||
|
#ifdef WORDS_BIGENDIAN
|
||
|
return ((uint8_t)*p << 16) | get_uint16((const uint8_t *)p+1);
|
||
|
#else
|
||
|
return (*(uint8_t *)(p+2) << 16) | get_uint16((const uint8_t *)p);
|
||
|
#endif
|
||
|
}
|
||
|
static uint32_t
|
||