summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-13 05:36:50 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-13 05:36:50 (GMT)
commitd3e1afacaa0a2b174bcecce5a061dda1eab4df91 (patch)
treebbee089e56642307c6a384d24df6c831e33c757d /addr2line.c
parent54ad3167e8b34af03c3382174ec21e00124d6b4d (diff)
addr2line.c: fix *printf type warnings on 32-bit
Yup, back to using an ancient 32-bit system... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/addr2line.c b/addr2line.c
index 3cf73de..c48e1ed 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -814,25 +814,27 @@ next_line:
uintptr_t addr = (uintptr_t)traces[i];
uintptr_t d = addr - line->saddr;
if (!line->path) {
- kprintf("[0x%lx]\n", addr);
+ kprintf("[0x%"PRIuPTR"]\n", addr);
}
else if (!line->saddr || !line->sname) {
- kprintf("%s(0x%lx) [0x%lx]\n", line->path, addr-line->base_addr, addr);
+ kprintf("%s(0x%"PRIuPTR") [0x%"PRIuPTR"]\n", line->path, addr-line->base_addr, addr);
}
else if (line->line <= 0) {
- kprintf("%s(%s+0x%lx) [0x%lx]\n", line->path, line->sname,
+ kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"]\n", line->path, line->sname,
d, addr);
}
else if (!line->filename) {
- kprintf("%s(%s+0x%lx) [0x%lx] ???:%d\n", line->path, line->sname,
- d, addr, line->line);
+ kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"] ???:%d\n",
+ line->path, line->sname, d, addr, line->line);
}
else if (line->dirname && line->dirname[0]) {
- kprintf("%s(%s+0x%lx) [0x%lx] %s/%s:%d\n", line->path, line->sname,
+ kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"] %s/%s:%d\n",
+ line->path, line->sname,
d, addr, line->dirname, line->filename, line->line);
}
else {
- kprintf("%s(%s+0x%lx) [0x%lx] %s:%d\n", line->path, line->sname,
+ kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"] %s:%d\n",
+ line->path, line->sname,
d, addr, line->filename, line->line);
}
/* FreeBSD's backtrace may show _start and so on */