summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-03-30 16:53:52 +0200
committerCorinna Vinschen <corinna@vinschen.de>2015-03-30 16:53:52 +0200
commit40b1aa400824382ba15a2545f8124deb3516b8a8 (patch)
tree368a4cf1e582f64231b770c68be82a8aa1ef540f /winsup/cygwin/exceptions.cc
parent13681ab7f16453ab523538af0f05e83da2046aa3 (diff)
downloadcygnal-40b1aa400824382ba15a2545f8124deb3516b8a8.tar.gz
cygnal-40b1aa400824382ba15a2545f8124deb3516b8a8.tar.bz2
cygnal-40b1aa400824382ba15a2545f8124deb3516b8a8.zip
Prepare to rename/reuse struct ucontext.
* cygtls.h (struct _cygtls): Convert thread_context to type CONTEXT. * exceptions.cc (_cygtls::signal_debugger): Use sizeof (CONTEXT) for size of CONTEXT copied for GDB's digestion. * include/cygwin/signal.h: Add a preliminary comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 3af9a54da..af534574b 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1,7 +1,7 @@
/* exceptions.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
This file is part of Cygwin.
@@ -1526,8 +1526,7 @@ _cygtls::signal_debugger (siginfo_t& si)
#else
c.Eip = retaddr ();
#endif
- memcpy (&thread_context, &c, (&thread_context._internal -
- (unsigned char *) &thread_context));
+ memcpy (&thread_context, &c, sizeof (CONTEXT));
/* Enough space for 32/64 bit addresses */
char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING " ffffffff ffffffffffffffff")];
__small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %d %y %p", si.si_signo,