From: Jimi Xenidis Subject: [PATCH][XEN] __trap_to_gdb should return something different Date: Fri, 22 Sep 2006 11:07:31 -0400 Message-ID: Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, xen-ppc-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --text follows this line-- This patch allows the caller to find out if the gdbstub actually did anything. Signed-off-by: Jimi Xenidis --- diff -r e0bb62683805 xen/common/gdbstub.c --- a/xen/common/gdbstub.c Fri Sep 22 11:02:47 2006 -0400 +++ b/xen/common/gdbstub.c Fri Sep 22 11:07:16 2006 -0400 @@ -481,7 +481,7 @@ __trap_to_gdb(struct cpu_user_regs *regs if ( gdb_ctx->serhnd < 0 ) { dbg_printk("Debugger not ready yet.\n"); - return 0; + return -1; } /* We rely on our caller to ensure we're only on one processor @@ -500,7 +500,7 @@ __trap_to_gdb(struct cpu_user_regs *regs { printk("WARNING WARNING WARNING: Avoiding recursive gdb.\n"); atomic_inc(&gdb_ctx->running); - return 0; + return -1; } if ( !gdb_ctx->connected )