[compiler-rt] [compiler-rt] DumpAllRegisters implementation for netbsd i386/x86_64. (PR #99743)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 17:58:20 PDT 2024


================
@@ -2277,6 +2277,44 @@ void SignalContext::DumpAllRegisters(void *context) {
 #    else
   (void)ucontext;
 #    endif
+#  elif SANITIZER_NETBSD
+#    if defined(__x86_64__)
+  Report("Register values:\n");
+  Printf("rax = 0x%016llx  ", ucontext->uc_mcontext.__gregs[_REG_RAX]);
+  Printf("rbx = 0x%016llx  ", ucontext->uc_mcontext.__gregs[_REG_RBX]);
----------------
vitalybuka wrote:

Would be nice to restructure consistently with existing code
and #99613

https://github.com/llvm/llvm-project/pull/99743


More information about the llvm-commits mailing list