#include <syscall.h> #include <linux/unwind.h> long getunwind (void *buf, size_t buf_size);
The unwind data is copied to the buffer buf, which has size 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. The system call returns the size of the unwind data in both cases.
The first part of the unwind data contains an unwind table. The rest contains the associated unwind info in random order. The unwind table contains a table looking like:
u64 start; (64-bit address of start of function) u64 end; (64-bit address of start of function) u64 info; (BUF-relative offset to unwind info)
An entry with a START address of zero is the end of table. For more information about the format you can see the IA-64 Software Conventions and Runtime Architecture.
The system call is not available to application programs as a function; it can be called using the syscall(2) function.