public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH 3/3] Set mcontext.cr2 to the faulting address
Date: Thu, 09 Apr 2015 14:54:00 -0000	[thread overview]
Message-ID: <20150409145445.GA6901@calimero.vinschen.de> (raw)
In-Reply-To: <1428585205-14420-4-git-send-email-jon.turney@dronecode.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]

Hi Jon,


Just a formatting nit:

On Apr  9 14:13, Jon TURNEY wrote:
> 	* exceptions.cc (call_signal_handler): Set mcontext.cr2 to the
> 	faulting address.
> 
> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
> ---
>  winsup/cygwin/ChangeLog     | 5 +++++
>  winsup/cygwin/exceptions.cc | 4 ++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
> index 0223052..919122e 100644
> --- a/winsup/cygwin/exceptions.cc
> +++ b/winsup/cygwin/exceptions.cc
> @@ -1521,6 +1521,10 @@ _cygtls::call_signal_handler ()
>  
>            context.uc_sigmask = context.uc_mcontext.oldmask = this_oldmask;
>  
> +          context.uc_mcontext.cr2 = (thissi.si_signo == SIGSEGV
> +                                     || thissi.si_signo == SIGBUS)
> +            ? (uintptr_t) thissi.si_addr : 0;

Please use leading TABs with ts=8 throughout, and I'd prefer if the ?
in the above expression is right under the paren two lines above, like
this:

	  context.uc_mcontext.cr2 = (thissi.si_signo == SIGSEGV
				     || thissi.si_signo == SIGBUS)
				    ? (uintptr_t) thissi.si_addr : 0;

With these changes, all patches are ok to push.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-04-09 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 13:13 [PATCH 0/3] signal handler ucontext improvements Jon TURNEY
2015-04-09 13:13 ` [PATCH 2/3] Only construct ucontext for SA_SIGINFO signal handlers Jon TURNEY
2015-04-09 13:13 ` [PATCH 1/3] Initialize context before RtlContextCapture Jon TURNEY
2015-04-09 13:13 ` [PATCH 3/3] Set mcontext.cr2 to the faulting address Jon TURNEY
2015-04-09 14:54   ` Corinna Vinschen [this message]

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=20150409145445.GA6901@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-patches@cygwin.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).