Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jan 2022 19:08:21 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 682886d1116f - stable/13 - amd64 sigtramp: comment-out annotations for registers with DWARF number >= 32
Message-ID:  <202201021908.202J8Lrl057969@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=682886d1116f2b5ad7a6e69d65670cbe8efc6a2f

commit 682886d1116f2b5ad7a6e69d65670cbe8efc6a2f
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-01-02 18:39:07 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-01-02 19:03:01 +0000

    amd64 sigtramp: comment-out annotations for registers with DWARF number >= 32
    
    (cherry picked from commit 642f77be1d10b57cd7635573aa8a3757913778ad)
---
 sys/amd64/amd64/sigtramp.S | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/amd64/sigtramp.S b/sys/amd64/amd64/sigtramp.S
index 6c2895a14a0a..f951ee14c2f7 100644
--- a/sys/amd64/amd64/sigtramp.S
+++ b/sys/amd64/amd64/sigtramp.S
@@ -67,6 +67,9 @@ ENTRY(__vdso_sigcode)
  * Clang IAS + ld.lld combination cannot handle any of the segment
  * registers.  Also, clang IAS does not know %rflags/%fs.base/%gs.base
  * registers names, use dwarf registers numbers from psABI directly.
+ *
+ * LLVM libunwind from stable/13 cannot parse register numbers higher
+ * than 32.  Disable %rflags, %fs.base, and %gs.base annotations.
  */	
 	.cfi_offset	%fs,  SIGF_UC + UC_FS
 	.cfi_offset	%gs,  SIGF_UC + UC_GS
@@ -76,14 +79,14 @@ ENTRY(__vdso_sigcode)
 	.cfi_offset	%rip, SIGF_UC + UC_RIP
 #if 0
 	.cfi_offset	%cs,  SIGF_UC + UC_CS
-#endif
 	.cfi_offset	49 /* %rflags */, SIGF_UC + UC_RFLAGS
+#endif
 	.cfi_offset	%rsp, SIGF_UC + UC_RSP
 #if 0
 	.cfi_offset	%ss,  SIGF_UC + UC_SS
-#endif
 	.cfi_offset	58 /* %fs.base */, SIGF_UC + UC_FSBASE
 	.cfi_offset	59 /* %gs.base */, SIGF_UC + UC_GSBASE
+#endif
 	call	*SIGF_HANDLER(%rsp)	/* call signal handler */
 	lea	SIGF_UC(%rsp),%rdi	/* get ucontext_t */
 	pushq	$0			/* junk to fake return addr. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201021908.202J8Lrl057969>