From acf87920672f88e8bed39b758a5eb2e716548652 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Thu, 26 Nov 2020 17:37:22 +0000 Subject: [PATCH] Add .cfi_{start,end}proc for RISC-V assembly functions This allows GDB to print more useful backtraces when setting a breakpoint on an assembly function. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D27177 --- sys/riscv/include/asm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/riscv/include/asm.h b/sys/riscv/include/asm.h index 5fd84cfa423d..b53e0824b5f7 100644 --- a/sys/riscv/include/asm.h +++ b/sys/riscv/include/asm.h @@ -47,8 +47,8 @@ #define _C_LABEL(x) x #define ENTRY(sym) \ - .text; .globl sym; .type sym,@function; .align 4; sym: -#define END(sym) .size sym, . - sym + .text; .globl sym; .type sym,@function; .align 4; sym: .cfi_startproc; +#define END(sym) .cfi_endproc; .size sym, . - sym #define EENTRY(sym) \ .globl sym; sym: