From: "Zorn, Brian E" <brian.e.zorn@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] IA64 Stack Unwind on RedHat Linux
Date: Sat, 07 Jul 2001 17:10:37 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005824@msgid-missing> (raw)
Hi All,
In RedHat Linux, I'm working with a software vendor who is looking for
information on an API for finding the stack unwind table, provided by the
dynamic loader. If this is available now, any information on where to get
it and how to use it would be greatly appreciated. If this is not currently
available, could someone please provide me with an expected date when it
will be, so that the vendor can plan their product roadmap more effectively?
Here's some further clarification of the issue from the software vendor:
The information we need is the procedure/API for finding the unwind table
associated with a given instruction pointer under Linux for IA-64. The
documentation on IA-64 stack unwinding says this information is necessary
for stack unwinding, but is OS-specific and not given in the Intel manuals:
Specifically, in Section 11.1.2 of the IA-64 Software Conventions and
Runtime Architecture Guide, it says "...the dynamic loader is expected to
provide an API for finding the unwind table, given a known IP. This API is
specific to the operating environment, and is not described here."
Here's a description of what they did on Linux/x86:
When someone allocates memory we get a list of address. Each address is the
return address to the previous stack frame. The entire list should
describe the entire calls stack of the call to "malloc". When an
"interesting event" happens to the memory allocated, we go through the list
of pointers. For each address we find the relevant symbol, module, and
line information if available.
This is roughly what we do on linux/x86
void* getSp() {
asm("mov %ebp, %eax");
}
void *unwindStack() {
void * sp = getSp;
void stack[100];
int i = 0;
// limit is some value beyond which the stack is not interesting
while (sp > limit) {
// The return address is the second word of the stack frame
stack[i++] = sp + 1;
// The first word of the stack frame is the address of the
previous stack frame.
sp = *(void **)sp;
}
return stack;
}
**********************************************
Thanks for your help,
Brian E. Zorn
Application Engineer Phone: 503-264-6218
Core eTools - Oregon email:
brian.e.zorn@intel.com <mailto:brian.e.zorn@intel.com>
Solutions Enabling Group
Intel Corporation
reply other threads:[~2001-07-07 17:10 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-105590693005824@msgid-missing \
--to=brian.e.zorn@intel.com \
--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