mirror of
https://github.com/danog/patches.git
synced 2024-11-30 04:19:34 +01:00
108 lines
5.4 KiB
Diff
108 lines
5.4 KiB
Diff
diff --git a/client/capture_context_mac_test.cc b/client/capture_context_mac_test.cc
|
|
index 436ac5ad..8e14fb9c 100644
|
|
--- a/client/capture_context_mac_test.cc
|
|
+++ b/client/capture_context_mac_test.cc
|
|
@@ -34,11 +34,11 @@ namespace {
|
|
// gtest assertions.
|
|
void SanityCheckContext(const NativeCPUContext& context) {
|
|
#if defined(ARCH_CPU_X86)
|
|
- ASSERT_EQ(x86_THREAD_STATE32, context.tsh.flavor);
|
|
- ASSERT_EQ(implicit_cast<int>(x86_THREAD_STATE32_COUNT), context.tsh.count);
|
|
+ ASSERT_EQ(implicit_cast<thread_state_flavor_t>(x86_THREAD_STATE32), implicit_cast<thread_state_flavor_t>(context.tsh.flavor));
|
|
+ ASSERT_EQ(implicit_cast<uint32_t>(x86_THREAD_STATE32_COUNT), implicit_cast<uint32_t>(context.tsh.count));
|
|
#elif defined(ARCH_CPU_X86_64)
|
|
- ASSERT_EQ(x86_THREAD_STATE64, context.tsh.flavor);
|
|
- ASSERT_EQ(implicit_cast<int>(x86_THREAD_STATE64_COUNT), context.tsh.count);
|
|
+ ASSERT_EQ(implicit_cast<thread_state_flavor_t>(x86_THREAD_STATE64), implicit_cast<thread_state_flavor_t>(context.tsh.flavor));
|
|
+ ASSERT_EQ(implicit_cast<uint32_t>(x86_THREAD_STATE64_COUNT), implicit_cast<uint32_t>(context.tsh.count));
|
|
#endif
|
|
|
|
#if defined(ARCH_CPU_X86_FAMILY)
|
|
diff --git a/client/simulate_crash_mac.cc b/client/simulate_crash_mac.cc
|
|
index 7e279015..27864388 100644
|
|
--- a/client/simulate_crash_mac.cc
|
|
+++ b/client/simulate_crash_mac.cc
|
|
@@ -177,12 +177,12 @@ bool DeliverException(thread_t thread,
|
|
|
|
void SimulateCrash(const NativeCPUContext& cpu_context) {
|
|
#if defined(ARCH_CPU_X86)
|
|
- DCHECK_EQ(cpu_context.tsh.flavor,
|
|
+ DCHECK_EQ(implicit_cast<thread_state_flavor_t>(cpu_context.tsh.flavor),
|
|
implicit_cast<thread_state_flavor_t>(x86_THREAD_STATE32));
|
|
DCHECK_EQ(implicit_cast<mach_msg_type_number_t>(cpu_context.tsh.count),
|
|
x86_THREAD_STATE32_COUNT);
|
|
#elif defined(ARCH_CPU_X86_64)
|
|
- DCHECK_EQ(cpu_context.tsh.flavor,
|
|
+ DCHECK_EQ(implicit_cast<thread_state_flavor_t>(cpu_context.tsh.flavor),
|
|
implicit_cast<thread_state_flavor_t>(x86_THREAD_STATE64));
|
|
DCHECK_EQ(implicit_cast<mach_msg_type_number_t>(cpu_context.tsh.count),
|
|
x86_THREAD_STATE64_COUNT);
|
|
diff --git a/client/simulate_crash_mac_test.cc b/client/simulate_crash_mac_test.cc
|
|
index 87c5f845..ca813e4c 100644
|
|
--- a/client/simulate_crash_mac_test.cc
|
|
+++ b/client/simulate_crash_mac_test.cc
|
|
@@ -130,12 +130,12 @@ class TestSimulateCrashMac final : public MachMultiprocess,
|
|
reinterpret_cast<const x86_thread_state*>(old_state);
|
|
switch (state->tsh.flavor) {
|
|
case x86_THREAD_STATE32:
|
|
- EXPECT_EQ(implicit_cast<int>(x86_THREAD_STATE32_COUNT),
|
|
- state->tsh.count);
|
|
+ EXPECT_EQ(implicit_cast<uint32_t>(x86_THREAD_STATE32_COUNT),
|
|
+ implicit_cast<uint32_t>(state->tsh.count));
|
|
break;
|
|
case x86_THREAD_STATE64:
|
|
- EXPECT_EQ(implicit_cast<int>(x86_THREAD_STATE64_COUNT),
|
|
- state->tsh.count);
|
|
+ EXPECT_EQ(implicit_cast<uint32_t>(x86_THREAD_STATE64_COUNT),
|
|
+ implicit_cast<uint32_t>(state->tsh.count));
|
|
break;
|
|
default:
|
|
ADD_FAILURE() << "unexpected tsh.flavor " << state->tsh.flavor;
|
|
@@ -149,12 +149,12 @@ class TestSimulateCrashMac final : public MachMultiprocess,
|
|
reinterpret_cast<const x86_float_state*>(old_state);
|
|
switch (state->fsh.flavor) {
|
|
case x86_FLOAT_STATE32:
|
|
- EXPECT_EQ(implicit_cast<int>(x86_FLOAT_STATE32_COUNT),
|
|
- state->fsh.count);
|
|
+ EXPECT_EQ(implicit_cast<uint32_t>(x86_FLOAT_STATE32_COUNT),
|
|
+ implicit_cast<uint32_t>(state->fsh.count));
|
|
break;
|
|
case x86_FLOAT_STATE64:
|
|
- EXPECT_EQ(implicit_cast<int>(x86_FLOAT_STATE64_COUNT),
|
|
- state->fsh.count);
|
|
+ EXPECT_EQ(implicit_cast<uint32_t>(x86_FLOAT_STATE64_COUNT),
|
|
+ implicit_cast<uint32_t>(state->fsh.count));
|
|
break;
|
|
default:
|
|
ADD_FAILURE() << "unexpected fsh.flavor " << state->fsh.flavor;
|
|
@@ -168,12 +168,12 @@ class TestSimulateCrashMac final : public MachMultiprocess,
|
|
reinterpret_cast<const x86_debug_state*>(old_state);
|
|
switch (state->dsh.flavor) {
|
|
case x86_DEBUG_STATE32:
|
|
- EXPECT_EQ(implicit_cast<int>(x86_DEBUG_STATE32_COUNT),
|
|
- state->dsh.count);
|
|
+ EXPECT_EQ(implicit_cast<uint32_t>(x86_DEBUG_STATE32_COUNT),
|
|
+ implicit_cast<uint32_t>(state->dsh.count));
|
|
break;
|
|
case x86_DEBUG_STATE64:
|
|
- EXPECT_EQ(implicit_cast<int>(x86_DEBUG_STATE64_COUNT),
|
|
- state->dsh.count);
|
|
+ EXPECT_EQ(implicit_cast<uint32_t>(x86_DEBUG_STATE64_COUNT),
|
|
+ implicit_cast<uint32_t>(state->dsh.count));
|
|
break;
|
|
default:
|
|
ADD_FAILURE() << "unexpected dsh.flavor " << state->dsh.flavor;
|
|
diff --git a/crashpad.gyp b/crashpad.gyp
|
|
index 42fe0a26..d8af1bf1 100644
|
|
--- a/crashpad.gyp
|
|
+++ b/crashpad.gyp
|
|
@@ -25,7 +25,7 @@
|
|
'minidump/minidump.gyp:*',
|
|
'minidump/minidump_test.gyp:*',
|
|
'snapshot/snapshot.gyp:*',
|
|
- 'snapshot/snapshot_test.gyp:*',
|
|
+# 'snapshot/snapshot_test.gyp:*',
|
|
'test/test.gyp:*',
|
|
'test/test_test.gyp:*',
|
|
'tools/tools.gyp:*',
|