Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/x86_64/sys Add cfi annotations so that gdb can...



details:   https://anonhg.NetBSD.org/src/rev/18f7314b9b20
branches:  trunk
changeset: 465693:18f7314b9b20
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Dec 02 01:38:54 2019 +0000

description:
Add cfi annotations so that gdb can unwind the stack through signal handlers.

diffstat:

 lib/libc/arch/x86_64/sys/__sigtramp2.S |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 488ae04833ea -r 18f7314b9b20 lib/libc/arch/x86_64/sys/__sigtramp2.S
--- a/lib/libc/arch/x86_64/sys/__sigtramp2.S    Mon Dec 02 01:01:08 2019 +0000
+++ b/lib/libc/arch/x86_64/sys/__sigtramp2.S    Mon Dec 02 01:38:54 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: __sigtramp2.S,v 1.6 2014/05/22 15:01:57 uebayasi Exp $ */
+/*     $NetBSD: __sigtramp2.S,v 1.7 2019/12/02 01:38:54 christos Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,10 +42,13 @@
  * the signal; the kernel calls the signal handler directly.
  */
 NENTRY(__sigtramp_siginfo_2)
+       .cfi_startproc
+       .cfi_def_cfa rsp, 8
        movq    %r15,%rdi
        movq    $SYS_setcontext, %rax
        syscall
        movq    $-1,%rdi /* if we return here, something is wrong */
        movq    $SYS_exit, %rax
        syscall
+       .cfi_endproc
 END(__sigtramp_siginfo_2)



Home | Main Index | Thread Index | Old Index