Change domain_crash to say where it was called from.
authorsos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk>
Wed, 25 Jan 2006 16:14:19 +0000 (17:14 +0100)
committersos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk>
Wed, 25 Jan 2006 16:14:19 +0000 (17:14 +0100)
Signed-off-by: Steven Smith, sos22@cam.ac.uk
xen/arch/x86/x86_32/entry.S
xen/common/domain.c
xen/include/xen/sched.h

index e178d7383e9874ba56f55ac50c7327c70eb364d3..4e1805dd5a6608ea3c6f56c1a0304c0b3aa237be 100644 (file)
@@ -477,6 +477,14 @@ nvm86_3:/* Rewrite our stack frame and return to ring 1. */
         .long FLT24,domain_crash_synchronous , FLT25,domain_crash_synchronous
 .previous
 
+domain_crash_synchronous_string:
+       .asciz "domain_crash_sync from entry.S %lx\n"
+       
+domain_crash_synchronous:
+       pushl $domain_crash_synchronous_string
+       call printf
+       jmp __domain_crash_synchronous
+       
         ALIGN
 process_guest_exception_and_events:
         leal VCPU_trap_bounce(%ebx),%edx
index bc6eebe41c17dc362bfb7bad5d7e1b9f895bcbab..881133b7d6b65053037840f8c44ea00a4eb55722 100644 (file)
@@ -139,7 +139,7 @@ void domain_kill(struct domain *d)
 }
 
 
-void domain_crash(struct domain *d)
+void __domain_crash(struct domain *d)
 {
     if ( d == current->domain )
     {
@@ -157,9 +157,9 @@ void domain_crash(struct domain *d)
 }
 
 
-void domain_crash_synchronous(void)
+void __domain_crash_synchronous(void)
 {
-    domain_crash(current->domain);
+    __domain_crash(current->domain);
     for ( ; ; )
         do_softirq();
 }
index 7005177f4c5c53f054834c3670740da7095b2f5e..4cb1989d7672979dd673bc5dc8fb683dcc2701cc 100644 (file)
@@ -238,13 +238,21 @@ extern void domain_pause_for_debugger(void);
  * caller is the specified domain. The domain is not synchronously descheduled
  * from any processor.
  */
-extern void domain_crash(struct domain *d);
+extern void __domain_crash(struct domain *d);
+#define domain_crash(d) do {                                              \
+    printf("domain_crash called from %s:%d\n", __FILE__, __LINE__);       \
+    __domain_crash(d);                                                    \
+} while (0)
 
 /*
  * Mark current domain as crashed and synchronously deschedule from the local
  * processor. This function never returns.
  */
-extern void domain_crash_synchronous(void) __attribute__((noreturn));
+extern void __domain_crash_synchronous(void) __attribute__((noreturn));
+#define domain_crash_synchronous() do {                                   \
+    printf("domain_crash_sync called from %s:%d\n", __FILE__, __LINE__);  \
+    __domain_crash_synchronous();                                         \
+} while (0)
 
 void new_thread(struct vcpu *d,
                 unsigned long start_pc,