os: backtrace: Fix -Wincompatible-pointer-types compiler error on 32-bit targets
``` ../os/backtrace.c: In function ‘print_registers’: ../os/backtrace.c:94:52: error: passing argument 3 of ‘_ULarm_get_reg’ from incompatible pointer type [-Wincompatible-pointer-types] 94 | ret = unw_get_reg(&cursor, regs[i].regnum, &val); | ^~~~ | | | uint64_t * {aka long long unsigned int *} ``` Switched to libunwind's un_word_t type and PRIxPTR fprintf fmt specification Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1763>
This commit is contained in:
parent
4f2c6c98b7
commit
e0588d2110
|
@ -90,13 +90,13 @@ print_registers(int frame, unw_cursor_t cursor)
|
||||||
ErrorF("Registers at frame #%d:\n", frame);
|
ErrorF("Registers at frame #%d:\n", frame);
|
||||||
|
|
||||||
for (i = 0; i < num_regs; i++) {
|
for (i = 0; i < num_regs; i++) {
|
||||||
uint64_t val;
|
unw_word_t val;
|
||||||
ret = unw_get_reg(&cursor, regs[i].regnum, &val);
|
ret = unw_get_reg(&cursor, regs[i].regnum, &val);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ErrorF("unw_get_reg(%s) failed: %s [%d]\n",
|
ErrorF("unw_get_reg(%s) failed: %s [%d]\n",
|
||||||
regs[i].name, unw_strerror(ret), ret);
|
regs[i].name, unw_strerror(ret), ret);
|
||||||
} else {
|
} else {
|
||||||
ErrorF(" %s: 0x%" PRIx64 "\n", regs[i].name, val);
|
ErrorF(" %s: 0x%" PRIxPTR "\n", regs[i].name, val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue