| 1 |
.\" Copyright 2006, Red Hat, Inc. |
| 2 |
.\" Copyright 2013, Michael Kerrisk <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 6 |
.\" |
| 7 |
.TH getunwind 2 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
getunwind \- copy the unwind data to caller's buffer |
| 10 |
.SH LIBRARY |
| 11 |
Standard C library |
| 12 |
.RI ( libc ,\~ \-lc ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.B #include <linux/unwind.h> |
| 16 |
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" |
| 17 |
.B #include <unistd.h> |
| 18 |
.P |
| 19 |
.BR "[[deprecated]] long syscall(" "size_t buf_size;" |
| 20 |
.BI " SYS_getunwind, void " buf [ buf_size ], |
| 21 |
.BI " size_t " buf_size ); |
| 22 |
.fi |
| 23 |
.SH DESCRIPTION |
| 24 |
.I Note: this system call is obsolete. |
| 25 |
.P |
| 26 |
The |
| 27 |
IA-64-specific |
| 28 |
.BR getunwind () |
| 29 |
system call copies the kernel's call frame |
| 30 |
unwind data into the buffer pointed to by |
| 31 |
.I buf |
| 32 |
and returns the size of the unwind data; |
| 33 |
this data describes the gate page (kernel code that |
| 34 |
is mapped into user space). |
| 35 |
.P |
| 36 |
The size of the buffer |
| 37 |
.I buf |
| 38 |
is specified in |
| 39 |
.IR buf_size . |
| 40 |
The data is copied only if |
| 41 |
.I buf_size |
| 42 |
is greater than or equal to the size of the unwind data and |
| 43 |
.I buf |
| 44 |
is not NULL; |
| 45 |
otherwise, no data is copied, and the call succeeds, |
| 46 |
returning the size that would be needed to store the unwind data. |
| 47 |
.P |
| 48 |
The first part of the unwind data contains an unwind table. |
| 49 |
The rest contains the associated unwind information, in no particular order. |
| 50 |
The unwind table contains entries of the following form: |
| 51 |
.P |
| 52 |
.in +4n |
| 53 |
.EX |
| 54 |
u64 start; (64\-bit address of start of function) |
| 55 |
u64 end; (64\-bit address of end of function) |
| 56 |
u64 info; (BUF\-relative offset to unwind info) |
| 57 |
.EE |
| 58 |
.in |
| 59 |
.P |
| 60 |
An entry whose |
| 61 |
.I start |
| 62 |
value is zero indicates the end of the table. |
| 63 |
For more information about the format, see the |
| 64 |
.I IA-64 Software Conventions and Runtime Architecture |
| 65 |
manual. |
| 66 |
.SH RETURN VALUE |
| 67 |
On success, |
| 68 |
.BR getunwind () |
| 69 |
returns the size of the unwind data. |
| 70 |
On error, \-1 is returned and |
| 71 |
.I errno |
| 72 |
is set to indicate the error. |
| 73 |
.SH ERRORS |
| 74 |
.BR getunwind () |
| 75 |
fails with the error |
| 76 |
.B EFAULT |
| 77 |
if the unwind info can't be stored in the space specified by |
| 78 |
.IR buf . |
| 79 |
.SH STANDARDS |
| 80 |
Linux on IA-64. |
| 81 |
.SH HISTORY |
| 82 |
Linux 2.4. |
| 83 |
.P |
| 84 |
This system call has been deprecated. |
| 85 |
The modern way to obtain the kernel's unwind data is via the |
| 86 |
.BR vdso (7). |
| 87 |
.SH SEE ALSO |
| 88 |
.BR getauxval (3) |