aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 273f21fa32b5..22cd1dbe724b 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1435,7 +1435,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
1435 snprintf(command, sizeof(command), 1435 snprintf(command, sizeof(command),
1436 "%s %s%s --start-address=0x%016" PRIx64 1436 "%s %s%s --start-address=0x%016" PRIx64
1437 " --stop-address=0x%016" PRIx64 1437 " --stop-address=0x%016" PRIx64
1438 " -l -d %s %s -C %s 2>/dev/null|grep -v %s|expand", 1438 " -l -d %s %s -C %s 2>/dev/null|grep -v %s:|expand",
1439 objdump_path ? objdump_path : "objdump", 1439 objdump_path ? objdump_path : "objdump",
1440 disassembler_style ? "-M " : "", 1440 disassembler_style ? "-M " : "",
1441 disassembler_style ? disassembler_style : "", 1441 disassembler_style ? disassembler_style : "",
@@ -1482,6 +1482,12 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
1482 1482
1483 nline = 0; 1483 nline = 0;
1484 while (!feof(file)) { 1484 while (!feof(file)) {
1485 /*
1486 * The source code line number (lineno) needs to be kept in
1487 * accross calls to symbol__parse_objdump_line(), so that it
1488 * can associate it with the instructions till the next one.
1489 * See disasm_line__new() and struct disasm_line::line_nr.
1490 */
1485 if (symbol__parse_objdump_line(sym, map, arch, file, privsize, 1491 if (symbol__parse_objdump_line(sym, map, arch, file, privsize,
1486 &lineno) < 0) 1492 &lineno) < 0)
1487 break; 1493 break;