summaryrefslogtreecommitdiffstats
path: root/breakpad
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 03:52:46 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 03:52:46 +0000
commit6031307c9540fa4d1c6488f284596151dc30bb88 (patch)
treed1a960750c020f959e08e9a3b1712115b4cd7532 /breakpad
parentc31a5459ed8dede7085508a47cb69370d73b4521 (diff)
downloadchromium_src-6031307c9540fa4d1c6488f284596151dc30bb88.zip
chromium_src-6031307c9540fa4d1c6488f284596151dc30bb88.tar.gz
chromium_src-6031307c9540fa4d1c6488f284596151dc30bb88.tar.bz2
Linux Breakpad: Use MD_MODULE_SIZE in place of sizeof(MDRawModule).
BUG=none TEST=minidump_dump can read the generated .dmp files. Review URL: http://codereview.chromium.org/200013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'breakpad')
-rw-r--r--breakpad/linux/minidump-2-core.cc2
-rw-r--r--breakpad/linux/minidump_writer.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/breakpad/linux/minidump-2-core.cc b/breakpad/linux/minidump-2-core.cc
index 47b0209..db3e5cf 100644
--- a/breakpad/linux/minidump-2-core.cc
+++ b/breakpad/linux/minidump-2-core.cc
@@ -420,7 +420,7 @@ ParseModuleStream(CrashedProcess* crashinfo, MMappedRange range) {
CrashedProcess::Mapping mapping;
const MDRawModule* rawmodule =
(MDRawModule*) range.GetArrayElement(sizeof(uint32_t),
- sizeof(MDRawModule), i);
+ MD_MODULE_SIZE, i);
mapping.start_address = rawmodule->base_of_image;
mapping.end_address = rawmodule->size_of_image + rawmodule->base_of_image;
diff --git a/breakpad/linux/minidump_writer.cc b/breakpad/linux/minidump_writer.cc
index ac6a9aa..333e6b1 100644
--- a/breakpad/linux/minidump_writer.cc
+++ b/breakpad/linux/minidump_writer.cc
@@ -500,7 +500,7 @@ class MinidumpWriter {
}
TypedMDRVA<uint32_t> list(&minidump_writer_);
- if (!list.AllocateObjectAndArray(num_output_mappings, sizeof(MDRawModule)))
+ if (!list.AllocateObjectAndArray(num_output_mappings, MD_MODULE_SIZE))
return false;
dirent->stream_type = MD_MODULE_LIST_STREAM;
@@ -513,7 +513,7 @@ class MinidumpWriter {
continue;
MDRawModule mod;
- my_memset(&mod, 0, sizeof(mod));
+ my_memset(&mod, 0, MD_MODULE_SIZE);
mod.base_of_image = mapping.start_addr;
mod.size_of_image = mapping.size;
const size_t filepath_len = my_strlen(mapping.name);
@@ -569,7 +569,7 @@ class MinidumpWriter {
return false;
mod.module_name_rva = ld.rva;
- list.CopyIndexAfterObject(j++, &mod, sizeof(mod));
+ list.CopyIndexAfterObject(j++, &mod, MD_MODULE_SIZE);
}
return true;