[compiler-rt] [compiler-rt] Fix GH-112254 DumpAllRegs for win arm64. (PR #112305)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 20:58:37 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: David CARLIER (devnexen)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/112305.diff


1 Files Affected:

- (modified) compiler-rt/lib/sanitizer_common/sanitizer_win.cpp (+5-33) 


``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
index 838b14d3cc559d..5081f1a4b9f7ac 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
@@ -1070,39 +1070,11 @@ void SignalContext::DumpAllRegisters(void *context) {
   Printf("\n");
 #  elif defined(_M_ARM64)
   Report("Register values:\n");
-  Printf("x0  = %llx  ", ctx->X0);
-  Printf("x1  = %llx  ", ctx->X1);
-  Printf("x2  = %llx  ", ctx->X2);
-  Printf("x3  = %llx  ", ctx->X3);
-  Printf("x4  = %llx  ", ctx->X4);
-  Printf("x5  = %llx  ", ctx->X5);
-  Printf("x6  = %llx  ", ctx->X6);
-  Printf("x7  = %llx  ", ctx->X7);
-  Printf("x8  = %llx  ", ctx->X8);
-  Printf("x9  = %llx  ", ctx->X9);
-  Printf("x10 = %llx  ", ctx->X10);
-  Printf("x11 = %llx  ", ctx->X11);
-  Printf("x12 = %llx  ", ctx->X12);
-  Printf("x13 = %llx  ", ctx->X13);
-  Printf("x14 = %llx  ", ctx->X14);
-  Printf("x15 = %llx  ", ctx->X15);
-  Printf("x16 = %llx  ", ctx->X16);
-  Printf("x17 = %llx  ", ctx->X17);
-  Printf("x18 = %llx  ", ctx->X18);
-  Printf("x19 = %llx  ", ctx->X19);
-  Printf("x20 = %llx  ", ctx->X20);
-  Printf("x21 = %llx  ", ctx->X21);
-  Printf("x22 = %llx  ", ctx->X22);
-  Printf("x23 = %llx  ", ctx->X23);
-  Printf("x24 = %llx  ", ctx->X24);
-  Printf("x25 = %llx  ", ctx->X25);
-  Printf("x26 = %llx  ", ctx->X26);
-  Printf("x27 = %llx  ", ctx->X27);
-  Printf("x28 = %llx  ", ctx->X28);
-  Printf("x29 = %llx  ", ctx->X29);
-  Printf("x30 = %llx  ", ctx->X30);
-  Printf("x31 = %llx  ", ctx->X31);
-  Printf("\n");
+  for (int i = 0; i <= 31; i ++) {
+    Printf("x%d%s = %llx", i < 10 ? " " : "", ctx->X[i]);
+    if (i % 4 == 3)
+      Printf("\n");
+  }
 #  else
   // TODO
   (void)ctx;

``````````

</details>


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


More information about the llvm-commits mailing list