ia64/xen-unstable

changeset 4708:604df558b783

bitkeeper revision 1.1389.1.12 (4271f20fuu_UWEqTVagTm3zNUhVqJA)

Simplify cdb.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Apr 29 08:36:31 2005 +0000 (2005-04-29)
parents 2ee7f247738e
children 4aec39caa003 cc205672af7c
files .rootkeys xen/arch/x86/x86_32/call_with_regs.S xen/include/asm-x86/debugger.h
line diff
     1.1 --- a/.rootkeys	Fri Apr 29 08:17:13 2005 +0000
     1.2 +++ b/.rootkeys	Fri Apr 29 08:36:31 2005 +0000
     1.3 @@ -1237,7 +1237,6 @@ 41c0c411ODt8uEmV-yUxpQLpqimE5Q xen/arch/
     1.4  41f97ef5139vN42cOYHfX_Ac8WOOjA xen/arch/x86/vmx_platform.c
     1.5  41c0c4128URE0dxcO15JME_MuKBPfg xen/arch/x86/vmx_vmcs.c
     1.6  419cbedeQDg8IrO3izo3o5rQNlo0kQ xen/arch/x86/x86_32/asm-offsets.c
     1.7 -4107c15e_NqNYew2EXroXz2mgTAMWQ xen/arch/x86/x86_32/call_with_regs.S
     1.8  3e32af9aRnYGl4GMOaDKp7JdfhOGhg xen/arch/x86/x86_32/domain_page.c
     1.9  3ddb79bcecupHj56ZbTa3B0FxDowMg xen/arch/x86/x86_32/entry.S
    1.10  3ddb79bcHwuCQDjBICDTSis52hWguw xen/arch/x86/x86_32/mm.c
     2.1 --- a/xen/arch/x86/x86_32/call_with_regs.S	Fri Apr 29 08:17:13 2005 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,36 +0,0 @@
     2.4 -.global call_with_registers
     2.5 -
     2.6 -#include <asm/asm-offsets.h>
     2.7 -
     2.8 -	// int call_with_registers(void (*f)(struct cpu_user_regs *r)) ->
     2.9 -	// build a cpu_user_regs structure, and then call f with that.
    2.10 -call_with_registers:
    2.11 -	pushf
    2.12 -	subl $UREGS_user_sizeof, %esp
    2.13 -	movl %ebx, UREGS_ebx(%esp)
    2.14 -	movl %ecx, UREGS_ecx(%esp)
    2.15 -	movl %edx, UREGS_edx(%esp)
    2.16 -	movl %esi, UREGS_esi(%esp)
    2.17 -	movl %edi, UREGS_edi(%esp)
    2.18 -	movl %ebp, UREGS_ebp(%esp)
    2.19 -	movl %eax, UREGS_eax(%esp)
    2.20 -	movw $0, UREGS_error_code(%esp)
    2.21 -	movw $0, UREGS_entry_vector(%esp)
    2.22 -	movl UREGS_user_sizeof+4(%esp), %eax
    2.23 -	movl %eax, UREGS_eip(%esp)
    2.24 -	movl %cs, UREGS_cs(%esp)
    2.25 -	movl UREGS_user_sizeof(%esp), %eax
    2.26 -	movl %eax, UREGS_eflags(%esp)
    2.27 -	movl %esp, UREGS_esp(%esp)
    2.28 -	addl $UREGS_user_sizeof+4, UREGS_esp(%esp)
    2.29 -	movl %ss, UREGS_ss(%esp)
    2.30 -	movl %es, UREGS_es(%esp)
    2.31 -	movl %ds, UREGS_ds(%esp)
    2.32 -	movl %fs, UREGS_fs(%esp)
    2.33 -	movl %gs, UREGS_gs(%esp)
    2.34 -
    2.35 -	movl UREGS_user_sizeof+8(%esp), %eax
    2.36 -	pushl %esp
    2.37 -	call *%eax
    2.38 -	add $UREGS_user_sizeof + 8, %esp
    2.39 -	ret
     3.1 --- a/xen/include/asm-x86/debugger.h	Fri Apr 29 08:17:13 2005 +0000
     3.2 +++ b/xen/include/asm-x86/debugger.h	Fri Apr 29 08:36:31 2005 +0000
     3.3 @@ -38,14 +38,13 @@
     3.4  #define DEBUGGER_trap_fatal(_v, _r) \
     3.5      if ( debugger_trap_fatal(_v, _r) ) return EXCRET_fault_fixed;
     3.6  
     3.7 -int call_with_registers(int (*f)(struct cpu_user_regs *r));
     3.8 -
     3.9  #if defined(CRASH_DEBUG)
    3.10  
    3.11  extern int __trap_to_cdb(struct cpu_user_regs *r);
    3.12  #define debugger_trap_entry(_v, _r) (0)
    3.13  #define debugger_trap_fatal(_v, _r) __trap_to_cdb(_r)
    3.14 -#define debugger_trap_immediate() call_with_registers(__trap_to_cdb)
    3.15 +/* Int3 is a trivial way to gather cpu_user_regs context. */
    3.16 +#define debugger_trap_immediate() __asm__ __volatile__ ( "int3" );
    3.17  
    3.18  #elif defined(DOMU_DEBUG)
    3.19