[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] PDB: convert ptrace.c and traps.c changes to local patches



# HG changeset patch
# User ach61@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 90f2b122fc43c72d1e4005e9278b26ba18bf1df0
# Parent  f7abc6205e227de766f5e8f93558857a3b21e583
PDB: convert ptrace.c and traps.c changes to local patches

diff -r f7abc6205e22 -r 90f2b122fc43 tools/debugger/pdb/Makefile
--- a/tools/debugger/pdb/Makefile       Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/Makefile       Mon Aug  1 10:43:16 2005
@@ -33,7 +33,7 @@
 LIBS       += unix str
 
 # bc = byte-code, dc = debug byte-code
-all : dc
+all : patches dc
 
 SOURCES    += pdb_caml_xc.c 
 SOURCES    += pdb_caml_domain.c pdb_caml_process.c
@@ -50,3 +50,6 @@
 
 include $(OCAMLMAKEFILE)
 
+PATCHDIR    = ./linux-2.6-patches
+patches :
+       make -C $(PATCHDIR) patches
diff -r f7abc6205e22 -r 90f2b122fc43 
tools/debugger/pdb/linux-2.6-module/module.c
--- a/tools/debugger/pdb/linux-2.6-module/module.c      Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/linux-2.6-module/module.c      Mon Aug  1 10:43:16 2005
@@ -278,14 +278,10 @@
     return err;
 }
 
-extern struct notifier_block *i386die_chain;
-extern spinlock_t die_notifier_lock;
-
 static void __exit
 pdb_terminate(void)
 {
     int err = 0;
-    unsigned long flags;
 
     printk("pdb cleanup\n");
 
@@ -305,9 +301,8 @@
 
     pdb_send_connection_status(PDB_CONNECTION_STATUS_DOWN, 0);
 
-       spin_lock_irqsave(&die_notifier_lock, flags);
-    err = notifier_chain_unregister(&i386die_chain, &pdb_exceptions_nb);
-       spin_unlock_irqrestore(&die_notifier_lock, flags);
+    /* handler for int1 & int3 */
+    err = unregister_die_notifier(&pdb_exceptions_nb);
 
        return;
 }
