]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/getunwind.2
_syscall.2, clock_getres.2, clone.2, copy_file_range.2, create_module.2, delete_modul...
[thirdparty/man-pages.git] / man2 / getunwind.2
CommitLineData
4288c618
MM
1.\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
2.\" Written by Marcela Maslanova <mmaslano@redhat.com>
31cc8387 3.\" and Copyright 2013, Michael Kerrisk <mtk.manpages@gmail.com>
4288c618 4.\"
93015253 5.\" %%%LICENSE_START(VERBATIM)
4288c618
MM
6.\" Permission is granted to make and distribute verbatim copies of this
7.\" manual provided the copyright notice and this permission notice are
8.\" preserved on all copies.
9.\"
10.\" Permission is granted to copy and distribute modified versions of this
11.\" manual under the conditions for verbatim copying, provided that the
12.\" entire resulting derived work is distributed under the terms of a
13.\" permission notice identical to this one.
14.\"
15.\" Since the Linux kernel and libraries are constantly changing, this
16.\" manual page may be incorrect or out-of-date. The author(s) assume no
17.\" responsibility for errors or omissions, or for damages resulting from
18.\" the use of the information contained herein. The author(s) may not
19.\" have taken the same level of care in the production of this manual,
20.\" which is licensed free of charge, as they might when working
21.\" professionally.
22.\"
23.\" Formatted or processed versions of this manual, if unaccompanied by
24.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 25.\" %%%LICENSE_END
4288c618 26.\"
b8efb414 27.TH GETUNWIND 2 2016-10-08 Linux "Linux Programmer's Manual"
4288c618
MM
28.SH NAME
29getunwind \- copy the unwind data to caller's buffer
4288c618
MM
30.SH SYNOPSIS
31.nf
32.B #include <syscall.h>
33.B #include <linux/unwind.h>
68e4db0a 34.PP
fe828902 35.BI "long getunwind(void " *buf ", size_t " buf_size );
4288c618 36.fi
dbfe9c70 37.PP
fe828902
MK
38.IR Note :
39There is no glibc wrapper for this system call; see NOTES.
4288c618 40.SH DESCRIPTION
fe828902
MK
41.I Note: this function is obsolete.
42
4288c618 43The
fe828902
MK
44IA-64-specific
45.BR getunwind ()
46system call copies the kernel's call frame
47unwind data into the buffer pointed to by
48.I buf
49and returns the size of the unwind data;
50this data describes the gate page (kernel code that
4288c618
MM
51is mapped into user space).
52
fe828902
MK
53The size of the buffer
54.I buf
55is specified in
56.IR buf_size .
57The data is copied only if
58.I buf_size
59is greater than or equal to the size of the unwind data and
60.I buf
61is not NULL;
62otherwise, no data is copied, and the call succeeds,
63returning the size that would be needed to store the unwind data.
4288c618 64
b072a788 65The first part of the unwind data contains an unwind table.
fe828902
MK
66The rest contains the associated unwind information, in no particular order.
67The unwind table contains entries of the following form:
4288c618
MM
68
69.nf
5a6194a4
MK
70 u64 start; (64-bit address of start of function)
71 u64 end; (64-bit address of end of function)
72 u64 info; (BUF-relative offset to unwind info)
4288c618
MM
73.fi
74
fe828902 75An entry whose
cfd32c7e 76.I start
fe828902
MK
77value is zero indicates the end of the table.
78For more information about the format, see the
79.I IA-64 Software Conventions and Runtime Architecture
80manual.
47297adb 81.SH RETURN VALUE
fe828902
MK
82On success,
83.BR getunwind ()
eee740e3 84returns the size of the unwind data.
fe828902
MK
85On error, \-1 is returned and
86.I errno
87is set to indicate the error.
4288c618 88.SH ERRORS
fe828902
MK
89.BR getunwind ()
90fails with the error
4288c618
MM
91.B EFAULT
92if the unwind info can't be stored in the space specified by
b072a788 93.IR buf .
fe828902
MK
94.SH VERSIONS
95This system call is available since Linux 2.4.
fe828902 96.SH CONFORMING TO
76c637e1 97This system call is Linux-specific,
fe828902 98and is available only on the IA-64 architecture.
fe828902
MK
99.SH NOTES
100This system call has been deprecated.
3a03cb85
MK
101The modern way to obtain the kernel's unwind data is via the
102.BR vdso (7).
4288c618 103
fe828902
MK
104Glibc does not provide a wrapper for this system call;
105in the unlikely event that you want to call it, use
106.BR syscall (2).
47297adb 107.SH SEE ALSO
fe828902 108.BR getauxval (3)