getunwind(2)
π getunwind(2) β the manual page, but make it slay π
okay so bestie, we're talking about getunwind β a system call that copies the kernel's unwind data into your buffer. she's an icon, she's also obsolete, and she only ever worked on IA-64, so likeβ¦ niche queen behavior. let's get into it π§
β¨ 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);
not the [[deprecated]] right there in the signature, she's literally wearing a warning label π
π DESCRIPTION π
Note: this system call is obsolete. periodt.
The IA-64-specific getunwind() system call copies the kernel's call frame unwind data into the buffer pointed to by buf, and it returns the size of the unwind data. that data describes the gate page β which is kernel code that's mapped into user space. iykyk β¨
The size of the buffer buf is specified in buf_size. here's the tea on when the copy actually happens: 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 gets copied, the call still succeeds, and it just returns the size that would be needed to store the unwind data. it's giving "lemme just tell you how much room you'd need, bestie" π
π«Ά the layout, explained π«Ά
The first part of the unwind data contains an unwind table. The rest contains the associated unwind information, in no particular order (chaotic, honestly, and we respect it π). 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. that's the little "no more, we're done here" signal π
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. (as is tradition, and honestly iconic) π
π ERRORS π
EFAULTβgetunwind()fails with this when the unwind info can't be stored in the space you specified withbuf.
π STANDARDS π
Linux on IA-64. that's the whole vibe check, that's it π¦
π°οΈ HISTORY π°οΈ
Linux 2.4. a real vintage moment π
This system call has been deprecated. The modern way to obtain the kernel's unwind data is via vdso(7). so likeβ¦ use that instead, bestie, no cap π
π SEE ALSO π
and that's the whole page, you ate that π this was pulled straight from the Linux man-pages 6.20, dated 2026-02-08 β shoutout to the man-pages girls for keeping the receipts, mwah πβ¨π«Ά
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2006, Red Hat, Inc
- Copyright 2013, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms