[kgtp] r968 committed - Adding hotcode

  • From: kgtp@xxxxxxxxxxxxxx
  • To: kgtp@xxxxxxxxxxxxx
  • Date: Mon, 12 Mar 2012 15:18:44 +0000

Revision: 968
Author:   teawater
Date:     Mon Mar 12 08:18:01 2012
Log:      Adding hotcode

http://code.google.com/p/kgtp/source/detail?r=968

Modified:
 /branches/hotcode/hotcode.py

=======================================
--- /branches/hotcode/hotcode.py        Mon Mar 12 07:29:05 2012
+++ /branches/hotcode/hotcode.py        Mon Mar 12 08:18:01 2012
@@ -340,6 +340,8 @@
mod_name = str(gdb.parse_and_eval("((struct module *)"+str(mod)+")->name"))
                mod_name = mod_name[mod_name.index("\"")+1:len(mod_name)]
                mod_name = mod_name[0:mod_name.index("\"")]
+               if mod_name == "fglrx":
+                       contiue
                mod_name += ".ko"
                mod_name = format_file(mod_name)

@@ -385,10 +387,10 @@

 if trace_kernel:
        try:
-               s = raw_input('Do you load the symbol from LKM? (yes)')
+               s = raw_input('Do you load the symbol from LKM? [no]')
        except:
-               s = 'y'
-       if s[0:1] != 'n' and s[0:1] != 'N':
+               s = 'n'
+       if s[0:1] == 'y' or s[0:1] == 'Y':
                getmod()

 cpu_number = int(gdb.parse_and_eval("$cpu_number"))
@@ -432,11 +434,11 @@
        if not trace_user:
                if pid_str != "":
                        cond_str += " && "
-               cond_str = " ((regs->cs & 3) == 0)"
+               cond_str += " ((regs->cs & 3) == 0)"
        elif not trace_kernel:
                if pid_str != "":
                        cond_str += "&&"
-               cond_str = " ((regs->cs & 3) == 3)"
+               cond_str += " ((regs->cs & 3) == 3)"
        tempfile.write("condition $bpnum "+pid_str+cond_str+"\n")
        tempfile.write("commands\n")
        tempfile.write("collect regs->ip\n")

Other related posts:

  • » [kgtp] r968 committed - Adding hotcode - kgtp