BugLink: http://bugs.launchpad.net/bugs/1758856
Catch indirect jmps and calls of the form 'jmp *0xNNNN(%reg)'.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
awk -F' ' '
/^.\// { file=$1; sub(":.*", "", file); sub("^.*/", "", file); }
/^[0-9a-f][0-9a-f]* <.*>:/ { tag=$1; sub(".*<", "", tag); sub(">.*", "", tag); tag=file " " tag; }
- $3 ~ /(call|jmp)q? *\*%/ { print(tag " " $3); }
+ $3 ~ /(call|jmp)q? *\*(0x[a-f0-9]+\()?%/ { print(tag " " $3); }
' | \
grep -v " \*%cs:0x" # elide 32bit code-segment absolute offsets.