+/* The Solaris signal trampolines reside in libc. For normal signals,
+ the function `sigacthandler' is used. This signal trampoline will
+ call the signal handler using the System V calling convention,
+ where the third argument is a pointer to an instance of
+ `ucontext_t', which has a member `uc_mcontext' that contains the
+ saved registers. Incidentally, the kernel passes the `ucontext_t'
+ pointer as the third argument of the signal trampoline too, and
+ `sigacthandler' simply passes it on. However, if you link your
+ program with "-L/usr/ucblib -R/usr/ucblib -lucb", the function
+ `ucbsigvechandler' will be used, which invokes the using the BSD
+ convention, where the third argument is a pointer to an instance of
+ `struct sigcontext'. It is the `ucbsigvechandler' function that
+ converts the `ucontext_t' to a `sigcontext', and back. Unless the
+ signal handler modifies the `struct sigcontext' we can safely
+ ignore this. */
+
+static int
+sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name)
+{
+ return (name && (strcmp (name, "sigacthandler") == 0
+ || strcmp (name, "ucbsigvechandler") == 0
+ || strcmp (name, "__sighndlr") == 0));
+}
+
+/* Return whether THIS_FRAME corresponds to a Solaris sigtramp routine. */
+
+int
+sol2_sigtramp_p (struct frame_info *this_frame)
+{
+ CORE_ADDR pc = get_frame_pc (this_frame);
+ const char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ return sol2_pc_in_sigtramp (pc, name);
+}
+
+static CORE_ADDR