---
name: "getunwind"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/getunwind"
---

# getunwind(2)

copy the unwind data to caller's buffer

## NAME

getunwind - copy the unwind data to caller's buffer

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/unwind.h>
#include <sys/syscall.h>      /* Definition of SYS_* constants */
#include <unistd.h>
```

**\[\[deprecated\]\] long syscall(**size\_t buf\_size;                             **SYS\_getunwind, void** *buf***\[***buf\_size***\],**                             **size\_t** *buf\_size***);**

## DESCRIPTION

*Note: this system call is obsolete.*

The IA-64-specific **getunwind**() system call copies the kernel's call frame unwind data into the buffer pointed to by *buf* and returns the size of the unwind data; this data describes the gate page (kernel code that is mapped into user space).

The size of the buffer *buf* is specified in *buf\_size*. The data is copied only if *buf\_size* is greater than or equal to the size of the unwind data and *buf* is not NULL; otherwise, no data is copied, and the call succeeds, returning the size that would be needed to store the unwind data.

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:

```
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)
```

An entry whose *start* value is zero indicates the end of the table. For more information about the format, see the *IA-64 Software Conventions and Runtime Architecture* manual.

## RETURN VALUE

On success, **getunwind**() returns the size of the unwind data. On error, -1 is returned and *errno* is set to indicate the error.

## ERRORS

**getunwind**() fails with the error **EFAULT** if the unwind info can't be stored in the space specified by *buf*.

## STANDARDS

Linux on IA-64.

## HISTORY

Linux 2.4.

This system call has been deprecated. The modern way to obtain the kernel's unwind data is via the [**vdso**(7)](/vdso/7.md).

## SEE ALSO

[**getauxval**(3)](/getauxval/3.md)
