From: Weihaw CHUANG <wchuang@cs.ucsd.edu>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] location of statcked registers after exception
Date: Thu, 03 May 2001 23:51:16 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005533@msgid-missing> (raw)
Hi,
I'm using the ptrace interface to single step a program (David Mosberger's
utrace.c that he posted recently). Through this I'm able to get much of
the user register space. However I'm having problems getting stacked
registers.
From what I understand and please correct me where I'm wrong, stacked
registers are "cover"'ed after interrupt (in this case single step
exception) and are pushed onto the memory stack. Through ptrace I can get
access to that memory as follows:
Assume that int cfm_sof contains CFM.sof, and regid is the GR register
number, ie R32 is regid2
int offset = cfm.sof - (regid-32)
unsigned long long = ptrace(PTRACED_PEEKUSER, pid, PT_AR_BSP, 0);
regvalue = ptrace(PTRACE_PEEKDATA, pid,
(long ) ia64_rse_skip_regs((long*) bsp, offset), 0);
That is, does this diagram make sense?
alloc r35 = ar.pfs, 0, 3, 0, 0
reg stack
| r32 | r34 | r35 | (r35 is top of reg stack)
negative offset from bsp is:
3 2 1 bsp
Many thanks,
-Wei
reply other threads:[~2001-05-03 23:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-ia64-105590693005533@msgid-missing \
--to=wchuang@cs.ucsd.edu \
--cc=linux-ia64@vger.kernel.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