From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: David Daney <ddaney.cavm@gmail.com>
Cc: Luis Machado <lgustavo@codesourcery.com>,
gdb-patches@sourceware.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] Expect SI_KERNEL si_code for a MIPS software breakpoint trap
Date: Fri, 18 Sep 2015 18:36:00 -0000 [thread overview]
Message-ID: <alpine.LFD.2.20.1509181914150.10647@eddie.linux-mips.org> (raw)
In-Reply-To: <55FC441F.6080804@gmail.com>
On Fri, 18 Sep 2015, David Daney wrote:
> We have to be very careful changing the ABI here.
>
> This is used by almost all userspace code to detect integer division by zero.
> Many things like the libgcj runtime use this to generate runtime exceptions,
> we don't want to break them.
No worries here, integer division by 0 and overflow use `BREAK 7' and
`BREAK 6' respectively (or corresponding trap instructions) and these
cases are already handled correctly, as I implemented many years ago for
regular MIPS user code and recently fixed for MIPS16 code (and less
recently for microMIPS code as well). Have a look at `do_trap_or_bp' in
arch/mips/kernel/traps.c for details.
There's no collision with `BREAK 5'; Linux code would of course have to
treat 5 as an unrecognised for traps and would therefore handle the case
right in `do_bp' like with kprobe breakpoints.
I hope this clears your concerns.
Maciej
next prev parent reply other threads:[~2015-09-18 18:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 16:11 Luis Machado
2015-09-18 16:56 ` Maciej W. Rozycki
2015-09-18 17:04 ` David Daney
2015-09-18 18:36 ` Maciej W. Rozycki [this message]
2016-02-09 14:30 ` Luis Machado
2016-02-09 21:01 ` Maciej W. Rozycki
2016-02-10 12:53 ` Luis Machado
2016-02-15 23:50 ` Maciej W. Rozycki
2016-02-16 0:30 ` Pedro Alves
2016-02-19 16:21 ` Maciej W. Rozycki
2016-02-24 11:52 ` Pedro Alves
2016-02-16 0:57 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.20.1509181914150.10647@eddie.linux-mips.org \
--to=macro@linux-mips.org \
--cc=ddaney.cavm@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox