Skip to content

Conversation

@devnexen
Copy link
Member

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Oct 15, 2024

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

Author: David CARLIER (devnexen)

Changes

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 --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;

@github-actions
Copy link

github-actions bot commented Oct 15, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@devnexen devnexen force-pushed the llvm_dump_regs_win_fix branch from efd6c70 to 2778db6 Compare October 15, 2024 04:02
@devnexen devnexen force-pushed the llvm_dump_regs_win_fix branch from 2778db6 to ed02883 Compare October 15, 2024 04:06
@devnexen devnexen merged commit 706c9da into llvm:main Oct 15, 2024
4 checks passed
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants