内容简介
#include <syscall.h> #include <linux/unwind.h> long getunwind (void *buf, size_t buf_size) |
描述
The%uA0sys_getunwind%uA0function returns size of unwind table, which describes gate page (kernel code that is mapped into user space).The unwind data is copied to the buffer%uA0buf, which has size%uA0buf_size. The data is copied only if%uA0buf_size%uA0is greater than or equal to the size of the unwind data and%uA0buf%uA0is 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:
%uA0%uA0%uA0%uA0%uA0%uA0%uA0%uA0u64 start (64-bit address of start of function) %uA0%uA0%uA0%uA0%uA0%uA0%uA0%uA0u64 end (64-bit address of start of function) %uA0%uA0%uA0%uA0%uA0%uA0%uA0%uA0u64 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.
%uA0
返回值
sys_getunwind%uA0函数返回展开表的大小。%uA0
错误
The%uA0sys_getunwind%uA0function fails with%uA0EFAULT%uA0if the unwind info can’t be stored in the space specified by the%uA0buf%uA0argument.%uA0
可用性
这个系统调用是仅适用于IA-64架构。%uA0
实际应用信息
This system call has been deprecated. It’s highly recommended to get at the kernel’s unwind info by the gate DSO. The address of the ELF header for this DSO is passed to user level via AT_SYSINFO_EHDR.The system call is not available to application programs as a function it can be called using the%uA0syscall(2) function.
%uA0