SFrame format is meant for generating stack traces only.
gas/
* as.c: Replace the use of "unwind" with "stack trace".
* config/tc-aarch64.c: Likewise.
* config/tc-aarch64.h: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-i386.h: Likewise.
* gen-sframe.c: Likewise.
* gen-sframe.h: Likewise.
* testsuite/gas/cfi-sframe/cfi-sframe-aarch64-2.s: Likewise.
* testsuite/gas/cfi-sframe/cfi-sframe-common-8.s: Likewise.
* testsuite/gas/cfi-sframe/common-empty-2.s: Likewise.
* testsuite/gas/cfi-sframe/common-empty-3.s: Likewise.
fprintf (stream, _("\
generate GNU Build notes if none are present in the input\n"));
fprintf (stream, _("\
- --gsframe generate SFrame unwind info\n"));
+ --gsframe generate SFrame stack trace information\n"));
#endif /* OBJ_ELF */
fprintf (stream, _("\
};
unsigned int aarch64_sframe_cfa_sp_reg;
-/* The other CFA base register for SFrame unwind info. */
+/* The other CFA base register for SFrame stack trace info. */
unsigned int aarch64_sframe_cfa_fp_reg;
unsigned int aarch64_sframe_cfa_ra_reg;
}
}
-/* Whether SFrame unwind info is supported. */
+/* Whether SFrame stack trace info is supported. */
bool
aarch64_support_sframe_p (void)
#ifdef OBJ_ELF
-/* Whether SFrame unwind info is supported. */
+/* Whether SFrame stack trace info is supported. */
extern bool aarch64_support_sframe_p (void);
#define support_sframe_p aarch64_support_sframe_p
-/* The stack-pointer register number for SFrame unwind info. */
+/* The stack-pointer register number for SFrame stack trace info. */
extern unsigned int aarch64_sframe_cfa_sp_reg;
#define SFRAME_CFA_SP_REG aarch64_sframe_cfa_sp_reg
-/* The base-pointer register number for CFA unwind info. */
+/* The base-pointer register number for CFA stack trace info. */
extern unsigned int aarch64_sframe_cfa_fp_reg;
#define SFRAME_CFA_FP_REG aarch64_sframe_cfa_fp_reg
-/* The return address register number for CFA unwind info. */
+/* The return address register number for CFA stack trace info. */
extern unsigned int aarch64_sframe_cfa_ra_reg;
#define SFRAME_CFA_RA_REG aarch64_sframe_cfa_ra_reg
static int shared = 0;
unsigned int x86_sframe_cfa_sp_reg;
-/* The other CFA base register for SFrame unwind info. */
+/* The other CFA base register for SFrame stack trace info. */
unsigned int x86_sframe_cfa_fp_reg;
unsigned int x86_sframe_cfa_ra_reg;
bool
x86_support_sframe_p (void)
{
- /* At this time, SFrame unwind is supported for AMD64 ABI only. */
+ /* At this time, SFrame stack trace is supported for AMD64 ABI only. */
return (x86_elf_abi == X86_64_ABI);
}
extern void x86_cleanup (void);
#define md_cleanup() x86_cleanup ()
-/* Whether SFrame unwind info is supported. */
+/* Whether SFrame stack trace info is supported. */
extern bool x86_support_sframe_p (void);
#define support_sframe_p x86_support_sframe_p
-/* The stack-pointer register number for SFrame unwind info. */
+/* The stack-pointer register number for SFrame stack trace info. */
extern unsigned int x86_sframe_cfa_sp_reg;
#define SFRAME_CFA_SP_REG x86_sframe_cfa_sp_reg
-/* The frame-pointer register number for CFA unwind info. */
+/* The frame-pointer register number for SFrame stack trace info. */
extern unsigned int x86_sframe_cfa_fp_reg;
#define SFRAME_CFA_FP_REG x86_sframe_cfa_fp_reg
/* Whether frame row entries track RA.
- A target may not need return address tracking for stack unwinding. If it
+ A target may not need return address tracking for stack tracing. If it
does need the same, SFRAME_CFA_RA_REG must be defined with the return
address register number. */
xlate_ctx->num_xlate_fres++;
}
-/* A SFrame Frame Row Entry is self-sufficient in terms of unwind information
+/* A SFrame Frame Row Entry is self-sufficient in terms of stack tracing info
for a given PC. It contains information assimilated from multiple CFI
instructions, and hence, a new SFrame FRE is initialized with the data from
the previous known FRE, if any.
gas_assert (cur_fre);
/* Define the current CFA rule to use the provided offset (but to keep
the old register). However, if the old register is not FP/SP,
- skip creating SFrame unwind info for the function. */
+ skip creating SFrame stack trace info for the function. */
if ((cur_fre->cfa_base_reg == SFRAME_CFA_FP_REG)
|| (cur_fre->cfa_base_reg == SFRAME_CFA_SP_REG))
{
/* Previous value of register is CFA + offset. However, if the specified
register is not interesting (FP or RA reg), the current DW_CFA_val_offset
instruction can be safely skipped without sacrificing the asynchonicity of
- unwind information. */
+ stack trace information. */
if (cfi_insn->u.r == SFRAME_CFA_FP_REG)
return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */
#ifdef SFRAME_FRE_RA_TRACKING
struct sframe_row_entry *last_fre = xlate_ctx->last_fre;
/* If there is no FRE state to remember, nothing to do here. Return
- early with non-zero error code, this will cause no SFrame unwind info
- for the function involved. */
+ early with non-zero error code, this will cause no SFrame stack trace
+ info for the function involved. */
if (!last_fre)
return SFRAME_XLATE_ERR_INVAL;
default:
{
/* Other CFI opcodes are not processed at this time.
- These do not impact the coverage of the basic stack unwinding
+ These do not impact the coverage of the basic stack tracing
information as conveyed in the SFrame format.
- DW_CFA_register,
- ...
err = sframe_do_cfi_insn (xlate_ctx, cfi_insn);
if (err != SFRAME_XLATE_OK)
{
- /* Skip generating SFrame unwind info for the function if any
+ /* Skip generating SFrame stack trace info for the function if any
offending CFI is encountered by sframe_do_cfi_insn (). */
return err; /* Return the error code. */
}
return SFRAME_XLATE_OK;
}
-/* Create SFrame unwind info for all functions.
+/* Create SFrame stack trace info for all functions.
- This function consumes the already generated FDEs (by dw2gencfi) and
- generates unwind data in SFrame format. */
+ This function consumes the already generated DWARF FDEs (by dw2gencfi) and
+ generates data which is later emitted as stack trace information encoded in
+ the SFrame format. */
static void
create_sframe_all (void)
/* Process and link SFrame FDEs if no error. Also skip adding an SFrame
FDE if it does not contain any SFrame FREs. There is little use of an
- SFrame FDE if there is no unwind information about the function. */
+ SFrame FDE if there is no stack tracing information for the
+ function. */
int err = sframe_do_fde (xlate_ctx, dw_fde);
if (err || xlate_ctx->num_xlate_fres == 0)
{
/* Setup the version specific access functions. */
sframe_set_version (SFRAME_VERSION_1);
- /* Process all fdes and create SFrame unwind information. */
+ /* Process all fdes and create SFrame stack trace information. */
create_sframe_all ();
output_sframe_internal ();
unsigned char (*set_func_info) (unsigned int, unsigned int, unsigned int);
};
-/* Generate SFrame unwind info and prepare contents for the output.
+/* Generate SFrame stack trace info and prepare contents for the output.
outout_sframe () is called at the end of file. */
extern void output_sframe (segT sframe_seg);
## main idea behind this is to use the unused bits in the pointer values.
## Each pointer is patched with a PAC before writing to memory, and is verified
## before using it.
-## When the pointers are mangled, the unwinder needs to know so it can mask off
-## the PAC from the pointer value to recover the return address, and
-## conversely, skip doing so if the pointers are not mangled.
+## When the pointers are mangled, the stack trace generator needs to know so it
+## can mask off the PAC from the pointer value to recover the return address,
+## and conversely, skip doing so if the pointers are not mangled.
##
## .cfi_negate_ra_state CFI directive is used to convey this information.
##
## cfi_val_offset when used with "not interesting" registers (from the
## perspective of SFrame section, non FP/RA registers are not
## interesting) does not affect the asynchronicity of the SFrame
-## unwind information. Such CFI directives can be skipped for SFrame
-## unwind info generation.
+## stack trace information. Such CFI directives can be skipped for SFrame
+## stack trace info generation.
.cfi_startproc
.long 0
.cfi_def_cfa_offset 16
## CFA register is not defined to be SP/FP.
-## No SFrame unwind info for this function will be generated.
+## No SFrame stack trace info for this function will be generated.
.cfi_startproc simple
.long 0
.long 0
## The return column is not the default value.
-## No SFrame unwind info for this function will be generated.
+## No SFrame stack trace info for this function will be generated.
.cfi_startproc
.cfi_return_column 0
.long 0