diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2010-03-15 13:02:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-16 10:02:18 +0100 |
commit | 67c7ff7c56f38a8ab338fbbfe366621ce6303ba1 (patch) | |
tree | 4b7467f95af1eb98a850ce1717bebc9a2e6a465c | |
parent | b63be8d7beda7fe5879559be6f70f8e1c93109e4 (diff) | |
download | linux-67c7ff7c56f38a8ab338fbbfe366621ce6303ba1.tar.bz2 |
perf probe: Fix offset to allow signed value
Fix dereference offset to intmax_t from uintmax_t, because
it can have negative values (for example local variable's offset
from frame pointer).
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100315170228.31852.71946.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | tools/perf/util/probe-finder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index f9cbbf18e6ca..0e8c8f1594ec 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -333,8 +333,8 @@ static void show_location(Dwarf_Op *op, struct probe_finder *pf) die("%u exceeds max register number.", regn); if (deref) - ret = snprintf(pf->buf, pf->len, " %s=+%ju(%s)", - pf->var, (uintmax_t)offs, regs); + ret = snprintf(pf->buf, pf->len, " %s=%+jd(%s)", + pf->var, (intmax_t)offs, regs); else ret = snprintf(pf->buf, pf->len, " %s=%s", pf->var, regs); DIE_IF(ret < 0); |