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

[Xen-changelog] Simplify cdb.



ChangeSet 1.1401, 2005/04/29 09:36:31+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Simplify cdb.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 b/xen/include/asm-x86/debugger.h     |    5 +---
 xen/arch/x86/x86_32/call_with_regs.S |   36 -----------------------------------
 2 files changed, 2 insertions(+), 39 deletions(-)


diff -Nru a/xen/arch/x86/x86_32/call_with_regs.S 
b/xen/arch/x86/x86_32/call_with_regs.S
--- a/xen/arch/x86/x86_32/call_with_regs.S      2005-04-29 05:05:41 -04:00
+++ /dev/null   Wed Dec 31 16:00:00 196900
@@ -1,36 +0,0 @@
-.global call_with_registers
-
-#include <asm/asm-offsets.h>
-
-       // int call_with_registers(void (*f)(struct cpu_user_regs *r)) ->
-       // build a cpu_user_regs structure, and then call f with that.
-call_with_registers:
-       pushf
-       subl $UREGS_user_sizeof, %esp
-       movl %ebx, UREGS_ebx(%esp)
-       movl %ecx, UREGS_ecx(%esp)
-       movl %edx, UREGS_edx(%esp)
-       movl %esi, UREGS_esi(%esp)
-       movl %edi, UREGS_edi(%esp)
-       movl %ebp, UREGS_ebp(%esp)
-       movl %eax, UREGS_eax(%esp)
-       movw $0, UREGS_error_code(%esp)
-       movw $0, UREGS_entry_vector(%esp)
-       movl UREGS_user_sizeof+4(%esp), %eax
-       movl %eax, UREGS_eip(%esp)
-       movl %cs, UREGS_cs(%esp)
-       movl UREGS_user_sizeof(%esp), %eax
-       movl %eax, UREGS_eflags(%esp)
-       movl %esp, UREGS_esp(%esp)
-       addl $UREGS_user_sizeof+4, UREGS_esp(%esp)
-       movl %ss, UREGS_ss(%esp)
-       movl %es, UREGS_es(%esp)
-       movl %ds, UREGS_ds(%esp)
-       movl %fs, UREGS_fs(%esp)
-       movl %gs, UREGS_gs(%esp)
-
-       movl UREGS_user_sizeof+8(%esp), %eax
-       pushl %esp
-       call *%eax
-       add $UREGS_user_sizeof + 8, %esp
-       ret
diff -Nru a/xen/include/asm-x86/debugger.h b/xen/include/asm-x86/debugger.h
--- a/xen/include/asm-x86/debugger.h    2005-04-29 05:05:41 -04:00
+++ b/xen/include/asm-x86/debugger.h    2005-04-29 05:05:41 -04:00
@@ -38,14 +38,13 @@
 #define DEBUGGER_trap_fatal(_v, _r) \
     if ( debugger_trap_fatal(_v, _r) ) return EXCRET_fault_fixed;
 
-int call_with_registers(int (*f)(struct cpu_user_regs *r));
-
 #if defined(CRASH_DEBUG)
 
 extern int __trap_to_cdb(struct cpu_user_regs *r);
 #define debugger_trap_entry(_v, _r) (0)
 #define debugger_trap_fatal(_v, _r) __trap_to_cdb(_r)
-#define debugger_trap_immediate() call_with_registers(__trap_to_cdb)
+/* Int3 is a trivial way to gather cpu_user_regs context. */
+#define debugger_trap_immediate() __asm__ __volatile__ ( "int3" );
 
 #elif defined(DOMU_DEBUG)
 

_______________________________________________
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®.