Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-only */
2#ifndef __ASM_STACKTRACE_FRAME_H
3#define __ASM_STACKTRACE_FRAME_H
4
5/*
6 * - FRAME_META_TYPE_NONE
7 *
8 * This value is reserved.
9 *
10 * - FRAME_META_TYPE_FINAL
11 *
12 * The record is the last entry on the stack.
13 * Unwinding should terminate successfully.
14 *
15 * - FRAME_META_TYPE_PT_REGS
16 *
17 * The record is embedded within a struct pt_regs, recording the registers at
18 * an arbitrary point in time.
19 * Unwinding should consume pt_regs::pc, followed by pt_regs::lr.
20 *
21 * Note: all other values are reserved and should result in unwinding
22 * terminating with an error.
23 */
24#define FRAME_META_TYPE_NONE 0
25#define FRAME_META_TYPE_FINAL 1
26#define FRAME_META_TYPE_PT_REGS 2
27
28#ifndef __ASSEMBLER__
29/*
30 * A standard AAPCS64 frame record.
31 */
32struct frame_record {
33 u64 fp;
34 u64 lr;
35};
36
37/*
38 * A metadata frame record indicating a special unwind.
39 * The record::{fp,lr} fields must be zero to indicate the presence of
40 * metadata.
41 */
42struct frame_record_meta {
43 struct frame_record record;
44 u64 type;
45};
46#endif /* __ASSEMBLER__ */
47
48#endif /* __ASM_STACKTRACE_FRAME_H */