mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 09:17:57 +08:00
%zu to PRIuS in minidump
R=mark@chromium.org BUG=crashpad:1 Review URL: https://codereview.chromium.org/900323003
This commit is contained in:
parent
22c82f0c6c
commit
06b89552af
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "minidump/minidump_location_descriptor_list_writer.h"
|
#include "minidump/minidump_location_descriptor_list_writer.h"
|
||||||
|
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "minidump/test/minidump_location_descriptor_list_test_util.h"
|
#include "minidump/test/minidump_location_descriptor_list_test_util.h"
|
||||||
@ -95,7 +96,7 @@ TEST(MinidumpLocationDescriptorListWriter, ThreeChildren) {
|
|||||||
ASSERT_TRUE(list);
|
ASSERT_TRUE(list);
|
||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kValues); ++index) {
|
for (size_t index = 0; index < arraysize(kValues); ++index) {
|
||||||
SCOPED_TRACE(base::StringPrintf("index %zu", index));
|
SCOPED_TRACE(base::StringPrintf("index %" PRIuS, index));
|
||||||
|
|
||||||
const uint32_t* child = MinidumpWritableAtLocationDescriptor<uint32_t>(
|
const uint32_t* child = MinidumpWritableAtLocationDescriptor<uint32_t>(
|
||||||
file_writer.string(), list->children[index]);
|
file_writer.string(), list->children[index]);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "minidump/minidump_extensions.h"
|
#include "minidump/minidump_extensions.h"
|
||||||
@ -347,7 +348,7 @@ TEST(MinidumpMemoryWriter, AddFromSnapshot) {
|
|||||||
ASSERT_EQ(3u, memory_list->NumberOfMemoryRanges);
|
ASSERT_EQ(3u, memory_list->NumberOfMemoryRanges);
|
||||||
|
|
||||||
for (size_t index = 0; index < memory_list->NumberOfMemoryRanges; ++index) {
|
for (size_t index = 0; index < memory_list->NumberOfMemoryRanges; ++index) {
|
||||||
SCOPED_TRACE(base::StringPrintf("index %zu", index));
|
SCOPED_TRACE(base::StringPrintf("index %" PRIuS, index));
|
||||||
ExpectMinidumpMemoryDescriptorAndContents(
|
ExpectMinidumpMemoryDescriptorAndContents(
|
||||||
&expect_memory_descriptors[index],
|
&expect_memory_descriptors[index],
|
||||||
&memory_list->MemoryRanges[index],
|
&memory_list->MemoryRanges[index],
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
@ -729,7 +730,7 @@ TEST(MinidumpModuleWriter, InitializeFromSnapshot) {
|
|||||||
ASSERT_EQ(3u, module_list->NumberOfModules);
|
ASSERT_EQ(3u, module_list->NumberOfModules);
|
||||||
|
|
||||||
for (size_t index = 0; index < module_list->NumberOfModules; ++index) {
|
for (size_t index = 0; index < module_list->NumberOfModules; ++index) {
|
||||||
SCOPED_TRACE(base::StringPrintf("index %zu", index));
|
SCOPED_TRACE(base::StringPrintf("index %" PRIuS, index));
|
||||||
ASSERT_NO_FATAL_FAILURE(ExpectModule(&expect_modules[index],
|
ASSERT_NO_FATAL_FAILURE(ExpectModule(&expect_modules[index],
|
||||||
&module_list->Modules[index],
|
&module_list->Modules[index],
|
||||||
file_writer.string(),
|
file_writer.string(),
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "minidump/minidump_rva_list_writer.h"
|
#include "minidump/minidump_rva_list_writer.h"
|
||||||
|
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "minidump/test/minidump_rva_list_test_util.h"
|
#include "minidump/test/minidump_rva_list_test_util.h"
|
||||||
@ -87,7 +88,7 @@ TEST(MinidumpRVAListWriter, ThreeChildren) {
|
|||||||
ASSERT_TRUE(list);
|
ASSERT_TRUE(list);
|
||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kValues); ++index) {
|
for (size_t index = 0; index < arraysize(kValues); ++index) {
|
||||||
SCOPED_TRACE(base::StringPrintf("index %zu", index));
|
SCOPED_TRACE(base::StringPrintf("index %" PRIuS, index));
|
||||||
|
|
||||||
const uint32_t* child = MinidumpWritableAtRVA<uint32_t>(
|
const uint32_t* child = MinidumpWritableAtRVA<uint32_t>(
|
||||||
file_writer.string(), list->children[index]);
|
file_writer.string(), list->children[index]);
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/string16.h"
|
#include "base/strings/string16.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
@ -73,7 +74,7 @@ TEST(MinidumpStringWriter, MinidumpUTF16StringWriter) {
|
|||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
||||||
SCOPED_TRACE(base::StringPrintf(
|
SCOPED_TRACE(base::StringPrintf(
|
||||||
"index %zu, input %s", index, kTestData[index].input_string));
|
"index %" PRIuS ", input %s", index, kTestData[index].input_string));
|
||||||
|
|
||||||
// Make sure that the expected output string with its NUL terminator fits in
|
// Make sure that the expected output string with its NUL terminator fits in
|
||||||
// the space provided.
|
// the space provided.
|
||||||
@ -120,8 +121,8 @@ TEST(MinidumpStringWriter, ConvertInvalidUTF8ToUTF16) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
||||||
SCOPED_TRACE(
|
SCOPED_TRACE(base::StringPrintf(
|
||||||
base::StringPrintf("index %zu, input %s", index, kTestData[index]));
|
"index %" PRIuS ", input %s", index, kTestData[index]));
|
||||||
file_writer.Reset();
|
file_writer.Reset();
|
||||||
crashpad::internal::MinidumpUTF16StringWriter string_writer;
|
crashpad::internal::MinidumpUTF16StringWriter string_writer;
|
||||||
string_writer.SetUTF8(kTestData[index]);
|
string_writer.SetUTF8(kTestData[index]);
|
||||||
@ -183,7 +184,7 @@ TEST(MinidumpStringWriter, MinidumpUTF8StringWriter) {
|
|||||||
|
|
||||||
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
for (size_t index = 0; index < arraysize(kTestData); ++index) {
|
||||||
SCOPED_TRACE(base::StringPrintf(
|
SCOPED_TRACE(base::StringPrintf(
|
||||||
"index %zu, input %s", index, kTestData[index].string));
|
"index %" PRIuS ", input %s", index, kTestData[index].string));
|
||||||
|
|
||||||
file_writer.Reset();
|
file_writer.Reset();
|
||||||
crashpad::internal::MinidumpUTF8StringWriter string_writer;
|
crashpad::internal::MinidumpUTF8StringWriter string_writer;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "minidump/minidump_context_writer.h"
|
#include "minidump/minidump_context_writer.h"
|
||||||
@ -619,7 +620,7 @@ void RunInitializeFromSnapshotTest(bool thread_id_collision) {
|
|||||||
|
|
||||||
size_t memory_index = 0;
|
size_t memory_index = 0;
|
||||||
for (size_t index = 0; index < thread_list->NumberOfThreads; ++index) {
|
for (size_t index = 0; index < thread_list->NumberOfThreads; ++index) {
|
||||||
SCOPED_TRACE(base::StringPrintf("index %zu", index));
|
SCOPED_TRACE(base::StringPrintf("index %" PRIuS, index));
|
||||||
|
|
||||||
const MINIDUMP_MEMORY_DESCRIPTOR* observed_stack = nullptr;
|
const MINIDUMP_MEMORY_DESCRIPTOR* observed_stack = nullptr;
|
||||||
const MINIDUMP_MEMORY_DESCRIPTOR** observed_stack_p =
|
const MINIDUMP_MEMORY_DESCRIPTOR** observed_stack_p =
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "minidump/test/minidump_context_test_util.h"
|
#include "minidump/test/minidump_context_test_util.h"
|
||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
#include "base/format_macros.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "snapshot/cpu_context.h"
|
#include "snapshot/cpu_context.h"
|
||||||
@ -183,7 +184,7 @@ void ExpectMinidumpContextFxsave(const FxsaveType* expected,
|
|||||||
for (size_t st_mm_index = 0;
|
for (size_t st_mm_index = 0;
|
||||||
st_mm_index < arraysize(expected->st_mm);
|
st_mm_index < arraysize(expected->st_mm);
|
||||||
++st_mm_index) {
|
++st_mm_index) {
|
||||||
SCOPED_TRACE(base::StringPrintf("st_mm_index %zu", st_mm_index));
|
SCOPED_TRACE(base::StringPrintf("st_mm_index %" PRIuS, st_mm_index));
|
||||||
for (size_t byte = 0;
|
for (size_t byte = 0;
|
||||||
byte < arraysize(expected->st_mm[st_mm_index].st);
|
byte < arraysize(expected->st_mm[st_mm_index].st);
|
||||||
++byte) {
|
++byte) {
|
||||||
@ -201,7 +202,7 @@ void ExpectMinidumpContextFxsave(const FxsaveType* expected,
|
|||||||
for (size_t xmm_index = 0;
|
for (size_t xmm_index = 0;
|
||||||
xmm_index < arraysize(expected->xmm);
|
xmm_index < arraysize(expected->xmm);
|
||||||
++xmm_index) {
|
++xmm_index) {
|
||||||
SCOPED_TRACE(base::StringPrintf("xmm_index %zu", xmm_index));
|
SCOPED_TRACE(base::StringPrintf("xmm_index %" PRIuS, xmm_index));
|
||||||
for (size_t byte = 0; byte < arraysize(expected->xmm[xmm_index]); ++byte) {
|
for (size_t byte = 0; byte < arraysize(expected->xmm[xmm_index]); ++byte) {
|
||||||
EXPECT_EQ(expected->xmm[xmm_index][byte], observed->xmm[xmm_index][byte])
|
EXPECT_EQ(expected->xmm[xmm_index][byte], observed->xmm[xmm_index][byte])
|
||||||
<< "byte " << byte;
|
<< "byte " << byte;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user