man-pages/man2/getunwind.2.html
2021-03-31 01:06:50 +01:00

171 lines
4.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GETUNWIND</TITLE>
</HEAD><BODY>
<H1>GETUNWIND</H1>
Section: Linux Programmer's Manual (2)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
getunwind - copy the unwind data to caller's buffer
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
<B>#include &lt;<A HREF="file:///usr/include/syscall.h">syscall.h</A>&gt;</B>
<B>#include &lt;<A HREF="file:///usr/include/linux/unwind.h">linux/unwind.h</A>&gt;</B>
<B>long getunwind(void </B><I>*buf</I><B>, size_t </B><I>buf_size</I><B>);</B>
</PRE>
<P>
<I>Note</I>:
There is no glibc wrapper for this system call; see NOTES.
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<I>Note: this function is obsolete.</I>
<P>
The
IA-64-specific
<B>getunwind</B>()
system call copies the kernel's call frame
unwind data into the buffer pointed to by
<I>buf</I>
and returns the size of the unwind data;
this data describes the gate page (kernel code that
is mapped into user space).
<P>
The size of the buffer
<I>buf</I>
is specified in
<I>buf_size</I>.
The data is copied only if
<I>buf_size</I>
is greater than or equal to the size of the unwind data and
<I>buf</I>
is not NULL;
otherwise, no data is copied, and the call succeeds,
returning the size that would be needed to store the unwind data.
<P>
The first part of the unwind data contains an unwind table.
The rest contains the associated unwind information, in no particular order.
The unwind table contains entries of the following form:
<P>
u64 start; (64-bit address of start of function)
u64 end; (64-bit address of end of function)
u64 info; (BUF-relative offset to unwind info)
<P>
An entry whose
<I>start</I>
value is zero indicates the end of the table.
For more information about the format, see the
<I>IA-64 Software Conventions and Runtime Architecture</I>
manual.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
On success,
<B>getunwind</B>()
returns the size of the unwind data.
On error, -1 is returned and
<I>errno</I>
is set to indicate the error.
<A NAME="lbAF">&nbsp;</A>
<H2>ERRORS</H2>
<B>getunwind</B>()
fails with the error
<B>EFAULT</B>
if the unwind info can't be stored in the space specified by
<I>buf</I>.
<A NAME="lbAG">&nbsp;</A>
<H2>VERSIONS</H2>
This system call is available since Linux 2.4.
<A NAME="lbAH">&nbsp;</A>
<H2>CONFORMING TO</H2>
This system call is Linux-specific,
and is available only on the IA-64 architecture.
<A NAME="lbAI">&nbsp;</A>
<H2>NOTES</H2>
This system call has been deprecated.
The modern way to obtain the kernel's unwind data is via the
<B><A HREF="/cgi-bin/man/man2html?7+vdso">vdso</A></B>(7).
<P>
Glibc does not provide a wrapper for this system call;
in the unlikely event that you want to call it, use
<B><A HREF="/cgi-bin/man/man2html?2+syscall">syscall</A></B>(2).
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?3+getauxval">getauxval</A></B>(3)
<A NAME="lbAK">&nbsp;</A>
<H2>COLOPHON</H2>
This page is part of release 5.05 of the Linux
<I>man-pages</I>
project.
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">RETURN VALUE</A><DD>
<DT id="5"><A HREF="#lbAF">ERRORS</A><DD>
<DT id="6"><A HREF="#lbAG">VERSIONS</A><DD>
<DT id="7"><A HREF="#lbAH">CONFORMING TO</A><DD>
<DT id="8"><A HREF="#lbAI">NOTES</A><DD>
<DT id="9"><A HREF="#lbAJ">SEE ALSO</A><DD>
<DT id="10"><A HREF="#lbAK">COLOPHON</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:32 GMT, March 31, 2021
</BODY>
</HTML>