linux-mips
[Top] [All Lists]

Re: [MIPS] Work around bogus gcc warnings.

To: linux-mips@linux-mips.org
Subject: Re: [MIPS] Work around bogus gcc warnings.
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 06 Feb 2007 16:02:21 +0900 (JST)
Cc: ralf@linux-mips.org
In-reply-to: <S20037630AbWK3BWw/20061130012252Z+10493@ftp.linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <S20037630AbWK3BWw/20061130012252Z+10493@ftp.linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 30 Nov 2006 01:22:47 +0000, linux-mips@linux-mips.org wrote:
> Author: Ralf Baechle <ralf@linux-mips.org> Thu Nov 30 00:14:48 2006 +0000
> Commit: df300391b4833167841465189f6ef32560f0282d
> Gitweb: http://www.linux-mips.org/g/linux/df300391
> Branch: master
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> 
> ---
> 
>  arch/mips/kernel/traps.c |   43 ++++++++++++++++++++++---------------------
>  1 files changed, 22 insertions(+), 21 deletions(-)

This commit broke gdb, since any BREAK or TRAP instruction cause
SIGSEGV.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 2a932ca..cfd1785 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -708,6 +708,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
                die_if_kernel("Break instruction in kernel code", regs);
                force_sig(SIGTRAP, current);
        }
+       return;
 
 out_sigsegv:
        force_sig(SIGSEGV, current);
@@ -751,6 +752,7 @@ asmlinkage void do_tr(struct pt_regs *regs)
                die_if_kernel("Trap instruction in kernel code", regs);
                force_sig(SIGTRAP, current);
        }
+       return;
 
 out_sigsegv:
        force_sig(SIGSEGV, current);

<Prev in Thread] Current Thread [Next in Thread>