[Lldb-commits] [lldb] 7777b30 - Fix CI failure - this depended on constants only defined on arm64 macs

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 26 15:45:38 PDT 2023


Author: Jason Molenda
Date: 2023-04-26T15:45:29-07:00
New Revision: 7777b305bff3ea156311612941664ef8280a4d10

URL: https://github.com/llvm/llvm-project/commit/7777b305bff3ea156311612941664ef8280a4d10
DIFF: https://github.com/llvm/llvm-project/commit/7777b305bff3ea156311612941664ef8280a4d10.diff

LOG: Fix CI failure - this depended on constants only defined on arm64 macs

Added: 
    

Modified: 
    lldb/test/API/macosx/arm-corefile-regctx/create-arm-corefiles.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/macosx/arm-corefile-regctx/create-arm-corefiles.cpp b/lldb/test/API/macosx/arm-corefile-regctx/create-arm-corefiles.cpp
index 9f8dc65f8893f..5517a2397ae52 100644
--- a/lldb/test/API/macosx/arm-corefile-regctx/create-arm-corefiles.cpp
+++ b/lldb/test/API/macosx/arm-corefile-regctx/create-arm-corefiles.cpp
@@ -1,10 +1,25 @@
 #include <mach-o/loader.h>
-#include <mach/thread_status.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string>
 #include <vector>
 
+
+// Normally these are picked up by including <mach/thread_status.h>
+// but that does a compile time check for the build host arch and
+// only defines the ARM register context constants when building on
+// an arm system.  We're creating fake corefiles, and might be
+// creating them on an intel system.
+#define ARM_THREAD_STATE 1
+#define ARM_THREAD_STATE_COUNT 17
+#define ARM_EXCEPTION_STATE 3
+#define ARM_EXCEPTION_STATE_COUNT 3
+#define ARM_THREAD_STATE64 6
+#define ARM_THREAD_STATE64_COUNT 68
+#define ARM_EXCEPTION_STATE64 7
+#define ARM_EXCEPTION_STATE64_COUNT 4
+
+
 union uint32_buf {
   uint8_t bytebuf[4];
   uint32_t val;


        


More information about the lldb-commits mailing list