[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM5PR06MB32436A790BC9787A6C65E91B9A160@DM5PR06MB3243.namprd06.prod.outlook.com>
Date: Wed, 3 May 2017 12:12:23 +0000
From: Adam Stylinski <adam.stylinski@...gent.com>
To: "acme@...nel.org" <acme@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] Fixed a pathing issue with objdump and grep
The path fed to the argument for objdump used in the perf-annotate
feature didn't escape spaces. The subsequent argument to grep for
the name of the DSO containing symbols also assumed no spaces existed
in the pathname, so grep also parsed these as extra positional
arguments.
Signed-off-by: Adam E Stylinski <adam.stylinski@...gent.com>
---
tools/perf/util/annotate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 7aa57225cbf7..fc5a96d584f2 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1441,7 +1441,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
snprintf(command, sizeof(command),
"%s %s%s --start-address=0x%016" PRIx64
" --stop-address=0x%016" PRIx64
- " -l -d %s %s -C %s 2>/dev/null|grep -v %s|expand",
+ " -l -d %s %s -C \"%s\" 2>/dev/null|grep -v \"%s\"|expand",
objdump_path ? objdump_path : "objdump",
disassembler_style ? "-M " : "",
disassembler_style ? disassembler_style : "",
--
2.12.2
Powered by blists - more mailing lists