From e9a8b243098f3e4c86e0a1d4349ed5ea3718e46c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 9 Jul 2008 18:53:49 -0400 Subject: [PATCH] Print nops in run-pre matching. Signed-off-by: Tim Abbott --- kmodsrc/ksplice-run-pre.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kmodsrc/ksplice-run-pre.h b/kmodsrc/ksplice-run-pre.h index 4650a69..905a2b2 100644 --- a/kmodsrc/ksplice-run-pre.h +++ b/kmodsrc/ksplice-run-pre.h @@ -144,6 +144,7 @@ static int run_pre_cmp(struct module_pack *pack, long run_addr, long pre_addr, { int run_o = 0, pre_o = 0, lenient = 0; int matched; + int o; unsigned char run, pre; struct reloc_addrmap *map; @@ -168,11 +169,23 @@ static int run_pre_cmp(struct module_pack *pack, long run_addr, long pre_addr, matched = match_nop((unsigned char *)(run_addr + run_o)); if (matched > 0) { + if (rerun) { + for (o = 0; o < matched; o++) + printk("%02x/ ", + *(unsigned char *)(run_addr + + o)); + } run_o += matched; continue; } matched = match_nop((unsigned char *)(pre_addr + pre_o)); if (matched > 0) { + if (rerun) { + for (o = 0; o < matched; o++) + printk("/%02x ", + *(unsigned char *)(pre_addr + + o)); + } pre_o += matched; continue; } -- 2.11.4.GIT