Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@imgtec.com>
To: Luis Machado <lgustavo@codesourcery.com>
Cc: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH, v3] Expect SI_KERNEL or TRAP_BRKPT si_code values for MIPS breakpoint traps
Date: Tue, 23 Feb 2016 00:01:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.00.1602222313000.15885@tp.orcam.me.uk> (raw)
In-Reply-To: <56CB9042.8090809@codesourcery.com>

On Mon, 22 Feb 2016, Luis Machado wrote:

> > > +   The MIPS kernel uses the default si_code of SI_KERNEL for software
> > > +   breakpoints, hardware watchpoints and SIGTRAP's in general.
> > 
> > If we get this for both software breakpoints and hardware watchpoints,
> > then it seems to me that this change still leaves watchpoints broken,
> > as I can't see how check_stopped_by_watchpoint is reached, in either
> > gdb/linux-nat.c or gdbserver/linux-low.c.
> > 
> > Also, "and SIGTRAP's in general." seems wrong.  I hope that that's
> > not the case for user-sent SIGTRAPs?
> 
> I'll defer that to Maciej, as he knows what the kernel emits here. From his
> descriptions, it seems MIPS' kernel pretty much just uses the default si_code
> of SI_KERNEL.

 Yes, for signals produced by the kernel itself, i.e. with `__send_signal' 
from kernel/signal.c with the `info' argument set to SEND_SIG_PRIV, which 
the various calls to `force_sig' from arch/mips/kernel/traps.c boil down 
to.  To have the code set to something else `force_sig_info' is used, in 
the interpretation of `BREAK 6' and `BREAK 7' instructions among other 
cases.  This is also how kill(2) works, setting the code to SI_USER for 
user-issued signals, which is generic in Linux so any architecture will do 
the same here.

  Maciej


  reply	other threads:[~2016-02-23  0:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 22:20 Luis Machado
2016-02-22 22:41 ` Pedro Alves
2016-02-22 22:48   ` Luis Machado
2016-02-23  0:01     ` Maciej W. Rozycki [this message]
2016-02-23  2:00   ` Luis Machado
2016-02-23 21:09     ` Maciej W. Rozycki
2016-02-24 12:55     ` Pedro Alves
2016-02-24 13:21       ` Luis Machado
2016-02-24 14:44         ` Pedro Alves
2016-02-24 16:46           ` 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.DEB.2.00.1602222313000.15885@tp.orcam.me.uk \
    --to=macro@imgtec.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    --cc=palves@redhat.com \
    /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