Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfa] Signal trampoline unwinder for hppa-hpux
Date: Fri, 21 May 2004 17:41:00 -0000	[thread overview]
Message-ID: <40AE3F20.2030205@gnu.org> (raw)
In-Reply-To: <20040520041746.GW566@tausq.org>

+/* Signal frames.  */
+
+static CORE_ADDR
+hppa_hpux_sigtramp_find_sigcontext (CORE_ADDR sp, CORE_ADDR pc)
+{
+  unsigned int insns[5];
+
+  read_memory_nobpt (pc, (char *)insns, sizeof(insns));
+
+  /* This comes from _sigreturn:
+     379a0000 ldo 0(%r28), %r26
+     6bd33fc9 stw %r19, -28(%sp)
+     20200801 ldil -40000000, %r1
+     e420e008 be,l 4(%sr7, %rr1), %sr0, %r31
+     34160116 ldi 139, %r22  */
+
+  if (extract_unsigned_integer (&insns[0], 4) != 0x379a0000
+      || extract_unsigned_integer (&insns[1], 4) != 0x6bd33fc9
+      || extract_unsigned_integer (&insns[2], 4) != 0x20200801
+      || extract_unsigned_integer (&insns[3], 4) != 0xe420e008
+      || extract_unsigned_integer (&insns[4], 4) != 0x34160116)
+    return 0;
+
+  /* We can find a ucontext_t 1352 bytes above the stack. The first
+     element of the ucontext_t is a mcontext_t (save_state_t), which
+     contains the registers we want.  */
+  return sp - 1352;
+}
Can this make use of tramp-frame for the pattern match?  For single 
stepping through trampolines to work, this code needs to be able to 
match the tramp when part way through it (what sigstep is testing).

Andrew




  parent reply	other threads:[~2004-05-21 17:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20  4:17 Randolph Chung
2004-05-20 20:46 ` Joel Brobecker
2004-05-20 20:53   ` Randolph Chung
2004-05-20 22:36   ` Joel Brobecker
2004-05-20 23:33   ` Joel Brobecker
2004-05-21 17:41 ` Andrew Cagney [this message]
2004-05-21 18:39   ` Randolph Chung
2004-05-22  1:58   ` Randolph Chung
2004-05-23  0:29     ` Randolph Chung
2004-05-24 17:38       ` Andrew Cagney
2004-05-26  5:36         ` Randolph Chung
2004-05-26 13:20           ` Daniel Jacobowitz
2004-05-22 18:30 John David Anglin

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=40AE3F20.2030205@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=randolph@tausq.org \
    /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