Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Marcel Moolenaar <marcel@xcllnt.net>
To: "J. Johnston" <jjohnstn@redhat.com>
Cc: Kevin Buettner <kevinb@redhat.com>,
	gdb-patches@sources.redhat.com,
	Andrew Cagney <ac131313@redhat.com>,
	Daniel Jacobowitz <drow@mvista.com>
Subject: Re: RFA: ia64 portion of libunwind patch updated
Date: Mon, 17 Nov 2003 22:32:00 -0000	[thread overview]
Message-ID: <20031117223152.GA60322@ns1.xcllnt.net> (raw)
In-Reply-To: <3FB9404B.8070201@redhat.com>

On Mon, Nov 17, 2003 at 04:40:27PM -0500, J. Johnston wrote:
> Patch checked in.  Thanks.

Cool! Thanks for the effort. Now I can play with it on FreeBSD
as well.

BTW: libunwind-0.93 doesn't compile on Red Hat AS 2.1 due to
sigcontext changes. Does it make sense to spend some time
trying to fix that or is AS 2.1 really too old for that?
Or can we use an older version of libunwind there (IOW is
the API compatible)?

Some background information:

\begin{libunwind-build-log}
gcc -DHAVE_CONFIG_H -I. -I../../../src/libunwind-0.93/src -I../include -I../../../src/libunwind-0.93/include -I. -D_GNU_SOURCE -DDEBUG -g -Wall -Wsign-compare -c ../../../src/libunwind-0.93/src/ia64/Ginit-ia64.c -MT Ginit-ia64.lo -MD -MP -MF .deps/Ginit-ia64.TPlo  -fPIC -o .libs/Ginit-ia64.o
../../../src/libunwind-0.93/src/ia64/Ginit-ia64.c: In function `uc_addr':
../../../src/libunwind-0.93/src/ia64/Ginit-ia64.c:110: structure has no member named `sc_rbs_base'
gmake[2]: *** [Ginit-ia64.lo] Error 1
gmake[2]: Leaving directory `/proj/eclipse/extra/marcel/unwind/obj/libunwind-0.93/src'
gmake[1]: *** [all] Error 2
\end{libunwind-build-log}

The sigcontext between AS3.0 and AS2.1 changed in the following way:

\begin{diff}
--- sigcontext.h.as2.1  2003-11-17 14:26:11.000000000 -0800
+++ sigcontext.h.as3.0  2003-11-17 14:26:36.000000000 -0800
@@ -2,13 +2,14 @@
 #define _ASM_IA64_SIGCONTEXT_H

 /*
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co
+ * Copyright (C) 1998, 1999, 2001 David Mosberger-Tang <davidm@hpl.hp.com>
  */

 #include <asm/fpu.h>
+#include <asm/signal.h>

-#define IA64_SC_FLAG_ONSTACK_BIT               1       /* is handler running on signal stack? */
+#define IA64_SC_FLAG_ONSTACK_BIT               0       /* is handler running on signal stack? */
 #define IA64_SC_FLAG_IN_SYSCALL_BIT            1       /* did signal interrupt a syscall? */
 #define IA64_SC_FLAG_FPH_VALID_BIT             2       /* is state in f[32]-f[127] valid? */

@@ -18,6 +19,19 @@

 # ifndef __ASSEMBLY__

+/*
+ * Note on handling of register backing store: sc_ar_bsp contains the address that would
+ * be found in ar.bsp after executing a "cover" instruction the context in which the
+ * signal was raised.  If signal delivery required switching to an alternate signal stack
+ * (sc_rbs_base is not NULL), the "dirty" partition (as it would exist after executing the
+ * imaginary "cover" instruction) is backed by the *alternate* signal stack, not the
+ * original one.  In this case, sc_rbs_base contains the base address of the new register
+ * backing store.  The number of registers in the dirty partition can be calculated as:
+ *
+ *   ndirty = ia64_rse_num_regs(sc_rbs_base, sc_rbs_base + (sc_loadrs >> 16))
+ *
+ */
+
 struct sigcontext {
        unsigned long           sc_flags;       /* see manifest constants above */
        unsigned long           sc_nat;         /* bit i == 1 iff scratch reg gr[i] is a NaT */
@@ -40,8 +54,12 @@
        unsigned long           sc_gr[32];      /* general registers (static partition) */
        struct ia64_fpreg       sc_fr[128];     /* floating-point registers */

-       unsigned long           sc_rsvd[16];    /* reserved for future use */
+       unsigned long           sc_rbs_base;    /* NULL or new base of sighandler's rbs */
+       unsigned long           sc_loadrs;      /* see description above */

+       unsigned long           sc_ar25;        /* cmp8xchg16 uses this */
+       unsigned long           sc_ar26;        /* rsvd for scratch use */
+       unsigned long           sc_rsvd[12];    /* reserved for future use */
        /*
         * The mask must come last so we can increase _NSIG_WORDS
         * without breaking binary compatibility.
\end{diff}

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel@xcllnt.net


  reply	other threads:[~2003-11-17 22:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-24  0:11 RFA: ia64 portion of libunwind patch J. Johnston
2003-10-24 17:57 ` Kevin Buettner
2003-10-24 18:20   ` J. Johnston
2003-10-24 18:56     ` Kevin Buettner
2003-10-24 21:53       ` Marcel Moolenaar
2003-10-24 23:58         ` Kevin Buettner
2003-10-28 23:53       ` J. Johnston
2003-10-29  1:28         ` Daniel Jacobowitz
2003-10-29  4:48           ` Kevin Buettner
2003-10-29 18:43             ` J. Johnston
2003-10-29 22:48           ` Andrew Cagney
2003-11-04 19:09             ` J. Johnston
2003-11-04 20:48               ` Kevin Buettner
2003-11-06 17:21               ` RFA: ia64 portion of libunwind patch updated J. Johnston
2003-11-14 21:24                 ` J. Johnston
2003-11-17 17:01                   ` Kevin Buettner
2003-11-17 17:03                     ` Kevin Buettner
2003-11-17 17:05                 ` Kevin Buettner
2003-11-17 21:40                   ` J. Johnston
2003-11-17 22:32                     ` Marcel Moolenaar [this message]
2003-11-06 20:03               ` [commit] Fix two xfer partial bugs; Was; RFA: ia64 portion of libunwind patch Andrew Cagney
2003-11-06 20:12                 ` J. Johnston
2003-11-06 22:32               ` [patch/rfc] Add child_to_xfer_partial; Was: " Andrew Cagney
2003-11-06 22:47                 ` J. Johnston
2003-11-07 21:40                   ` Andrew Cagney
2003-11-07  1:04                 ` Kevin Buettner
2003-11-14  0:26               ` RFA: " J. Johnston
2003-11-14  1:17                 ` Kevin Buettner
2003-11-14 20:49                   ` J. Johnston
2003-10-29 23:28         ` Andrew Cagney
2003-11-02 20:39         ` Elena Zannoni
2003-10-29 15:18 ` Andrew Cagney

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=20031117223152.GA60322@ns1.xcllnt.net \
    --to=marcel@xcllnt.net \
    --cc=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jjohnstn@redhat.com \
    --cc=kevinb@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