diff -r f7abc6205e22 -r 90f2b122fc43 
tools/debugger/pdb/linux-2.6-patches/Makefile
--- /dev/null   Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/linux-2.6-patches/Makefile     Mon Aug  1 10:43:16 2005
@@ -0,0 +1,10 @@
+XEN_ROOT   = ../../../..
+LINUX_DIR  = linux-2.6.12-xenU
+KDIR       = $(XEN_ROOT)/$(LINUX_DIR)
+PATCH_DIR  = $(CURDIR)
+
+patches : patches-done
+
+patches-done :
+       ( for i in *.patch ; do ( cd $(KDIR) ; patch -p1 < $(PATCH_DIR)/$$i || 
exit 1 ) ; done )
+       touch $@
diff -r f7abc6205e22 -r 90f2b122fc43 
tools/debugger/pdb/linux-2.6-patches/i386_ksyms.patch
--- /dev/null   Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/linux-2.6-patches/i386_ksyms.patch     Mon Aug  1 
10:43:16 2005
@@ -0,0 +1,11 @@
+diff -u linux-2.6.12/arch/xen/i386/kernel/i386_ksyms.c 
linux-2.6.12-pdb/arch/xen/i386/kernel/i386_ksyms.c
+--- linux-2.6.12/arch/xen/i386/kernel/i386_ksyms.c     2005-07-31 
22:36:50.000000000 +0100
++++ linux-2.6.12-pdb/arch/xen/i386/kernel/i386_ksyms.c 2005-08-01 
10:57:31.000000000 +0100
+@@ -172,6 +172,7 @@
+ EXPORT_SYMBOL_GPL(unset_nmi_callback);
+ 
+ EXPORT_SYMBOL(register_die_notifier);
++EXPORT_SYMBOL(unregister_die_notifier);
+ #ifdef CONFIG_HAVE_DEC_LOCK
+ EXPORT_SYMBOL(_atomic_dec_and_lock);
+ #endif
diff -r f7abc6205e22 -r 90f2b122fc43 
tools/debugger/pdb/linux-2.6-patches/kdebug.patch
--- /dev/null   Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/linux-2.6-patches/kdebug.patch Mon Aug  1 10:43:16 2005
@@ -0,0 +1,11 @@
+diff -u linux-2.6.12/include/asm-i386/kdebug.h 
linux-2.6.12-pdb/include/asm-i386/kdebug.h
+--- linux-2.6.12/include/asm-i386/kdebug.h     2005-06-17 20:48:29.000000000 
+0100
++++ linux-2.6.12-pdb/include/asm-i386/kdebug.h 2005-08-01 11:11:53.000000000 
+0100
+@@ -21,6 +21,7 @@
+    If you really want to do it first unregister - then synchronize_kernel - 
then free.
+   */
+ int register_die_notifier(struct notifier_block *nb);
++int unregister_die_notifier(struct notifier_block *nb);
+ extern struct notifier_block *i386die_chain;
+ 
+ 
diff -r f7abc6205e22 -r 90f2b122fc43 
tools/debugger/pdb/linux-2.6-patches/makefile.patch
--- /dev/null   Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/linux-2.6-patches/makefile.patch       Mon Aug  1 
10:43:16 2005
@@ -0,0 +1,12 @@
+diff -Naur linux-2.6.12/Makefile linux-2.6.12-pdb/Makefile
+--- linux-2.6.12/Makefile      2005-08-01 01:21:21.000000000 +0100
++++ linux-2.6.12-pdb/Makefile  2005-08-01 10:28:10.000000000 +0100
+@@ -508,7 +508,7 @@
+ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+ CFLAGS                += -Os
+ else
+-CFLAGS                += -O2
++CFLAGS                += -O
+ endif
+ 
+ #Add align options if CONFIG_CC_* is not equal to 0
diff -r f7abc6205e22 -r 90f2b122fc43 
tools/debugger/pdb/linux-2.6-patches/ptrace.patch
--- /dev/null   Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/linux-2.6-patches/ptrace.patch Mon Aug  1 10:43:16 2005
@@ -0,0 +1,11 @@
+diff -u linux-2.6.12/kernel/ptrace.c linux-2.6.12-pdb/kernel/ptrace.c
+--- linux-2.6.12/kernel/ptrace.c       2005-06-17 20:48:29.000000000 +0100
++++ linux-2.6.12-pdb/kernel/ptrace.c   2005-07-22 13:23:16.000000000 +0100
+@@ -239,6 +239,7 @@
+ 
+        return buf - old_buf;
+ }
++EXPORT_SYMBOL(access_process_vm);
+ 
+ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user 
*dst, int len)
+ {
diff -r f7abc6205e22 -r 90f2b122fc43 
tools/debugger/pdb/linux-2.6-patches/traps.patch
--- /dev/null   Sun Jul 31 21:45:52 2005
+++ b/tools/debugger/pdb/linux-2.6-patches/traps.patch  Mon Aug  1 10:43:16 2005
@@ -0,0 +1,20 @@
+diff -u linux-2.6.12/arch/xen/i386/kernel/traps.c 
linux-2.6.12-pdb/arch/xen/i386/kernel/traps.c
+--- linux-2.6.12/arch/xen/i386/kernel/traps.c  2005-07-31 22:47:00.000000000 
+0100
++++ linux-2.6.12-pdb/arch/xen/i386/kernel/traps.c      2005-07-31 
22:47:32.000000000 +0100
+@@ -102,6 +102,16 @@
+       return err;
+ }
+ 
++int unregister_die_notifier(struct notifier_block *nb)
++{
++      int err = 0;
++      unsigned long flags;
++      spin_lock_irqsave(&die_notifier_lock, flags);
++      err = notifier_chain_unregister(&i386die_chain, nb);
++      spin_unlock_irqrestore(&die_notifier_lock, flags);
++      return err;
++}
++
+ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
+ {
+       return  p > (void *)tinfo &&

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.