linux-mips
[Top] [All Lists]

Re: [MIPS] Fix handling of trap and breakpoint instructions

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [MIPS] Fix handling of trap and breakpoint instructions
From: David Daney <ddaney@avtrex.com>
Date: Mon, 21 Apr 2008 08:47:52 -0700
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20080421.100721.07644724.nemoto@toshiba-tops.co.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <S20041689AbYDUAiN/20080421003813Z+6727@ftp.linux-mips.org> <20080421.100721.07644724.nemoto@toshiba-tops.co.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.12 (X11/20080226)
Atsushi Nemoto wrote:
Author: Ralf Baechle <ralf@linux-mips.org> Sun Apr 20 16:28:54 2008 +0100
Commit: 5881bb0de64887a60f7f49922cf73a3b4d40fc01
Gitweb: http://www.linux-mips.org/g/linux/5881bb0d
Branch: master

You must drop left shift of this line too.

                if (bcode == (BRK_DIVZERO << 10))


Note that there has been some confusion about break codes in gas over the years. Ancient versions (I am not sure which) generated different break codes than recent versions.

Before changing it make sure that you don't break existing user space code.

One problem (fixed around 2.4.25 or so) was the integer division by zero in user space would result in SIGTRAP instead of SIGFPE. If you change the break code handling you should verify that you don't break this.

David Daney

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