]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/getunwind.2
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man2 / getunwind.2
1 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
2 .\" Written by Marcela Maslanova <mmaslano@redhat.com>
3 .\" and Copyright 2013, Michael Kerrisk <mtk.manpages@gmail.com>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH getunwind 2 (date) "Linux man-pages (unreleased)"
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 .PP
19 .BI "[[deprecated]] long syscall(SYS_getunwind, void " *buf \
20 ", size_t " buf_size );
21 .fi
22 .SH DESCRIPTION
23 .I Note: this system call is obsolete.
24 .PP
25 The
26 IA-64-specific
27 .BR getunwind ()
28 system call copies the kernel's call frame
29 unwind data into the buffer pointed to by
30 .I buf
31 and returns the size of the unwind data;
32 this data describes the gate page (kernel code that
33 is mapped into user space).
34 .PP
35 The size of the buffer
36 .I buf
37 is specified in
38 .IR buf_size .
39 The data is copied only if
40 .I buf_size
41 is greater than or equal to the size of the unwind data and
42 .I buf
43 is not NULL;
44 otherwise, no data is copied, and the call succeeds,
45 returning the size that would be needed to store the unwind data.
46 .PP
47 The first part of the unwind data contains an unwind table.
48 The rest contains the associated unwind information, in no particular order.
49 The unwind table contains entries of the following form:
50 .PP
51 .in +4n
52 .EX
53 u64 start; (64\-bit address of start of function)
54 u64 end; (64\-bit address of end of function)
55 u64 info; (BUF\-relative offset to unwind info)
56 .EE
57 .in
58 .PP
59 An entry whose
60 .I start
61 value is zero indicates the end of the table.
62 For more information about the format, see the
63 .I IA-64 Software Conventions and Runtime Architecture
64 manual.
65 .SH RETURN VALUE
66 On success,
67 .BR getunwind ()
68 returns the size of the unwind data.
69 On error, \-1 is returned and
70 .I errno
71 is set to indicate the error.
72 .SH ERRORS
73 .BR getunwind ()
74 fails with the error
75 .B EFAULT
76 if the unwind info can't be stored in the space specified by
77 .IR buf .
78 .SH VERSIONS
79 This system call is available since Linux 2.4.
80 .SH STANDARDS
81 This system call is Linux-specific,
82 and is available only on the IA-64 architecture.
83 .SH NOTES
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)