arch/sh/include/asm/dwarf.h

Source file repositories/reference/linux-study-clean/arch/sh/include/asm/dwarf.h

File Facts

System
Linux kernel
Corpus path
arch/sh/include/asm/dwarf.h
Extension
.h
Size
9899 bytes
Lines
418
Domain
Architecture Layer
Bucket
arch/sh
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

struct dwarf_cie {
	unsigned long length;
	unsigned long cie_id;
	unsigned char version;
	const char *augmentation;
	unsigned int code_alignment_factor;
	int data_alignment_factor;

	/* Which column in the rule table represents return addr of func. */
	unsigned int return_address_reg;

	unsigned char *initial_instructions;
	unsigned char *instructions_end;

	unsigned char encoding;

	unsigned long cie_pointer;

	unsigned long flags;
#define DWARF_CIE_Z_AUGMENTATION	(1 << 0)

	/* linked-list entry if this CIE is from a module */
	struct list_head link;

	struct rb_node node;
};

/**
 *	dwarf_fde - Frame Description Entry
 */
struct dwarf_fde {
	unsigned long length;
	unsigned long cie_pointer;
	struct dwarf_cie *cie;
	unsigned long initial_location;
	unsigned long address_range;
	unsigned char *instructions;
	unsigned char *end;

	/* linked-list entry if this FDE is from a module */
	struct list_head link;

	struct rb_node node;
};

/**
 *	dwarf_frame - DWARF information for a frame in the call stack
 */
struct dwarf_frame {
	struct dwarf_frame *prev, *next;

	unsigned long pc;

	struct list_head reg_list;

	unsigned long cfa;

	/* Valid when DW_FRAME_CFA_REG_OFFSET is set in flags */
	unsigned int cfa_register;
	unsigned int cfa_offset;

	/* Valid when DW_FRAME_CFA_REG_EXP is set in flags */
	unsigned char *cfa_expr;
	unsigned int cfa_expr_len;

	unsigned long flags;
#define DWARF_FRAME_CFA_REG_OFFSET	(1 << 0)
#define DWARF_FRAME_CFA_REG_EXP		(1 << 1)

	unsigned long return_addr;
};

/**
 *	dwarf_reg - DWARF register
 *	@flags: Describes how to calculate the value of this register
 */
struct dwarf_reg {
	struct list_head link;

	unsigned int number;

	unsigned long addr;
	unsigned long flags;
#define DWARF_REG_OFFSET	(1 << 0)
#define DWARF_VAL_OFFSET	(1 << 1)
#define DWARF_UNDEFINED		(1 << 2)
};

/*
 * Call Frame instruction opcodes.

Annotation

Implementation Notes