From 2312a65fcb96b57fa1c755624cb8c6de3c500f05 Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Tue, 18 Mar 2014 16:31:02 -0400 Subject: [PATCH] If the first assembly language instruction in an X86_64 function is "nopl 0x0(%rax,%rax,1)" or "data32 data32 data32 xchg %ax,%ax", which are generated when the ftrace facility is configured, the X86_64 "dis" command will append "[FTRACE NOP]" to the line. (anderson@redhat.com) --- x86_64.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/x86_64.c b/x86_64.c index b51e285..17e8b43 100644 --- a/x86_64.c +++ b/x86_64.c @@ -4762,7 +4762,7 @@ x86_64_dis_filter(ulong vaddr, char *inbuf, unsigned int output_radix) * (on alpha -- not necessarily seen on x86_64) so this routine both fixes the * references as well as imposing the current output radix on the translations. */ - console("IN: %s", inbuf); + console(" IN: %s", inbuf); colon = strstr(inbuf, ":"); @@ -4814,7 +4814,14 @@ x86_64_dis_filter(ulong vaddr, char *inbuf, unsigned int output_radix) } } - console(" %s", inbuf); + if (value_symbol(vaddr) && + (strstr(inbuf, "nopl 0x0(%rax,%rax,1)") || + strstr(inbuf, "data32 data32 data32 xchg %ax,%ax"))) { + strip_line_end(inbuf); + strcat(inbuf, " [FTRACE NOP]\n"); + } + + console("OUT: %s", inbuf); return TRUE; }